crossminer / scava-deployment

This repository contains the Docker configuration files for the deployment of Scava platform
Eclipse Public License 2.0
2 stars 9 forks source link

ProSoul integration : wrong ES URL #44

Closed mhow2 closed 5 years ago

mhow2 commented 5 years ago

with the current deployment (from dev branch), when trying to access the "edit" section of ProSoul I get the following exception:

prosoul_1         | WARNING:elasticsearch:GET https://localhost:9200/scava-metrics/_search?scroll=1m&size=10 [status:N/A request:0.000s]
prosoul_1         | Traceback (most recent call last):
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 159, in _new_conn
prosoul_1         |     (self._dns_host, self.port), self.timeout, **extra_kw)
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/util/connection.py", line 80, in create_connection
prosoul_1         |     raise err
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/util/connection.py", line 70, in create_connection
prosoul_1         |     sock.connect(sa)
prosoul_1         | ConnectionRefusedError: [Errno 111] Connection refused
prosoul_1         | 
prosoul_1         | During handling of the above exception, another exception occurred:
prosoul_1         | 
prosoul_1         | Traceback (most recent call last):
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/elasticsearch/connection/http_urllib3.py", line 172, in perform_request
prosoul_1         |     response = self.pool.urlopen(method, url, body, retries=Retry(False), headers=request_headers, **kw)
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
prosoul_1         |     _stacktrace=sys.exc_info()[2])
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 343, in increment
prosoul_1         |     raise six.reraise(type(error), error, _stacktrace)
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/packages/six.py", line 686, in reraise
prosoul_1         |     raise value
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
prosoul_1         |     chunked=chunked)
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 343, in _make_request
prosoul_1         |     self._validate_conn(conn)
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 839, in _validate_conn
prosoul_1         |     conn.connect()
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 301, in connect
prosoul_1         |     conn = self._new_conn()
prosoul_1         |   File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 168, in _new_conn
prosoul_1         |     self, "Failed to establish a new connection: %s" % e)
prosoul_1         | urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fc1639be780>: Failed to establish a new connection: [Errno 111] Connection refused

"localhost" in the context of the docker stack and to the prosoul container isn't valid. Eg. ProSoul's container doesn't run ES. I guess the good value could be either the name of the ES container as defined in compose : elasticsearch , or the public URL/name of the SCAVA deployment.

valeriocos commented 5 years ago

A new image of prosoul is available at https://hub.docker.com/r/bitergia/prosoul

Please @mhow2 could you check if this works for you? Thanks

Find below the part to be changed in the docker-compose in scava-deployment:

prosoul:
        image: bitergia/prosoul
        ports:
         - "8000:8000"
        depends_on:
         - kibiter
         - elasticsearch
        environment:
         - ALLOWED_HOSTS=prosoul localhost 127.0.0.1
         - ES_URL=https://admin:admin@elasticsearch:9200
         - KIBITER_URL=https://kibiter:80
mhow2 commented 5 years ago

It seems to work ! thanks.

valeriocos commented 5 years ago

Thank you @dlumbrer and @mhow2 . I have just submitted a PR to update the docker-compose: https://github.com/crossminer/scava-deployment/pull/45

@mhow2 since you have already test it, could you review the PR ?