syncthingmanager icon indicating copy to clipboard operation
syncthingmanager copied to clipboard

Raspbian: Max retries exceeded with url error

Open korroziveLab opened this issue 8 years ago • 1 comments

Hi there

I'm using stman in a raspbian machine:

  1. $uname -sr: Linux 4.9.35-v7+

  2. $cat /etc/os-release: PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

3.$python3: Python 3.4.2 (default, Oct 19 2014, 13:31:11) [GCC 4.9.1] on linux

4.$pip --version pip 9.0.1 from /usr/local/lib/python3.4/dist-packages/pip-9.0.1-py3.4.egg (python 3.4)

5.$syncthing --version syncthing v0.14.33 "Dysprosium Dragonfly" (go1.8.3 linux-arm) deb@9b8983e226ea 2017-07-13 06:55:12 UTC [noupgrade]

Everytime i try any stman command i got this error:

HTTPConnectionPool(host='localhost', port=8384): Max retries exceeded with url: /rest/system/config (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7615d4b0>: Failed to establish a new connection: [Errno 111] Connection refused',)) Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/usr/local/lib/python3.4/dist-packages/urllib3/util/connection.py", line 83, in create_connection raise err File "/usr/local/lib/python3.4/dist-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 357, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.4/http/client.py", line 1090, in request self._send_request(method, url, body, headers) File "/usr/lib/python3.4/http/client.py", line 1128, in _send_request self.endheaders(body) File "/usr/lib/python3.4/http/client.py", line 1086, in endheaders self._send_output(message_body) File "/usr/lib/python3.4/http/client.py", line 924, in _send_output self.send(msg) File "/usr/lib/python3.4/http/client.py", line 859, in send self.connect() File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 166, in connect conn = self._new_conn() File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7615d4b0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 440, in send timeout=timeout File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.4/dist-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8384): Max retries exceeded with url: /rest/system/config (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7615d4b0>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/syncthing/init.py", line 200, in _request headers=headers File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 508, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8384): Max retries exceeded with url: /rest/system/config (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7615d4b0>: Failed to establish a new connection: [Errno 111] Connection refused',)) HTTPConnectionPool(host='localhost', port=8384): Max retries exceeded with url: /rest/system/config (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7615d4b0>: Failed to establish a new connection: [Errno 111] Connection refused',))

Thanks in advance

korroziveLab avatar Aug 05 '17 20:08 korroziveLab

Since the API connection isn't working, it's probably a configuration problem. First make sure Syncthing is running. Then check that the port used is the correct one. It's the same as the GUI port, which appears in the output of the syncthing command (check with journalctl -u syncthing if you start it as a system unit named syncthing). Correct the port in ~/.config/syncthingmanager/syncthingmanager.conf if needed.

stman can't autodetect the API key if Syncthing runs under a different user, so you may need to correct that in syncthingmanager.conf as well. A quick way to get it without using the GUI is (for example) xmllint --xpath "string(//gui[1]/apikey)" /home/syncthing/.config/syncthing/config.xml.

classicsc avatar Aug 06 '17 19:08 classicsc