arnold icon indicating copy to clipboard operation
arnold copied to clipboard

./bin/arnold bootstrap -c eugene -e development -k 127.0.0.1

Open iliemihai opened this issue 3 years ago • 8 comments

Bug Report

Command ./bin/arnold bootstrap -c eugene -e development -k 127.0.0.1 returns error "urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /version"

Expected behavior/code A clear and concise description of what you expected to happen (or code). Create arnold project with marsha, richie,edx for eugene customer

Actual Behavior A clear and concise description of the behavior. "An exception occurred during task execution. To see the full traceback, use -vvv. The error was: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='127.0.0.1', port=8443): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f275c5bc940>: Failed to establish a new connection: [Errno 111] Connection refused',)) new connection: [Errno 111] Connection refused',))\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}fatal: [local]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 170, in _new_conn\n (self._dns_host, self.port), self.timeout, **extra_kw\n File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 96, in create_connection\n raise err\n File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 86, in create_connection\n sock.connect(sa)\nConnectionRefusedError: [Errno 111] Connection refused\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen\n chunked=chunked,\n File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 382, in _make_request\n self._validate_conn(conn)\n File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn\n conn.connect()\n File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 353, in connect\n conn = self._new_conn()\n File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 182, in _new_conn\n self, "Failed to establish a new connection: %s" % e\nurllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f275c5bc940>: Failed to establish a new connection: [Errno 111] Connection refused\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/tmp/ansible/ansible-tmp-1620757563.8108592-88-244996553092427/AnsiballZ_k8s_info.py", line 102, in \n _ansiballz_main()\n File "/tmp/ansible/ansible-tmp-1620757563.8108592-88-244996553092427/AnsiballZ_k8s_info.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/tmp/ansible/ansible-tmp-1620757563.8108592-88-244996553092427/AnsiballZ_k8s_info.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.clustering.k8s.k8s_info', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/local/lib/python3.6/runpy.py", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/local/lib/python3.6/runpy.py", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_k8s_info_payload_cvafqu9g/ansible_k8s_info_payload.zip/ansible/modules/clustering/k8s/k8s_info.py", line 179, in \n File "/tmp/ansible_k8s_info_payload_cvafqu9g/ansible_k8s_info_payload.zip/ansible/modules/clustering/k8s/k8s_info.py", line 175, in main\n File "/tmp/ansible_k8s_info_payload_cvafqu9g/ansible_k8s_info_payload.zip/ansible/modules/clustering/k8s/k8s_info.py", line 148, in execute_module\n File "/tmp/ansible_k8s_info_payload_cvafqu9g/ansible_k8s_info_payload.zip/ansible/module_utils/k8s/common.py", line 200, in get_api_client\n File "/usr/local/lib/python3.6/site-packages/openshift/dynamic/client.py", line 71, in init\n self.__discoverer = discoverer(self, cache_file)\n File "/usr/local/lib/python3.6/site-packages/openshift/dynamic/discovery.py", line 259, in init\n Discoverer.init(self, client, cache_file)\n File "/usr/local/lib/python3.6/site-packages/openshift/dynamic/discovery.py", line 31, in init\n self.__init_cache()\n File "/usr/local/lib/python3.6/site-packages/openshift/dynamic/discovery.py", line 78, in __init_cache\n self._load_server_info()\n File "/usr/local/lib/python3.6/site-packages/openshift/dynamic/discovery.py", line 158, in _load_server_info\n 'kubernetes': self.client.request('get', '/version', serializer=just_json)\n File "/usr/local/lib/python3.6/site-packages/openshift/dynamic/client.py", line 42, in inner\n resp = func(self, *args, **kwargs)\n File "/usr/local/lib/python3.6/site-packages/openshift/dynamic/client.py", line 247, in request\n _return_http_data_only=params.get('_return_http_data_only', True)\n File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 345, in call_api\n _preload_content, _request_timeout)\n File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 176, in __call_api\n _request_timeout=_request_timeout)\n File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 366, in request\n headers=headers)\n File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line 241, in GET\n query_params=query_params)\n File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line 214, in request\n headers=headers)\n File "/usr/local/lib/python3.6/site-packages/urllib3/request.py", line 75, in request\n method, url, fields=fields, headers=headers, **urlopen_kw\n File "/usr/local/lib/python3.6/site-packages/urllib3/request.py", line 96, in request_encode_url\n return self.urlopen(method, url, **extra_kw)\n File "/usr/local/lib/python3.6/site-packages/urllib3/poolmanager.py", line 375, in urlopen\n response = conn.urlopen(method, u.request_uri, **kw)\n File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 796, in urlopen\n **response_kw\n File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 796, in urlopen\n **response_kw\n File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 796, in urlopen\n **response_kw\n File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen\n method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]\n File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 573, in increment\n raise MaxRetryError(_pool, url, error or ResponseError(cause))\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='127.0.0.1', port=8443): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f275c5bc940>: Failed to establish a

