Ask Your Question
4

Authorization Failed: [Errno 111] Connection refused

asked 2013-05-28 09:32:29 -0500

sudhir gravatar image

updated 2013-05-28 16:46:13 -0500

smaffulli gravatar image

Hello,

I am using ubuntu 13.04 with openstack grizzly version. my openstack was working fine and i was able to commnicate to my vm instances from external network and vice versa, but suddenly due to some issue i started facing problem. I am getting "[Errno 111] Connection refused" error, I have faced this same issue many times in past and i use to reinstall from scratch, but after sometime again i will end up in same problem. This happens every time not only for me all my peers also facing the same issue on their lab setup. This behavior make me think like after some time the database is getting corrupted or something similar to this . i would really appreciate if someone can help me to narrow down the root cause ?

Thanks in advance.

root@ubuntu150:/var# keystone --debug user-list

REQ: curl -i http://10.19.11.150:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "User-Agent: python-keystoneclient"
REQ BODY: {"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin_pass"}}}
Authorization Failed: [Errno 111] Connection refused

root@ubuntu150:~# quantum net-list

[Errno 111] Connection refused

root@ubuntu150:~# keystone user-list

Authorization Failed: [Errno 111] Connection refused

root@ubuntu150:~# quantum subnet-list

[Errno 111] Connection refused

root@ubuntu150:/var# tail -n 30 /var/log/keystone/keystone.log

2013-05-28 23:40:48  WARNING [keystone.common.wsgi] You are not authorized to perform the requested action: admin_required
2013-05-29 02:08:20  WARNING [keystone.common.wsgi] You are not authorized to perform the requested action: admin_required

root@ubuntu150:/var# cat /var/log/nova/nova-* | grep -i error

2013-05-28 18:29:37.251 ERROR nova.openstack.common.rpc.common [req-46d05539-0ed3-4104-a72f-c77359c657c7 None None] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 1 seconds.
2013-05-28 18:29:38.254 ERROR nova.openstack.common.rpc.common [req-46d05539-0ed3-4104-a72f-c77359c657c7 None None] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 3 seconds.
2013-05-28 18:29:41.259 ERROR nova.openstack.common.rpc.common [req-46d05539-0ed3-4104-a72f-c77359c657c7 None None] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 5 seconds.
2013-05-28 18:29:46.263 ERROR nova.openstack.common.rpc.common [req-46d05539-0ed3-4104-a72f-c77359c657c7 None None] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 7 seconds.
2013-05-28 18:29:53.267 ERROR nova.openstack.common.rpc.common [req-46d05539-0ed3-4104-a72f-c77359c657c7 None None] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 9 seconds.
2013-05-28 18:30:02.273 ERROR nova.openstack.common.rpc.common [req-46d05539-0ed3-4104-a72f-c77359c657c7 None None] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 11 seconds.
2013-05-28 20:54:54.073 ERROR nova.openstack.common.rpc.common [req-f9508f02-6770-458b-a3ba-29aa6577efff None None] AMQP server on 10.19.11.150:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 1 seconds.
2013-05-28 20:54:55.075 ERROR nova.openstack.common.rpc.common [req-f9508f02-6770-458b-a3ba-29aa6577efff None None] AMQP server on 10.19.11.150:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 3 seconds ...
(more)
edit retag flag offensive close merge delete

Comments

regarding the iptables, i a using the ubuntu 13.04 amd 64 server default installation and i don't see any iptables rules in it.

sudhir gravatar imagesudhir ( 2013-05-29 05:33:35 -0500 )edit
1

FYI, This happened when i was installing keystone on a fresh OS , This happens when the source file is not loaded or the parameters in source files are incorrect or has been changed on the OS.

My source file was having the following entries -:

export OS_TENANT_NAME=admin export OS_USERNAME=admin

Mohit gravatar imageMohit ( 2015-07-23 00:59:56 -0500 )edit

7 answers

Sort by ยป oldest newest most voted
2

answered 2013-07-09 05:16:02 -0500

nishtha gravatar image

Hello

I have received this error when I don't source my environment credentials. I hope you are not making the same mistake. If so,source your environment variables in .bashrc file.

edit flag offensive delete link more
1

answered 2013-05-29 03:56:19 -0500

rakrup gravatar image

updated 2013-05-29 17:49:36 -0500

smaffulli gravatar image

This might be related to http_proxy being set in the environment. I have faced this a couple of times because of the http_proxy being set, after removing http_proxy from the environment system starts working fine. This happens for an environment where the you have a local network behind proxy and all the request to keystone for validation is sent to the proxy instead which fails, you may also want to add no proxy for localhost.

edit flag offensive delete link more

Comments

i use ntlmaps-0.9.9.0.1 for isa proxy authentication and i set

export http_proxy="http://127.0.0.1:5865"

and i also do

export http_proxy="http://127.0.0.1:5865" >> /etc/profile and

Actually i even tried un setting http_proxy variable but it didn't help.

sudhir gravatar imagesudhir ( 2013-05-29 05:33:23 -0500 )edit
0

answered 2013-05-29 01:51:14 -0500

Ph4nToM gravatar image

Have you tried to do:

sudo service iptables stop on your server.

I've ever had this problem and I solved it when I modified my iptables

edit flag offensive delete link more

Comments

Hello, I have this problem right now (5 years later), I ran that command and it solved it temporarily just to be blocked again in like 30 minutes. How should I modify the iptables to prevent this again?

rcarabelli gravatar imagercarabelli ( 2018-04-24 18:02:44 -0500 )edit
0

answered 2015-07-23 00:58:16 -0500

Mohit gravatar image

FYI, This happened when i was installing keystone on a fresh OS , This happens when the source file is not loaded or the parameters in source files are incorrect or has been changed on the OS.

