zoukankan      html  css  js  c++  java
  • Exception: Could not bind to 0.0.0.0:8080 after trying for 30 seconds

    swift@vincent-virtual-machine /etc/swift $ sudo swift-init main restart
    Signal proxy-server  pid: 5688  signal: 15
    No proxy-server running
    Signal container-server  pid: 5689  signal: 15
    Signal container-server  pid: 5690  signal: 15
    Signal container-server  pid: 5691  signal: 15
    Signal container-server  pid: 5692  signal: 15
    Signal account-server  pid: 5693  signal: 15
    Signal account-server  pid: 5694  signal: 15
    Signal account-server  pid: 5695  signal: 15
    Signal account-server  pid: 5696  signal: 15
    Signal object-server  pid: 5697  signal: 15
    Signal object-server  pid: 5698  signal: 15
    Signal object-server  pid: 5699  signal: 15
    Signal object-server  pid: 5700  signal: 15
    container-server (5689) appears to have stopped
    container-server (5690) appears to have stopped
    container-server (5691) appears to have stopped
    container-server (5692) appears to have stopped
    account-server (5696) appears to have stopped
    account-server (5694) appears to have stopped
    account-server (5695) appears to have stopped
    object-server (5698) appears to have stopped
    object-server (5700) appears to have stopped
    account-server (5693) appears to have stopped
    object-server (5697) appears to have stopped
    object-server (5699) appears to have stopped
    Starting proxy-server...(/etc/swift/proxy-server.conf)
    Starting container-server...(/etc/swift/container-server/1.conf)
    Starting container-server...(/etc/swift/container-server/2.conf)
    Starting container-server...(/etc/swift/container-server/3.conf)
    Starting container-server...(/etc/swift/container-server/4.conf)
    Starting account-server...(/etc/swift/account-server/1.conf)
    Starting account-server...(/etc/swift/account-server/2.conf)
    Starting account-server...(/etc/swift/account-server/3.conf)
    Starting account-server...(/etc/swift/account-server/4.conf)
    Starting object-server...(/etc/swift/object-server/1.conf)
    Starting object-server...(/etc/swift/object-server/2.conf)
    Starting object-server...(/etc/swift/object-server/3.conf)
    Starting object-server...(/etc/swift/object-server/4.conf)
    Traceback (most recent call last):
      File "/usr/local/bin/swift-proxy-server", line 10, in <module>
        execfile(__file__)
      File "/home/swift/swift/bin/swift-proxy-server", line 23, in <module>
        sys.exit(run_wsgi(conf_file, 'proxy-server', **options))
      File "/home/swift/swift/swift/common/wsgi.py", line 878, in run_wsgi
        error_msg = strategy.bind_ports()
      File "/home/swift/swift/swift/common/wsgi.py", line 480, in bind_ports
        self.sock = get_socket(self.conf)
      File "/home/swift/swift/swift/common/wsgi.py", line 201, in get_socket
        bind_addr[0], bind_addr[1], bind_timeout))
    Exception: Could not bind to 0.0.0.0:8080 after trying for 30 seconds

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


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


  • 相关阅读:
    从标准输入读取一行字符串的方法
    输入文件包含若干行,不知何时结束时,如何读入数据
    centos7.5 + docker + mysql5.7 多实例安装
    copula函数及其Var计算的Python实现
    让网络机器人看起来像人类用户
    流畅的python读书笔记
    神经网络层数和神经元数目 的一些建议
    SVM算法Python实现
    预测性维护{维修}又称:预知性、预见性维护{维修})
    WebDriver API 元素定位(Python)
  • 原文地址:https://www.cnblogs.com/vincent4code/p/4905139.html
Copyright © 2011-2022 走看看