" Steps to Reproduce

  1. run ./bin/arnold bootstrap -c eugene -e development -k 127.0.0.1

Environment

  • Arnold version: v5.25.0
  • Platform: Debian

Possible Solution

Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

iliemihai avatar May 11 '21 22:05 iliemihai

Hi @iliemihai :wave:

Have you tried to bootstrap the project without the -k argument?

./bin/arnold bootstrap -c eugene -e development

jmaupetit avatar May 12 '21 15:05 jmaupetit

Hello @jmaupetit :D. Yes, I have tried but the problem still persists. I have followed all the steps in README, but when I call bin/arnold bootstrap -c eugene -e development the same error occurs. Can you please help me with a work around. Thank you for you re quick response :)

iliemihai avatar May 13 '21 00:05 iliemihai

@jmaupetit can you please check if it is reproducible in your environment? I had struggled with this issue for the past 2 weeks :D

iliemihai avatar May 13 '21 16:05 iliemihai

@jmaupetit I have managed to find the bug, kubernetes 12.0.0 API has a bug in it. It connects to host only on port 80 and it can t connect on local Openshift cluster on port 8443. A workaround is to downgrade kubernetes to version 11.0.0 and openshift 0.11.2. I have tested locally with command ansilbe-playbook bootstrap.yml -e development -c arnold and it worked, but I am having problems running bin/arnold bootstrap -c CUSTOMER -e ENVIRONMENT.

Could someone please help with setting up an Arnold demo with EDX, Richie, Marsha, Joanie, on local Openshift cluster. I am willing to test/update code :D.

iliemihai avatar May 16 '21 20:05 iliemihai

We are truly sorry for our outdated documentation. Here is a quick start guide that I hope will help you getting started.

You should first download the latest oc 3.x release we support from its official repository: https://github.com/openshift/origin/releases/tag/v3.11.0

Once installed make sure your version match the following:

$ oc version
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Once oc is installed, we will use it to start a local OKD cluster using our Makefile ad hoc target:

$ make cluster

You can grab a tea or coffee from here (depending on your configuration, it can take a while to boot).

Once the cluster is up and running, we can deploy our first application using the bin/arnold script:

$ bin/arnold bootstrap -c eugene -e development -a hello

N.B: you may want to deploy another application by changing the -a option, e.g. -a richie.

This is just a quick start guide; from now, I invite you to explore the bin/arnold -h command to explore Arnold possibilities.

Note that we are migrating from Openshift to Kubernetes (see #620). This is a major refactoring of this project. Our objective is to write a complete documentation once this has been merged to the master branch. :crossed_fingers:

jmaupetit avatar May 17 '21 12:05 jmaupetit

I don't know if it's really the place for me to ask my question, but during the same process of running up a dev version of arnold. I end up having some issues when boostraping my cluster, due to arnold requesting my cluster with a self signed certificate (and not ignoring it)

HTTPSConnectionPool(host='10.0.2.15', port=8443): Max retries exceeded with url: /version (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

Is there a possiblity to ignore the verification, or did I miss something during my bootstrap ? Thansk a lot for your work !

IDerr avatar Jun 22 '21 20:06 IDerr

Have you check that the K8S_AUTH_VERIFY_SSL environment variable is defined and set to "no"? Note that it should be defined if you sourced the bin/activate script.

jmaupetit avatar Jun 23 '21 08:06 jmaupetit

I did not, but now it is working perfectly ! Thanks for the help :)

IDerr avatar Jun 25 '21 10:06 IDerr