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


  • 相关阅读:
    常用PHP array数组函数
    每天学习30分钟新知识之html教程1
    laravel学习之路2: jwt集成
    JWT简介json web token bear token
    MDwiki 调研
    laravel学习之路1:认证相关
    OAuth 2.0介绍
    第一行代码 6.4 数据存储全方案-详解持久化数据- 数据库
    github(1)安装及使用图文详解
    Android集成讯飞语音、百度语音、阿里语音识别
  • 原文地址:https://www.cnblogs.com/vincent4code/p/4905139.html
Copyright © 2011-2022 走看看