question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't start patroni service

See original GitHub issue

sudo vi /etc/patroni/config.yml

zookeeper:
  hosts: [zk1:2181, zk2:2181, zk3:2181] #this is line 8 in below

start service failed:

● patroni.service - Runners to orchestrate a high-availability PostgreSQL
   Loaded: loaded (/lib/systemd/system/patroni.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-11-11 05:25:22 UTC; 843ms ago
  Process: 6474 ExecStart=/usr/bin/patroni /etc/patroni/config.yml (code=exited, status=1/FAILURE)
 Main PID: 6474 (code=exited, status=1/FAILURE)

Nov 11 05:25:22 pt1 patroni[6474]:     self.tokens.append(self.scan_plain())
Nov 11 05:25:22 pt1 patroni[6474]:   File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 1299, in scan_plain
Nov 11 05:25:22 pt1 patroni[6474]:     "Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.")
Nov 11 05:25:22 pt1 patroni[6474]: yaml.scanner.ScannerError: while scanning a plain scalar
Nov 11 05:25:22 pt1 patroni[6474]:   in "/etc/patroni/config.yml", line 8, column 11
Nov 11 05:25:22 pt1 patroni[6474]: found unexpected ':'
Nov 11 05:25:22 pt1 patroni[6474]:   in "/etc/patroni/config.yml", line 8, column 14
Nov 11 05:25:22 pt1 patroni[6474]: Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.
Nov 11 05:25:22 pt1 systemd[1]: patroni.service: Main process exited, code=exited, status=1/FAILURE
Nov 11 05:25:22 pt1 systemd[1]: patroni.service: Failed with result 'exit-code'.

I don’t have any clue why patroni can’t start, it indicate that some wrong with zookeeper connection string, but from patroni nodes (pt1, pt2) I can totally connect to zk nodes:

echo "ruok" | nc zk1 2181; echo
imok

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
CyberDem0ncommented, Nov 11, 2019

There is a way to figure out dependencies:

$ apt-cache show patroni
Package: patroni
Version: 1.6.0-4.pgdg18.04+1
Architecture: all
Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Installed-Size: 564
Depends: python3-cdiff, python3-click (>= 4.1), python3-dateutil,
 python3-prettytable (>= 0.7), python3-psutil, python3-requests,
 python3-six (>= 1.7), python3-tzlocal, python3-urllib3, python3-yaml,
 python3:any (>= 3.5~), lsb-base (>= 3.0-6), python3-psycopg2,
 python3-etcd (>= 0.4.3) | python3-consul (>= 0.7.0) | python3-kazoo | python3-kubernetes

python3-etcd (>= 0.4.3) | python3-consul (>= 0.7.0) | python3-kazoo | python3-kubernetes

If you want to improve the documentation - feel free top open a PR.

0reactions
tmpm697commented, Nov 11, 2019

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to run patroni - postgresql - Stack Overflow
I think the answer is obvious. If you start patroni with sudo , it will run as root, and that is exactly the...
Read more >
Unable to start Patroni after refreshing UAT postgres data ...
After refreshing your UAT Postgres instance (complete PGDATA structures) from PROD Postgres instance, Patroni doesn't want to start.
Read more >
a Patroni replica can become stuck unable to start ... - GitLab
If a Patroni replica becomes degraded to the point where it cannot recover using available WAL logs, gitlab-ctl reconfigure will make it ...
Read more >
Issue with Patroni - postgres not starting - DBA Stack Exchange
Stop and disable the postgresql service. Patroni is responsible for starting and stopping postgresql. If both services up you may end up ...
Read more >
Highly Available PostgreSQL with patroni - Server Fault
systemctl enable patroni.service # systemctl start patroni.service ... OSError: [Errno 99] Cannot assign requested address.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found