ccollicutt / swiftacular

Deploy OpenStack Swift with Ansible and Vagrant
BSD 2-Clause "Simplified" License
47 stars 13 forks source link

Exception: Could not bind to 192.168.5.8:6001 after trying for 30 seconds #28

Closed brainstorm closed 10 years ago

brainstorm commented 10 years ago

Sorry to bother you again, @curtisgithub, but have you ever encountered the following issue with swift ports? The Vagrant version is fine, this only happens when running on bare metal.

TASK: [restart swift-storage node services] ***********************************
failed: [swift-storage-02] => {"changed": true, "cmd": ["swift-init", "all", "start"], "delta": "0:00:33.368483", "end": "2014-08-20 14:30:15.458996", "rc": 1, "start": "2014-08-20 14:29:42.090513"}
stdout: Starting container-updater...(/etc/swift/container-server/container-replication.conf)
Starting container-updater...(/etc/swift/container-server/container-server.conf)
Starting account-auditor...(/etc/swift/account-server/account-replication.conf)
Starting account-auditor...(/etc/swift/account-server/account-server.conf)
Starting object-replicator...(/etc/swift/object-server/object-replication.conf)
Starting object-replicator...(/etc/swift/object-server/object-server.conf)
Unable to locate config for proxy-server
Starting container-replicator...(/etc/swift/container-server/container-replication.conf)
Starting container-replicator...(/etc/swift/container-server/container-server.conf)
Starting object-auditor...(/etc/swift/object-server/object-replication.conf)
Starting object-auditor...(/etc/swift/object-server/object-server.conf)
Unable to locate config for object-expirer
Starting container-auditor...(/etc/swift/container-server/container-replication.conf)
Starting container-auditor...(/etc/swift/container-server/container-server.conf)
Starting container-server...(/etc/swift/container-server/container-replication.conf)
Starting container-server...(/etc/swift/container-server/container-server.conf)
Starting account-server...(/etc/swift/account-server/account-replication.conf)
Starting account-server...(/etc/swift/account-server/account-server.conf)
Starting account-reaper...(/etc/swift/account-server/account-replication.conf)
Starting account-reaper...(/etc/swift/account-server/account-server.conf)
Starting container-sync...(/etc/swift/container-server/container-replication.conf)
Starting container-sync...(/etc/swift/container-server/container-server.conf)
Starting account-replicator...(/etc/swift/account-server/account-replication.conf)
Starting account-replicator...(/etc/swift/account-server/account-server.conf)
Starting object-updater...(/etc/swift/object-server/object-replication.conf)
Starting object-updater...(/etc/swift/object-server/object-server.conf)
Starting object-server...(/etc/swift/object-server/object-replication.conf)
Starting object-server...(/etc/swift/object-server/object-server.conf)
Traceback (most recent call last):
  File "/usr/bin/swift-container-server", line 24, in <module>
    'container-server', default_port=6001, **options))
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 381, in run_wsgi
    sock = get_socket(conf, default_port=kwargs.get('default_port', 8080))
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 173, in get_socket
    bind_addr[0], bind_addr[1], bind_timeout))
Exception: Could not bind to 192.168.5.8:6001 after trying for 30 seconds

Traceback (most recent call last):
  File "/usr/bin/swift-account-server", line 24, in <module>
    'account-server', default_port=6002, **options))
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 381, in run_wsgi
    sock = get_socket(conf, default_port=kwargs.get('default_port', 8080))
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 173, in get_socket
    bind_addr[0], bind_addr[1], bind_timeout))
Exception: Could not bind to 192.168.5.8:6002 after trying for 30 seconds

Traceback (most recent call last):
  File "/usr/bin/swift-object-server", line 27, in <module>
    **options))
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 381, in run_wsgi
    sock = get_socket(conf, default_port=kwargs.get('default_port', 8080))
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 173, in get_socket
    bind_addr[0], bind_addr[1], bind_timeout))
Exception: Could not bind to 192.168.5.8:6000 after trying for 30 seconds
brainstorm commented 10 years ago

For the record, a re-run of ansible-playbook site.yml succeeded, but the following error persists:

ubuntu@swift-6ceadd0e-62eb-4a79-8039-1efd38ab582f:~$ . testrc
ubuntu@swift-6ceadd0e-62eb-4a79-8039-1efd38ab582f:~$ swift list
Account GET failed: https://192.168.5.5/v1/AUTH_1b3abc071e714c4491992d2ddeca5f19?format=json 405 Method Not Allowed  [first 60 chars of response] <html><h1>Method Not Allowed</h1><p>The method is not allowe
ccollicutt commented 10 years ago

No I haven't encountered that particular error. The only thing I would suggest is making sure that IP/interface is available on the node. At least it seems like something I would check first, but I don't know much about your infrastructure. :)

brainstorm commented 10 years ago

Yes, that's exactly what I checked first, whether eth0 was present in the machine(s) since I've changed all instances of eth* for eth0 in my "fork" (reuse of your role):

https://github.com/brainstorm/ansible-dataspace

It's certainly a bit weird that on the second re-run it did not timeout :/

ccollicutt commented 10 years ago

Hmmm, good point re second run. I can look into it a bit, but I'm not sure how far I can get given it's on your infra. :)

brainstorm commented 10 years ago

Well, nevermind, if I couldn't even reproduce it myself... Thanks a ton for your help! :+1:

ccollicutt commented 10 years ago

Would you be able to drop me an email? curtis@serverascode.com

The non-profit I work for would be super interested to hear about what you are doing at INCF with Swift and "big data" and such. :)