python-harborclient icon indicating copy to clipboard operation
python-harborclient copied to clipboard

harbor run subcommand is failure except help

Open s23xiaojia opened this issue 6 years ago • 0 comments

run command return error as follow:

harbor --insecure info Traceback (most recent call last): File "/usr/local/bin/harbor", line 10, in sys.exit(main()) File "/usr/local/lib/python2.7/site-packages/harborclient/shell.py", line 404, in main HarborShell().main(argv) File "/usr/local/lib/python2.7/site-packages/harborclient/shell.py", line 330, in main self.cs.authenticate() File "/usr/local/lib/python2.7/site-packages/harborclient/v2/client.py", line 83, in authenticate self.client.authenticate() File "/usr/local/lib/python2.7/site-packages/harborclient/client.py", line 270, in authenticate verify=self.verify_cert) File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 112, in post return request('post', url, data=data, json=json, **kwargs) File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 508, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd7873e6750>: Failed to establish a new connection: [Errno 111] Connection refused',))

harbor run is normal

[root@node2 harbor]# docker-compose -f /usr/local/harbor/docker-compose.yml ps Name Command State Ports

harbor-adminserver /harbor/start.sh Up
harbor-core /harbor/start.sh Up
harbor-db /entrypoint.sh postgres Up 5432/tcp
harbor-jobservice /harbor/start.sh Up
harbor-log /bin/sh -c /usr/local/bin/ ... Up 127.0.0.1:1514->10514/tcp
harbor-portal nginx -g daemon off; Up 80/tcp
nginx nginx -g daemon off; Up 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp, 0.0.0.0:80->80/tcp redis docker-entrypoint.sh redis ... Up 6379/tcp
registry /entrypoint.sh /etc/regist ... Up 5000/tcp
registryctl /harbor/start.sh Up

curl access harbor

[root@node2 harbor]# curl -IkL localhost HTTP/1.1 200 OK Server: nginx Date: Wed, 16 Jan 2019 19:13:45 GMT Content-Type: text/html Content-Length: 693 Connection: keep-alive Last-Modified: Fri, 04 Jan 2019 11:11:07 GMT ETag: "5c2f3f4b-2b5" Accept-Ranges: bytes

s23xiaojia avatar Jan 16 '19 19:01 s23xiaojia