AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-401737

posop's questions

Martin Hope
posop
Asked: 2020-07-22 23:01:54 +0800 CST

由 nginx uwsgi 服务的烧瓶应用程序返回 502

  • 0

我无法连接到由 nginx 和 uwsgi 提供的烧瓶应用程序(searx 搜索引擎)。

我的网络服务器显示“502 Bad Gateway nginx”

这是我的 nginx 错误:错误日志:/var/log/nginx/error.log

[crit] 2688#2688: *4 connect() to unix:/run/uwsgi/app/searx/socket.sock failed 
(2: No such file or directory) while connecting to upstream,
client: 216.186.XXX.XXX, server searx.mysite.com, 
request: "GET / HTTP/1.1", 
upstream: "uwsgi://unix:/run/uwsgi/app/searx/socket.sock:", 
host: "searx.mysite.com"

所以我可以看到socket.sock和上游不一样。

这是我的 nginx.conf

user http;
worker_processes auto;
worker_cpu_affinity auto;

events {
    multi_accept on;
    worker_connections 1024;
}

http {
    charset utf-8;
    sendfile on;
    tcp-nopush on;
    tcp_nodelay on;
    server_tokens off;
    log_not_found off;
    types_hash_max_size 4096;
    client_max_body_size 16M;

    include mime.types;
    default_type application/octet-stream;

    keepalive_timeout 65;

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log warn;

    include /etc/nginx/sites-enabled/*;
}

这是我的 searx.conf,我指定 .sock 文件所在的唯一位置:

/etc/nginx/sites-enabled/searx.conf

server {
    listen 80;
    server_name searx.mysite.com;
    
    location / {
        include uwsgi_params;
        uwsgi_pass unix:/run/uwsgi/app/searx/socket.sock;
    }
    
    root /usr/local/searx/searx-src/searx;
    location /static { }
}

当我查看我的套接字文件夹时,那里没有文件......

ls -alh /run/uwsgi/app/searx/
total 0
drwxr-xr-x 2 searx searx 40 Jul 22 05:02 .
drwxr-xr-x 3 root  root  60 Jul 22 05:02 ..

我用来运行 uwsgi 的命令是:

exec chpst -u http env LC_ALL=en_US.UTF-8 /usr/bin/uwsgi --master --die-on-term --emperor /etc/uwsgi/sites

我用来运行 nginx 的命令:

exec chpst -u root /usr/bin/nginx -c /etc/nginx/nginx.conf -g "daemon off;"

这是我的 searx uwsgi 文件

/etc/uwsgi/sites/searx.ini

[uwsgi]
project = searx
uid = searx
gid = searx
base = /usr/local/searx/searx-src

chdir = %(base)/%(project)
env = SEARX_SETTINGS_PATH=/etc/searx/settings.yml

disable-logging = false
workers = 2

chmod-socket = 666
vacuum = true

single-interpreter = true
master = true
plugin = python
lazy-apps = true
enable-threads = true

module = searx.webapp

route-run = fixpathinfo:

virtualenv = /usr/local/searx/searx-pyenv
pythonpath = %(base)

# NOTE: if I add or delete the next line there is no difference in output
socket = /run/uwsgi/app/searx/socket.sock

更多挖掘:在我设置的 searx.ini中,在日志disable-logging = false中找到了这个:/var/log/uwsgi/current

thunder lock: disabled (you can enable it with --thunder-lock
bind(): Permission denied [core/socket.c line 230]
Wed July 22 15:05:31 2020 - [emperor] curse the uwsgi instance searx.ini (pid: 3320)
Wed July 22 15:05:31 2020 - [emperor] removed uwsgi instance searx.ini

所以我的 searx.ini 或者我怎么称呼它肯定有问题?

我不确定您可能需要哪些其他信息,但很高兴根据需要更新问题。我已经在这几天了,所以我非常感谢你能提供的任何帮助。

nginx uwsgi flask
  • 1 个回答
  • 1804 Views
Martin Hope
posop
Asked: 2020-05-30 16:29:35 +0800 CST

zfs root 上的 arch linux 无法在 bios 上配置 grub

  • 3

正如标题所示,我无法跨越在 zfs 上安装 arch 的终点线。在从 live cd chroot 到我的 /mnt 之后,我尝试在我的 /boot 上安装 grub。无论如何,这是我的命令和错误:

# nvim /etc/grub.d/40_custom
set timeout=5
set default=0

menuentry "Arch Linux" {
   search -u UUID
   linux /vmlinuz-linux zfs=rpool/ROOT/default rw
   initrd /initramfs-linux.img
}

然后我尝试通过以下方式制作我的 grub:

# ZPOOL_VDEV_NAME_PATH=1 grub-mkconfig -o /boot/grub/grub.cfg

我得到这个错误:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
/usr/bin/grub-probe: error: unknown filesystem.
Found fallback initrd images(s) in /boot: initramfs-linux-fallback.img
done

如您所见,我收到了一个未知的文件系统错误,但是当我运行时:

# grub-probe /

我明白了

zfs

所以我在运行 grub-probe 时看到了 zfs,但在运行 grub-mkconfig 时得到了未知的文件系统。

不知道你需要什么信息来帮助我追踪这个......现在已经用谷歌搜索和黑客攻击了 2 天,我真的很感激能在这方面提供一些帮助。

bios zfs arch-linux grub
  • 1 个回答
  • 229 Views
Martin Hope
posop
Asked: 2017-02-22 15:26:15 +0800 CST

添加的 ZFS 镜像新驱动器未报告正确的大小

  • 3

我在 ZFS 上运行 Ubuntu 16.04。

我的操作系统在 rpool 上,我的数据在 /tank

问题:我使用以下命令向我的 zvol 添加了 2 个 6TB 驱动器:

# zpool add -f tank mirror ${DISK1} ${DISK2}

添加了驱动器。我原本期望获得接近 6TB 的数据,但我得到了额外的 2TB。这是输出df -h /tank

Filesystem      Size  Used Avail Use% Mounted on
tank            2.1T     0  2.1T   0% /tank

这是输出# zpool list tank

NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
tank  2.57T   460G  2.12T         -     7%    17%  1.00x  ONLINE  -

这是输出# zpool status

pool: rpool
state: ONLINE
scan: scrub repaired 0 in 0h0m with 0 errors on Sun Feb 12 00:24:58 2017
config:

NAME                                                     STATE     READ WRITE CKSUM
rpool                                                    ONLINE       0     0     0
  mirror-0                                               ONLINE       0     0     0
    ata-Samsung_SSD_850_EVO_250GB_S2R5NB0HA87070Z-part1  ONLINE       0     0     0
    ata-Samsung_SSD_850_EVO_250GB_S2R5NB0HB09374D-part1  ONLINE       0     0     0

errors: No known data errors

pool: tank
state: ONLINE
scan: scrub repaired 0 in 1h8m with 0 errors on Sun Feb 12 01:32:07 2017
config:

NAME                                             STATE     READ WRITE CKSUM
tank                                             ONLINE       0     0     0
  mirror-0                                       ONLINE       0     0     0
    wwn-0x50014ee0561bff3f-part1                 ONLINE       0     0     0
    wwn-0x50014ee1011a7ad7-part1                 ONLINE       0     0     0
  mirror-1                                       ONLINE       0     0     0
    ata-ST6000NE0021-2EN11C_ZA14Q289             ONLINE       0     0     0
    ata-ST6000NE0021-2EN11C_ZA13YT32             ONLINE       0     0     0
cache
  ata-Samsung_SSD_850_PRO_512GB_S39FNX0J102027A  ONLINE       0     0     0

errors: No known data errors

我试过了# zpool set autoexpand=on tank,但没有快乐。仍然报告 2.5TB。

这是输出# lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   477G  0 disk 
├─sda1   8:1    0   477G  0 part 
└─sda9   8:9    0     8M  0 part 
sdb      8:16   0     2T  0 disk 
├─sdb1   8:17   0     2T  0 part 
└─sdb9   8:25   0     8M  0 part 
sdc      8:32   0     2T  0 disk 
├─sdc1   8:33   0     2T  0 part 
└─sdc9   8:41   0     8M  0 part 
sdd      8:48   0 596.2G  0 disk 
└─sdd1   8:49   0 596.2G  0 part 
sde      8:64   0 596.2G  0 disk 
└─sde1   8:65   0 596.2G  0 part 
sdf      8:80   0 232.9G  0 disk 
├─sdf1   8:81   0 232.9G  0 part 
├─sdf2   8:82   0  1007K  0 part 
└─sdf9   8:89   0     8M  0 part 
sdg      8:96   0 232.9G  0 disk 
├─sdg1   8:97   0 232.9G  0 part 
├─sdg2   8:98   0  1007K  0 part 
└─sdg9   8:105  0     8M  0 part 
sr0     11:0    1  1024M  0 rom  
zd0    230:0    0     4G  0 disk [SWAP]

钥匙:

sda = L2ARC 坦克 (samsung pro)

sdb & sdc = Seagate Ironwolf 6TB 硬盘(油箱中的新镜像)

sdd & sde = WD 596G 驱动器在油箱后视镜中

sdf & sdg = rpool 镜像

你知道为什么我的机器只看到这些新驱动器为 2TB 吗?

我能做些什么吗?

我是否需要销毁我的坦克来解决问题(如果有解决办法)?

zfs zfsonlinux
  • 2 个回答
  • 295 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve