Merge ~rmescandon/influxdb-charm/+git/influxdb-charm:fix-connection-refused-on-install into influxdb-charm:master
Status: | Merged |
---|---|
Approved by: | Nick Moffitt |
Approved revision: | a547303915cf5bca1702712bd2de5c3e75f4a902 |
Merged at revision: | eb3d41a350215d7b3312ea341e4ff03c48284845 |
Proposed branch: | ~rmescandon/influxdb-charm/+git/influxdb-charm:fix-connection-refused-on-install |
Merge into: | influxdb-charm:master |
Diff against target: |
26 lines (+14/-1) 1 file modified
lib/influxdbcharmlib.py (+14/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
InfluxDB Charmers | Pending | ||
Review via email: mp+353264@code.launchpad.net |
Commit message
From version 16 of the charm (the last not happening this problem) we have seen this error sometimes when installing from a bundle:
```
unit-influxdb-9: 17:48:10 ERROR unit.influxdb/
Traceback (most recent call last):
File "/usr/lib/
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/
raise err
File "/usr/lib/
sock.
ConnectionRefus
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
body=body, headers=headers)
File "/usr/lib/
conn.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.send(msg)
File "/usr/lib/
self.connect()
File "/usr/lib/
conn = self._new_conn()
File "/usr/lib/
self, "Failed to establish a new connection: %s" % e)
requests.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
timeout=timeout
File "/usr/lib/
_stacktrace
File "/usr/lib/
raise MaxRetryError(
requests.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
configure_
File "/var/lib/
create_
File "lib/influxdbch
influx.
File "/usr/lib/
self.
File "/usr/lib/
expected_
File "/usr/lib/
raise e
File "/usr/lib/
timeout=
File "/usr/lib/
resp = self.send(prep, **send_kwargs)
File "/usr/lib/
r = adapter.
File "/usr/lib/
raise ConnectionError(e, request=request)
requests.
```
I've realized that after starting influxdb.service the service is not fully ready (even when systemctl status says so) to be used by influxDBClient. Repeating the auth creation up to 3 times max solves the problem. In all my tests only first time fails sometimes
NOTE: Looks like the version 16 hadn't this problem because it executed several instructions of diverse complexity between service startup and auth configuration
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.