Ask Your Question
0

Problem to access openstack instance

asked 2019-01-10 06:50:14 -0600

najeh gravatar image

updated 2019-01-10 06:50:53 -0600

When i tried to run a python script( exists in the controller node ) remotely on an openstack instance using this command.

root@controller:~# ssh -i mykey.pem ubuntu@192.168.x.x python < /root/application/DockerProgramming.py

I received these errors:

Traceback (most recent call last):

File "<stdin>", line 22, in <module>

File "<stdin>", line 19, in create_container

File "/usr/local/lib/python2.7/dist-packages/docker/models/containers.py", line 912, in list since=since)

File "/usr/local/lib/python2.7/dist-packages/docker/api/container.py", line 205, in containers res = self._result(self._get(u, params=params), True)

File "/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py", line 46, in inner return f(self, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/docker/api/client.py", line 215, in _get return self.get(url, **self._set_request_timeout(kwargs))

File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 546, in get return self.request('GET', url, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs)

File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request)

requests.exceptions.ConnectionError: ('Connection aborted.', error(13, 'Permission denied'))

Where is the problem and how can i solve it ?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-01-10 09:24:27 -0600

najeh gravatar image

the problem is solved by managing docker on the openstack instance as a non-root user

  1. Create the docker group.

$ sudo groupadd docker

  1. Add your user to the docker group.

$ sudo usermod -aG docker $USER

  1. logout from docker

$ docker logout

  1. login to docker

$ docker login

edit flag offensive delete link more
0

answered 2019-01-10 08:40:46 -0600

I would say the problem is in your program. You know the program, so you can troubleshoot it. I would start by googling the error message.

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

1 follower

Stats

Asked: 2019-01-10 06:50:14 -0600

Seen: 22 times

Last updated: Jan 10