2016-01-21 6 views
0

Я запускаю контейнер Docker с Swift («Swift all-in-one») на хосте CentOS 7. Я заметил, что ИДП в /var/run/swift/*.pid файлы отличаются от фактических PIDs, работающих в системе:OpenStack Swift: файлы PID не соответствуют PID запущенных процессов; не удается перезапустить службы - порт уже связан

[email protected]:/var/run/swift# for pidfile in `ls`; do echo $pidfile: `cat $pidfile`; 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 

[email protected]:/var/run/swift# ps ax | egrep "account|container|object|proxy" 
    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 
    30 ?  S  0:00 /usr/bin/python /usr/bin/swift-proxy-server /etc/swift/proxy-server.conf 
    31 ?  S  0:00 /usr/bin/python /usr/bin/swift-object-updater /etc/swift/object-server.conf 
    81 ?  S  0:00 /usr/bin/python /usr/bin/swift-object-server /etc/swift/object-server.conf 
    82 ?  S  0:00 /usr/bin/python /usr/bin/swift-container-server /etc/swift/container-server.conf 
    83 ?  S  0:00 /usr/bin/python /usr/bin/swift-account-server /etc/swift/account-server.conf 
    84 ?  S  0:00 /usr/bin/python /usr/bin/swift-proxy-server /etc/swift/proxy-server.conf 
    114 ?  S  0:00 /usr/bin/python /usr/bin/swift-container-sync /etc/swift/container-server.conf 
    135 ?  S+  0:00 egrep account|container|object|proxy 

У меня возникли проблемы при попытке (повторно) настроить Swift прокси-сервер и перезапустить его из-за что. Кажется, что swift-init ищет PID 225 (см. Вывод выше), и он не может его найти (поскольку это не настоящий PID), а затем пытается запустить прокси-сервер, но порт, очевидно, уже связан.

Я что-то упустил или может быть что-то не в порядке с моей настройкой?

[email protected]:/# swift-init proxy-server restart 
Signal proxy-server pid: 225 signal: 15 
No proxy-server running 
WARNING: Unable to modify file descriptor limit. Running as non-root? 
Starting proxy-server...(/etc/swift/proxy-server.conf) 
Traceback (most recent call last): 
    File "/usr/bin/swift-proxy-server", line 23, in <module> 
    sys.exit(run_wsgi(conf_file, 'proxy-server', default_port=8080, **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:8080 after trying for 30 seconds 

ответ

0

Я не уверен, что случилось с моей установкой Swift, но я переустановил ее, и все сработало нормально. Если вы столкнулись с той же проблемой, попробуйте переустановить Swift.