Swift real PIDs do not correspond to the ones in /var/run

asked 2016-01-19 15:53:58 -0500

phillipviana gravatar image

Hi

I am trying to edit proxy-server.conf to make Swift work with keystone. I changed the file and when I run swift-init reload all or swift-init restart all I get messages such as the one below, which suggest that the container-server was looked for with pid 134 and since it couldn't be found it wasn't stopped, and then when it is started the port is already bound:

Signal container-server  pid: 134  signal: 1
No container-server running
WARNING: Unable to modify file descriptor limit.  Running as non-root?
Starting container-server...(/etc/swift/container-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 0.0.0.0:6011 after trying for 30 seconds

However, I believe the port is already bound because the container-server is running, but in another pid. I can see that the PIDs in /var/run/swift do not correspond to the actual PIDs running in the system:

root@5293f4890016:/var/run/swift# for i in `ls`; do echo $i: `cat $i`; done
account-auditor.pid: 219
account-reaper.pid: 285
account-replicator.pid: 291
account-server.pid: 274
container-auditor.pid: 264
container-replicator.pid: 256
container-server.pid: 267
container-sync.pid: 288
container-updater.pid: 216
object-auditor.pid: 259
object-replicator.pid: 222
object-server.pid: 297
object-updater.pid: 294
proxy-server.pid: 225

root@5293f4890016:/var/run/swift# ps ax|egrep "account|container|object" 
   21 ?        S      0:00 /usr/bin/python /usr/bin/swift-container-server /etc/swift/container-server.conf
   22 ?        S      0:00 /usr/bin/python /usr/bin/swift-account-reaper /etc/swift/account-server.conf
   23 ?        Sl     0:00 /usr/bin/python /usr/bin/swift-object-replicator /etc/swift/object-server.conf
   24 ?        S      0:00 /usr/bin/python /usr/bin/swift-account-auditor /etc/swift/account-server.conf
   25 ?        S      0:00 /usr/bin/python /usr/bin/swift-object-server /etc/swift/object-server.conf
   27 ?        S      0:00 /usr/bin/python /usr/bin/swift-account-replicator /etc/swift/account-server.conf
   28 ?        S      0:00 /usr/bin/python /usr/bin/swift-account-server /etc/swift/account-server.conf
   31 ?        S      0:00 /usr/bin/python /usr/bin/swift-object-updater /etc/swift/object-server.conf
   59 ?        S      0:00 /usr/bin/python /usr/bin/swift-account-server /etc/swift/account-server.conf
   60 ?        S      0:00 /usr/bin/python /usr/bin/swift-object-server /etc/swift/object-server.conf
   61 ?        S      0:00 /usr/bin/python /usr/bin/swift-container-server /etc/swift/container-server.conf
  161 ?        S      0:00 /usr/bin/python /usr/bin/swift-container-sync /etc/swift/container-server.conf
  196 ?        S+     0:00 egrep account|container|object

Am I missing something, or is there maybe something misconfigured on my end?

edit retag flag offensive close merge delete