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.

Oct 18 22:03:02 Project-db1 patroni[534]: 2019-10-18 22:03:02,882 WARNING: Exception happened during processing of request from 10.x.x.10:49050
Oct 18 22:03:02 Project-db1 patroni[534]: 2019-10-18 22:03:02,890 WARNING: Exception happened during processing of request from 10.x.x.10:49056
Oct 18 22:03:02 Project-db1 patroni[534]: 2019-10-18 22:03:02,893 ERROR:
Oct 18 22:03:02 Project-db1 patroni[534]: Traceback (most recent call last):
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/dcs/etcd.py", line 339, in wrapper
Oct 18 22:03:02 Project-db1 patroni[534]:     retval = func(self, *args, **kwargs) is not None
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/dcs/etcd.py", line 538, in _update_leader
Oct 18 22:03:02 Project-db1 patroni[534]:     return self.retry(self._client.test_and_set, self.leader_path, self._name, self._name, self._ttl)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/dcs/etcd.py", line 323, in retry
Oct 18 22:03:02 Project-db1 patroni[534]:     return self._retry.copy()(*args, **kwargs)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/utils.py", line 313, in __call__
Oct 18 22:03:02 Project-db1 patroni[534]:     return func(*args, **kwargs)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/etcd/client.py", line 703, in test_and_set
Oct 18 22:03:02 Project-db1 patroni[534]:     return self.write(key, value, prevValue=prev_value, ttl=ttl)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/etcd/client.py", line 500, in write
Oct 18 22:03:02 Project-db1 patroni[534]:     response = self.api_execute(path, method, params=params)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/dcs/etcd.py", line 218, in api_execute
Oct 18 22:03:02 Project-db1 patroni[534]:     return self._handle_server_response(response)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/etcd/client.py", line 987, in _handle_server_response
Oct 18 22:03:02 Project-db1 patroni[534]:     etcd.EtcdError.handle(r)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/etcd/__init__.py", line 306, in handle
Oct 18 22:03:02 Project-db1 patroni[534]:     raise exc(msg, payload)
Oct 18 22:03:02 Project-db1 patroni[534]: etcd.EtcdCompareFailed: Compare failed : [n32-Project-db1 != m9-Project-db2]
Oct 18 22:03:02 Project-db1 patroni[534]: 2019-10-18 22:03:02,897 WARNING: Exception happened during processing of request from 10.x.x.66:45956
Oct 18 22:03:02 Project-db1 patroni[534]: 2019-10-18 22:03:02,900 WARNING: Traceback (most recent call last):
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 650, in process_request_thread
Oct 18 22:03:02 Project-db1 patroni[534]:     self.finish_request(request, client_address)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
Oct 18 22:03:02 Project-db1 patroni[534]:     self.RequestHandlerClass(request, client_address, self)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
Oct 18 22:03:02 Project-db1 patroni[534]:     self.handle()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/http/server.py", line 426, in handle
Oct 18 22:03:02 Project-db1 patroni[534]:     self.handle_one_request()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
Oct 18 22:03:02 Project-db1 patroni[534]:     method()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 129, in do_GET
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_status_response(status_code, response)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 85, in _write_status_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_json_response(status_code, response)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 50, in _write_json_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_response(status_code, json.dumps(response), content_type='application/json')
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 47, in _write_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self.wfile.write(body.encode('utf-8'))
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 799, in write
Oct 18 22:03:02 Project-db1 patroni[534]:     self._sock.sendall(b)
Oct 18 22:03:02 Project-db1 patroni[534]: BrokenPipeError: [Errno 32] Broken pipe
Oct 18 22:03:02 Project-db1 patroni[534]: 2019-10-18 22:03:02,900 WARNING: Traceback (most recent call last):
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 650, in process_request_thread
Oct 18 22:03:02 Project-db1 patroni[534]:     self.finish_request(request, client_address)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
Oct 18 22:03:02 Project-db1 patroni[534]:     self.RequestHandlerClass(request, client_address, self)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
Oct 18 22:03:02 Project-db1 patroni[534]:     self.handle()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/http/server.py", line 426, in handle
Oct 18 22:03:02 Project-db1 patroni[534]:     self.handle_one_request()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
Oct 18 22:03:02 Project-db1 patroni[534]:     method()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 129, in do_GET
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_status_response(status_code, response)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 85, in _write_status_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_json_response(status_code, response)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 50, in _write_json_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_response(status_code, json.dumps(response), content_type='application/json')
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 47, in _write_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self.wfile.write(body.encode('utf-8'))
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 799, in write
Oct 18 22:03:02 Project-db1 patroni[534]:     self._sock.sendall(b)
Oct 18 22:03:02 Project-db1 patroni[534]: BrokenPipeError: [Errno 32] Broken pipe
Oct 18 22:03:02 Project-db1 patroni[534]: 2019-10-18 22:03:02,904 WARNING: Traceback (most recent call last):
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 650, in process_request_thread
Oct 18 22:03:02 Project-db1 patroni[534]:     self.finish_request(request, client_address)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
Oct 18 22:03:02 Project-db1 patroni[534]:     self.RequestHandlerClass(request, client_address, self)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
Oct 18 22:03:02 Project-db1 patroni[534]:     self.handle()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/http/server.py", line 426, in handle
Oct 18 22:03:02 Project-db1 patroni[534]:     self.handle_one_request()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
Oct 18 22:03:02 Project-db1 patroni[534]:     method()
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 140, in do_GET_patroni
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_status_response(200, response)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 85, in _write_status_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_json_response(status_code, response)
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 50, in _write_json_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self._write_response(status_code, json.dumps(response), content_type='application/json')
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3/dist-packages/patroni/api.py", line 47, in _write_response
Oct 18 22:03:02 Project-db1 patroni[534]:     self.wfile.write(body.encode('utf-8'))
Oct 18 22:03:02 Project-db1 patroni[534]:   File "/usr/lib/python3.7/socketserver.py", line 799, in write
Oct 18 22:03:02 Project-db1 patroni[534]:     self._sock.sendall(b)
Oct 18 22:03:02 Project-db1 patroni[534]: BrokenPipeError: [Errno 32] Broken pipe

