簡體   English   中英

vmware中無業游民的docker中的uwsgi-未創建套接字

[英]uwsgi in docker in vagrant in vmware - socket not being created

在我的Mac上,我正在VMware中運行Windows Server 2016。 在那兒,我在無業游民/ Virtual Box中運行Ubuntu。 在這里,我嘗試使用nginx / uwsgi在docker容器中運行django應用。

uwsgi無法以以下內容開頭:

[uWSGI] getting INI configuration from /opt/django/CAPgraph/uwsgi.ini
*** Starting uWSGI 2.0.15 (64bit) on [Thu Aug 17 20:01:23 2017] ***
compiled with version: 6.4.0 20170805 on 17 August 2017 06:10:50
os: Linux-3.13.0-128-generic #177-Ubuntu SMP Tue Aug 8 11:40:23 UTC 2017
nodename: 37db4344b5ae
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /
detected binary path: /usr/local/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /opt/django/CAPgraph/
your memory page size is 4096 bytes
detected max file descriptor number: 524288
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Operation not permitted [core/socket.c line 230] 

在VMware中,該文件夾設置為可供具有寫許可權的所有人共享。 那是安裝在流浪者VM上,它是777,而在Docker容器中也是777。我可以從所有3個地方的目錄中創建文件。 但是似乎uwsgi無法創建套接字。

我嘗試了一個簡短的python腳本作為來自無業游民的測試,但也無法創建套接字:

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ python -c "import socket as s; sock = s.socket(s.AF_UNIX); sock.bind('/vagrant/app.sock')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 1] Operation not permitted

有人知道我該如何解決?

更新:我將目錄更改為/ tmp,可以在其中使用python腳本創建套接字,但是uwsgi仍然失敗,並出現相同的錯誤。

更新2:我使用python腳本在/ tmp中創建了套接字,將其chmod-ed為777,但仍然從uwsgi收到相同的錯誤。

使用/vagrant以外的其他任何文件夾。 我通常使用/ home / vagrant

問題是/vagrant與普通文件夾不同。 如果執行命令mount | grep vagrant mount | grep vagrant您會發現它使用了vboxfs文件系統,由於某種原因,該文件系統無法與vboxfs在一起

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM