Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to postgresql-k8s #864

Open
jneo8 opened this issue Nov 28, 2022 · 0 comments
Open

Failed to connect to postgresql-k8s #864

jneo8 opened this issue Nov 28, 2022 · 0 comments

Comments

@jneo8
Copy link

jneo8 commented Nov 28, 2022

Got error when deploy with postgresql-k8s --channel=edge
The jimm is build from the latest master branch source code.

juju relate postgresql-k8s:db-admin juju-jimm-k8s:db
2022-11-28T03:46:33.292Z [container-agent] 2022-11-28 03:46:33 ERROR juju.worker.uniter.operation runhook.go:140 hook "config-changed" (via hook dispatching script: dispatch) failed: exit status 1
2022-11-28T03:46:33.301Z [container-agent] 2022-11-28 03:46:33 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "config-changed" hook
2022-11-28T03:46:38.341Z [container-agent] 2022-11-28 03:46:38 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "config-changed" hook
2022-11-28T03:46:38.797Z [container-agent] 2022-11-28 03:46:38 ERROR juju-log Uncaught exception while in charm code:
2022-11-28T03:46:38.797Z [container-agent] Traceback (most recent call last):
2022-11-28T03:46:38.797Z [container-agent]   File "./src/charm.py", line 505, in <module>
2022-11-28T03:46:38.797Z [container-agent]     main(JimmOperatorCharm)
2022-11-28T03:46:38.797Z [container-agent]   File "/var/lib/juju/agents/unit-juju-jimm-k8s-0/charm/venv/ops/main.py", line 436, in main
2022-11-28T03:46:38.797Z [container-agent]     framework.reemit()
2022-11-28T03:46:38.797Z [container-agent]   File "/var/lib/juju/agents/unit-juju-jimm-k8s-0/charm/venv/ops/framework.py", line 866, in reemit
2022-11-28T03:46:38.797Z [container-agent]     self._reemit()
2022-11-28T03:46:38.797Z [container-agent]   File "/var/lib/juju/agents/unit-juju-jimm-k8s-0/charm/venv/ops/framework.py", line 931, in _reemit
2022-11-28T03:46:38.797Z [container-agent]     custom_handler(event)
2022-11-28T03:46:38.797Z [container-agent]   File "./src/charm.py", line 52, in decorated
2022-11-28T03:46:38.797Z [container-agent]     return method(self, event)
2022-11-28T03:46:38.797Z [container-agent]   File "./src/charm.py", line 124, in _on_leader_elected
2022-11-28T03:46:38.797Z [container-agent]     self._update_workload(event)
2022-11-28T03:46:38.797Z [container-agent]   File "./src/charm.py", line 267, in _update_workload
2022-11-28T03:46:38.797Z [container-agent]     container.start("jimm")
2022-11-28T03:46:38.797Z [container-agent]   File "/var/lib/juju/agents/unit-juju-jimm-k8s-0/charm/venv/ops/model.py", line 1448, in start
2022-11-28T03:46:38.797Z [container-agent]     self._pebble.start_services(service_names)
2022-11-28T03:46:38.797Z [container-agent]   File "/var/lib/juju/agents/unit-juju-jimm-k8s-0/charm/venv/ops/pebble.py", line 1659, in start_services
2022-11-28T03:46:38.797Z [container-agent]     return self._services_action('start', services, timeout, delay)
2022-11-28T03:46:38.797Z [container-agent]   File "/var/lib/juju/agents/unit-juju-jimm-k8s-0/charm/venv/ops/pebble.py", line 1721, in _services_action
2022-11-28T03:46:38.797Z [container-agent]     raise ChangeError(change.err, change)
2022-11-28T03:46:38.797Z [container-agent] ops.pebble.ChangeError: cannot perform the following tasks:
2022-11-28T03:46:38.797Z [container-agent] - Start service "jimm" (cannot start service: exited quickly with code 1)
2022-11-28T03:46:38.797Z [container-agent] ----- Logs from task 0 -----
2022-11-28T03:46:38.797Z [container-agent] 2022-11-28T03:46:38Z INFO Most recent service output:
2022-11-28T03:46:38.797Z [container-agent]     {"level":"info","ts":"2022-11-28T03:46:38.764Z","msg":"connecting database"}
2022-11-28T03:46:38.797Z [container-agent]     {"level":"error","ts":"2022-11-28T03:46:38.772Z","msg":"failed to initialize database, got error failed to connect to `host=postgresql-k8s-primary.jimm.svc.cluster.local user=relation_id_12 database=jimm`: server error (FATAL: unrecognized configuration parameter \"fallback_application_name\" (SQLSTATE 42704))"}
2022-11-28T03:46:38.797Z [container-agent]     {"level":"error","ts":"2022-11-28T03:46:38.772Z","msg":"shutdown","error":"failed to connect to `host=postgresql-k8s-primary.jimm.svc.cluster.local user=relation_id_12 database=jimm`: server error (FATAL: unrecognized configuration parameter \"fallback_application_name\" (SQLSTATE 42704))"}
2022-11-28T03:46:38.797Z [container-agent] 2022-11-28T03:46:38Z ERROR cannot start service: exited quickly with code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant