Swift connection time out

asked 2018-03-10 08:05:21 -0500

abukapsoun gravatar image

Hi,

Can you please help,

I am not able to run openstack swift service commands. All other openstack commands are working fine except swift.

for example:

[root@localhost ~(keystone_admin)]#openstack container list Unable to establish connection to http://192.168.187.129:8080/v1/AUTH_6ccefe26d415442aaff1ab5200c65fa9 (http://192.168.187.129:8080/v1/AUTH_6...): HTTPConnectionPool(host='192.168.187.129', port=8080): Max retries exceeded with url: /v1/AUTH_6ccefe26d415442aaff1ab5200c65fa9?format=json (Caused by NewConnectionError('<requests.packages.urllib3.connection.httpconnection 0x441e650="" at="" object="">: Failed to establish a new connection: [Errno 111] Connection refused',))</requests.packages.urllib3.connection.httpconnection>

All other openstack commands are working fine.

my /etc/swift/proxy-server.conf have the following,

[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
admin_tenant_name = %SERVICE_TENANT_NAME%
admin_user = %SERVICE_USER%
admin_password = %SERVICE_PASSWORD%
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
signing_dir = /var/cache/swift
log_name=swift

auth_uri=http://192.168.187.129:5000/v3
auth_url=http://192.168.187.129:35357
auth_plugin=password
project_domain_id=default
user_domain_id=default
project_name=services
username=swift
password=7515a970e2454511
delay_auth_decision=1
cache=swift.cache
include_service_catalog=False

openstack container list --debug is below

-bash: my: command not found

[root@localhost swift(keystone_admin)]# [root@localhost swift(keystone_admin)]# [filter:authtoken] -bash: [filter:authtoken]: command not found [root@localhost swift(keystone_admin)]# paste.filter_factory = keystonemiddleware.auth_token:filter_factory -bash: paste.filter_factory: command not found [root@localhost swift(keystone_admin)]# admin_tenant_name = %SERVICE_TENANT_NAME% -bash: admin_tenant_name: command not found [root@localhost swift(keystone_admin)]# admin_user = %SERVICE_USER% -bash: admin_user: command not found [root@localhost swift(keystone_admin)]# admin_password = %SERVICE_PASSWORD% -bash: admin_password: command not found [root@localhost swift(keystone_admin)]# auth_host = 127.0.0.1 -bash: auth_host: command not found [root@localhost swift(keystone_admin)]# auth_port = 35357 -bash: auth_port: command not found [root@localhost swift(keystone_admin)]# auth_protocol = http -bash: auth_protocol: command not found [root@localhost swift(keystone_admin)]# signing_dir = /var/cache/swift -bash: signing_dir: command not found [root@localhost swift(keystone_admin)]# log_name=swift [root@localhost swift(keystone_admin)]# auth_uri=http://192.168.187.129:5000/v3 [root@localhost swift(keystone_admin)]# auth_url=http://192.168.187.129:35357 [root@localhost swift(keystone_admin)]# auth_plugin=password [root@localhost swift(keystone_admin)]# project_domain_id=default [root@localhost swift(keystone_admin)]# user_domain_id=default [root@localhost swift(keystone_admin)]# project_name=services [root@localhost swift(keystone_admin)]# username=swift [root@localhost swift(keystone_admin)]# password=7515a970e2454511 [root@localhost swift(keystone_admin)]# delay_auth_decision=1 [root@localhost swift(keystone_admin)]# cache=swift.cache [root@localhost swift(keystone_admin)]# include_service_catalog=False [root@localhost swift(keystone_admin)]# [root@localhost swift(keystone_admin)]# [root@localhost swift(keystone_admin)]# [root@localhost swift(keystone_admin)]# clear [root@localhost swift(keystone_admin)]# openstack container list --debug START with options: [u'container', u'list', u'--debug'] options: Namespace(access_key='', access_secret='', access_token='', access_token_endpoint='', access_token_type='', aodh_endpoint='', auth_type='', auth_url='http://192.168.187.129:5000/v3', cacert=None, cert='', client_id='', client_secret='', cloud='', code='', consumer_key='', consumer_secret='', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', key='', log_file=None, old_profile=None, openid_scope='', os_alarming_api_version='2', os_beta_command=False, os_compute_api_version='', os_data_processing_api_version='1.1', os_data_processing_url='', os_database_api_version='1', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_metrics_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_volume_api_version='', os_workflow_api_version='2', passcode='', password='', profile=None, project_domain_id ... (more)

edit retag flag offensive close merge delete

Comments

Connection refused means that port=8080 on server 192.168.187.129 is reachable and not blocked by a firewall, but no process is listening at that port. Check if swift-proxy is running, and which port it is using (e.g. lsof and ss commands).

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-10 08:32:25 -0500 )edit