10.x.x.10 - This is local ip, 10.x.x.10:49050 i think this is curl(“curl --fail --verbose --max-time 2 http://10.10.16.10:8008/”). It runs every 2 sec, to monitor status primary/standby. 10.x.x.66 - This is ip from second postgresql server

There was uptime about 1 month, and suddenly this crush.

ii postgresql-10 10.10-1.pgdg100+1 amd64 ii patroni 1.6.0-2.pgdg100+1 all ii etcd 3.2.26+dfsg-3 all

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
CyberDem0ncommented, Oct 19, 2019

When you make ttl too small you increase a chance of false positives. System becomes more critical to a good network and so on. I would personally never make ttl smaller than 20 seconds. Sometimes we even increase it to 1 minute.

1reaction
CyberDem0ncommented, Nov 3, 2019

Yes, that one line fix should help

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crush (2022) - IMDb
An aspiring young artist joins her high school track team and later discovers what real love feels like when she finds herself falling...
Read more >
Crush Definition & Meaning - Merriam-Webster
Kids Definition ; 1 · an act of crushing ; 2 · a crowding together of many people ; 3 · a strong...
Read more >
Watch Crush Streaming Online | Hulu (Free Trial)
Start your free trial to watch Crush and other popular TV shows and movies including new releases, classics, Hulu Originals, and more. It's...
Read more >
Meaning of crush in English - Cambridge Dictionary
crush meaning: 1. to press something very hard so that it is broken or its shape is destroyed: 2. to press paper…. Learn...
Read more >
Crush Restaurant – Chico, CA
Crush Restaurant – Chico, CA Logo · MENU · DINNER · DESSERT · COCKTAILS · WINE · BEER · LOCATION · RESERVATIONS ·...
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