阿帕奇+ WSGI:地址已在使用:make_sock:无法绑定到地址 [英] Apache + WSGI: Address already in use: make_sock: could not bind to address

查看:1092
本文介绍了阿帕奇+ WSGI:地址已在使用:make_sock:无法绑定到地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下消息时,我尝试启动的Apache2:

I get the following message when I try to start Apache2:

* Restarting web server apache2                                                  
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:2080
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.

uwsgi是侦听该端口:

uwsgi is listening on that port:

sudo netstat -ltnp | grep ':2080'
tcp        0      0 0.0.0.0:2080            0.0.0.0:*               LISTEN  884/uwsgi

这是我手动安装WSGI之前

Before that I installed wsgi manually

sudo apt-get install libapache2-mod-wsgi

因为我得到这个消息时,我试图启动Apache:

because I got this message when I tried to start Apache:

Syntax error on line 25 of /etc/apache2/sites-enabled/graphite:
Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
   ...fail!

杀死进程不工作,因为它就会自动重新启动。我可以用命令禁用它。

Killing the process does not work because it gets automatically restarted. I can disable it with the command

sudo a2dismod wsgi

但后来我得到的无效的命令'WSGIDaemonProcess的消息再次。

But then I get the "Invalid command 'WSGIDaemonProcess' message once again.

在Apache的error.log中不包含的任何信息。

The apache error.log does not contain any information on that.

任何想法有什么可以解决这个问题?因为现在我在一家僵局是一种。

Any idea what could solve this? Because right now I'm kind of in a deadlock.

推荐答案

如果你得到:

Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed.

那么就意味着你还没有启用的mod_wsgi模块在Apache中,所以它没有加载。

then it means you haven't enabled the mod_wsgi module in Apache and so it isn't loaded.

这或您运行的是Apache的古代版本1.3,虽然这是不认为你甚至可以得到的mod_wsgi二进制包这样一个旧版本的Apache现在极不可能的。

That or you are running an ancient Apache 1.3 version, although that is highly unlikely as don't think you can even get mod_wsgi binary packages for such an old Apache version now.

至于端口使用情况,你显然不能Apache和uWSGI使用同一台都有,所以你需要将它们设置了不同的端口。

As to port usage, you obviously can't have Apache and uWSGI using the same one, so you need to set them up with different ports.

这篇关于阿帕奇+ WSGI:地址已在使用:make_sock:无法绑定到地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