Hi!! Thanks for the hint, just found out that swift-proxy is not running. But why? [root@localhost ~(keystone_admin)]# systemctl status openstack-swift-proxy.service ● openstack-swift-proxy.service - OpenStack Object Storage (swift) - Proxy Server Loaded: loaded (/usr/lib/systemd/system/openstack-swift-proxy.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2018-03-10 16:54:03 EET; 7min ago Process: 1551 ExecStart=/usr/bin/swift-proxy-server /etc/swift/proxy-server.conf (code=exited, status=1/FAILURE) Main PID: 1551 (code=exited, status=1/FAILURE)

Mar 10 16:54:02 localhost.localdomain swift-proxy-server[1551]: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py"...wsgi Mar 10 16:54:02 localhost.localdomain swift-proxy-server[1551]: error_msg = strategy.bind_ports() Mar 10 16:54:02 localhost.localdomain swift-proxy-server[1551]: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py"...orts Mar 10 16:54:02 localhost.localdomain swift-proxy-server[1551]: drop_privileges(self.conf.get('user', 'swift')) Mar 10 16:54:02 ...(more)

abukapsoun gravatar imageabukapsoun ( 2018-03-10 09:05:09 -0500 )edit

Below swift proxy.conf

[filter:crossdomain]
use=egg:swift#crossdomain
cross_domain_policy=<allow-access-from domain="*" secure="false" />

[filter:staticweb]
use=egg:swift#staticweb

[filter:account_quotas]
use=egg:swift#account_quotas

[filter:formpost]
use=egg:swift#formpost

[filter:container_quotas]
use=egg:swift#container_quotas

[filter:ceilometer]
topic=notifications
driver=messaging
url=rabbit://guest:guest@192.168.187.129:5672/
control_exchange=swift
paste.filter_factory=ceilometermiddleware.swift:filter_factory
nonblocking_notify=False
ignore_projects=services
auth_uri=http://127.0.0.1:5000
auth_url=http://127.0.0.1:35357
auth_type=password
project_domain_name=Default
user_domain_name=Default
project_name=services
username=swift
password=password
[root@localhost ~(keystone_admin)]# clear
[root@localhost ~(keystone_admin)]# cat /etc/swift/proxy-server.conf
[DEFAULT]
#bindport was 8080
bind_port = 8080
#worker was 2
workers = 2
user = admin
bind_ip=192.168.187.129
log_name=proxy-server
log_facility=LOG_LOCAL2
log_level=INFO
log_headers=False
log_address=/dev/log

[pipeline:main]
# Our traditional pipeline produces a cluster without any authentication,
# open to access by any client. This ...
(more)
abukapsoun gravatar imageabukapsoun ( 2018-03-10 09:23:35 -0500 )edit

The error is getpwnam(): name not found: admin. It indicates that there is no Linux user admin.

Normally, Swift is configured with user swift in the proxy.conf, but you have configured admin.

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-10 18:21:45 -0500 )edit

By the way, ask.openstack.org allows you to format code as well as log and config files so that they become readable. Use the button labeled with “101010”.

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-10 18:24:51 -0500 )edit