Exception: Could not bind to 0.0.0.0:8080 after trying for 30 seconds
阅读原文时间:2023年07月16日阅读:3

swift@vincent-virtual-machine /etc/swift $ sudo swift-init main restart
Signal proxy-server pid: signal:
No proxy-server running
Signal container-server pid: signal:
Signal container-server pid: signal:
Signal container-server pid: signal:
Signal container-server pid: signal:
Signal account-server pid: signal:
Signal account-server pid: signal:
Signal account-server pid: signal:
Signal account-server pid: signal:
Signal object-server pid: signal:
Signal object-server pid: signal:
Signal object-server pid: signal:
Signal object-server pid: signal:
container-server () appears to have stopped
container-server () appears to have stopped
container-server () appears to have stopped
container-server () appears to have stopped
account-server () appears to have stopped
account-server () appears to have stopped
account-server () appears to have stopped
object-server () appears to have stopped
object-server () appears to have stopped
account-server () appears to have stopped
object-server () appears to have stopped
object-server () appears to have stopped
Starting proxy-server…(/etc/swift/proxy-server.conf)
Starting container-server…(/etc/swift/container-server/.conf)
Starting container-server…(/etc/swift/container-server/.conf)
Starting container-server…(/etc/swift/container-server/.conf)
Starting container-server…(/etc/swift/container-server/.conf)
Starting account-server…(/etc/swift/account-server/.conf)
Starting account-server…(/etc/swift/account-server/.conf)
Starting account-server…(/etc/swift/account-server/.conf)
Starting account-server…(/etc/swift/account-server/.conf)
Starting object-server…(/etc/swift/object-server/.conf)
Starting object-server…(/etc/swift/object-server/.conf)
Starting object-server…(/etc/swift/object-server/.conf)
Starting object-server…(/etc/swift/object-server/.conf)
Traceback (most recent call last):
File "/usr/local/bin/swift-proxy-server", line , in
execfile(__file__)
File "/home/swift/swift/bin/swift-proxy-server", line , in
sys.exit(run_wsgi(conf_file, 'proxy-server', **options))
File "/home/swift/swift/swift/common/wsgi.py", line , in run_wsgi
error_msg = strategy.bind_ports()
File "/home/swift/swift/swift/common/wsgi.py", line , in bind_ports
self.sock = get_socket(self.conf)
File "/home/swift/swift/swift/common/wsgi.py", line , in get_socket
bind_addr[], bind_addr[], bind_timeout))
Exception: Could not bind to 0.0.0.0: after trying for seconds

这种情况很常见,就是端口占用的问题。解决办法:

swift@vincent-virtual-machine /etc/swift $ sudo netstat -ltnp | grep 8080tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      3251/python     swift@vincent-virtual-machine /etc/swift $ ps -wlp 3251F S   UID    PID   PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD0 S  1001   3251      1  1  80   0 - 22488 poll_s ?        00:01:28 swift-proxy-serswift@vincent-virtual-machine /etc/swift $ sudo kill -9 3251swift@vincent-virtual-machine /etc/swift $ sudo netstat -ltnp | grep 8080tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      3256/python     swift@vincent-virtual-machine /etc/swift $ ps -wlp 3256F S   UID    PID   PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD1 S  1001   3256      1  0  80   0 - 22950 poll_s ?        00:00:00 swift-proxy-serswift@vincent-virtual-machine /etc/swift $ sudo kill -9 3256swift@vincent-virtual-machine /etc/swift $ sudo netstat -ltnp | grep 8080

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器