My source file was having the following entries -:

export OS_TENANT_NAME=admin export OS_USERNAME=admin export OS_PASSWORD=admin_pass export OS_AUTH_URL="http://10.40.96.199:5000/v2.0/"

edit flag offensive delete link more
0

answered 2014-05-04 20:21:00 -0500

6543217890meh gravatar image

I had this issue and found that the problem was because neutron was not able to communicate with rabbitmq. To see if this is your problem you can try the following snippet of code:

Script started, file is typescript [ -r /etc/default/neutron-server ] && . /etc/default/neutron-server [ -r "$NEUTRON_PLUGIN_CONFIG" ] && CONF_ARG="--config-file $NEUTRON_PLUGIN_CONFIG" exec start-stop-daemon --start --chuid neutron --exec /usr/bin/neutron-server -- \ --config-file /etc/neutron/neutron.conf \ --log-file /var/log/neutron/server.log $CONF_ARG end script

(you can find this at the end of a file found in /etc/init/neutron-server.conf)

When I ran this it showed me errors I had in my config files and after I fixed them it showed the following: 2014-05-03 17:19:33.123 17996 ERROR neutron.openstack.common.rpc.common [-] AMQP server on 192.168.0.143:5672 is unreachable: Socket closed. Trying again in 1 seconds. 2014-05-03 17:19:37.136 17996 ERROR neutron.openstack.common.rpc.common [-] AMQP server on 192.168.0.143:5672 is unreachable: Socket closed. Trying again in 3 seconds. 2014-05-03 17:19:43.149 17996 ERROR neutron.openstack.common.rpc.common [-] AMQP server on 192.168.0.143:5672 is unreachable: Socket closed. Trying again in 5 seconds.

I then ran netstat to see what port rabbitmq had opened. Rabbitmq had opened the port, but tied it to "localhost" not my ip address, which I would have thought. So to fix neutron not being able to find rabbitmq. I changed the following lines in my config files:

rabbit_host = localhost

Then I changed my /etc/hosts file to reflect the following:

"my Ip address" localhost ------instead of the 127.0.0.1 localhost that was default in my file.

After I did all of the nuetron and nova now actually started talking to rabbitmq and I stopped getting the [Errno 111] ECONNREFUSED error. Hope this helps.

edit flag offensive delete link more
0

answered 2013-12-04 05:48:16 -0500

mantri.arjun@hotmail.com gravatar image

I am getting same connection refused when trying to run the script please solution guys

root@ip-1723-11:/etc/keyston sudo ./keystone_basic.sh

[Errno 111] Connection refused

[Errno 111] Connection refused

[Errno 111] Connection refused

[Errno 111] Connection refused

[Errno 111] Connection refused

[Errno 111] Connection refused

usage: keystone user-role-add --user <user> --role <role> [--tenant <tenant>]</tenant></role></user>

keystone user-role-add: error: argument --user/--user-id/--user_id: expected one argument

usage: keystone user-role-add --user <user> --role <role> [--tenant <tenant>]</tenant></role></user>

keystone user-role-add: error: argument --user/--user-id/--user_id: expected one argument

usage: keystone user-role-add --user <user> --role <role> [--tenant <tenant>]</tenant></role></user>

keystone user-role-add: error: argument --user/--user-id/--user_id: expected one argument

[Errno 111] Connection refused

usage: keystone user-create --name <user-name> [--tenant-id <tenant-id>]</tenant-id></user-name>

                        [--pass <pass>] [--email <email>]

                        [--enabled <true|false>]

keystone user-create: error: argument --tenant-id: expected one argument

usage: keystone user-role-add --user <user> --role <role> [--tenant <tenant>]</tenant></role></user>

keystone user-role-add: error: argument --tenant/--tenant-id: expected one argument

usage: keystone user-create --name <user-name> [--tenant-id <tenant-id>]</tenant-id></user-name>

                        [--pass <pass>] [--email <email>]

                        [--enabled <true|false>]

keystone user-create: error: argument --tenant-id: expected one argument

usage: keystone user-role-add --user <user> --role <role> [--tenant <tenant>]</tenant></role></user>

keystone user-role-add: error: argument --tenant/--tenant-id: expected one argument

usage: keystone user-create --name <user-name> [--tenant-id <tenant-id>]</tenant-id></user-name>

                        [--pass <pass>] [--email <email>]

                        [--enabled <true|false>]

keystone user-create: error: argument --tenant-id: expected one argument

usage: keystone user-role-add --user <user> --role <role> [--tenant <tenant>]</tenant></role></user>

keystone user-role-add: error: argument --tenant/--tenant-id: expected one argument

usage: keystone user-create --name <user-name> [--tenant-id <tenant-id>]</tenant-id></user-name>

                        [--pass <pass>] [--email <email>]

                        [--enabled <true|false>]

keystone user-create: error: argument --tenant-id: expected one argument

usage: keystone user-role-add --user <user> --role <role> [--tenant <tenant>]</tenant></role></user>

keystone user-role-add: error: argument --tenant/--tenant-id: expected one argument

edit flag offensive delete link more

Comments

1

It is better to make different query than making it here. This way community will help you to troubleshoot the issue.

dheeru gravatar imagedheeru ( 2013-12-04 07:27:39 -0500 )edit
0

answered 2013-12-04 06:21:51 -0500

dheeru gravatar image

From the error message your RabbitMQ itslef is down. Can you check that ? Due to this components may not be communicating with each other. This causing ripple effect. You can check rabbitMQ first and ensure that you don't see the following erros

013-05-29 00:52:17 ERROR [quantum.openstack.common.rpc.common] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 5 seconds.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2013-05-28 09:32:29 -0500

Seen: 79,197 times

Last updated: May 04 '14