Open
Description
After rebooting server with ubuntu 20.04 amplify-agent
is not starting with following log:
-- Reboot -- Oct 16 16:55:56 d1 systemd[1]: Starting NGINX Amplify Agent... Oct 16 16:56:04 d1 amplify-agent[1954]: Something failed: Oct 16 16:56:04 d1 amplify-agent[1954]: Traceback (most recent call last): Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/amplify/agent/common/util/configreader.py", line 123, in test Oct 16 16:56:04 d1 amplify-agent[1954]: context.http_client.post('agent/', {}) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/amplify/agent/common/util/http.py", line 128, in post Oct 16 16:56:04 d1 amplify-agent[1954]: return self.make_request(url, 'post', data=data, timeout=timeout, json=json) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/amplify/agent/common/util/http.py", line 110, in make_request Oct 16 16:56:04 d1 amplify-agent[1954]: raise e Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/amplify/agent/common/util/http.py", line 94, in make_request Oct 16 16:56:04 d1 amplify-agent[1954]: r = self.session.post( Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post Oct 16 16:56:04 d1 amplify-agent[1954]: return self.request('POST', url, data=data, json=json, **kwargs) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request Oct 16 16:56:04 d1 amplify-agent[1954]: resp = self.send(prep, **send_kwargs) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send Oct 16 16:56:04 d1 amplify-agent[1954]: r = adapter.send(request, **kwargs) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send Oct 16 16:56:04 d1 amplify-agent[1954]: resp = conn.urlopen( Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen Oct 16 16:56:04 d1 amplify-agent[1954]: httplib_response = self._make_request( Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request Oct 16 16:56:04 d1 amplify-agent[1954]: self._validate_conn(conn) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn Oct 16 16:56:04 d1 amplify-agent[1954]: conn.connect() Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect Oct 16 16:56:04 d1 amplify-agent[1954]: conn = self._new_conn() Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn Oct 16 16:56:04 d1 amplify-agent[1954]: conn = connection.create_connection( Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 61, in create_connection Oct 16 16:56:04 d1 amplify-agent[1954]: for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/gevent/_socketcommon.py", line 212, in getaddrinfo Oct 16 16:56:04 d1 amplify-agent[1954]: addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/gevent/resolver/thread.py", line 65, in getaddrinfo Oct 16 16:56:04 d1 amplify-agent[1954]: return self.pool.apply(_socket.getaddrinfo, args, kwargs) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/gevent/pool.py", line 159, in apply Oct 16 16:56:04 d1 amplify-agent[1954]: return self.spawn(func, *args, **kwds).get() Oct 16 16:56:04 d1 amplify-agent[1954]: File "src/gevent/event.py", line 268, in gevent._event.AsyncResult.get Oct 16 16:56:04 d1 amplify-agent[1954]: File "src/gevent/event.py", line 296, in gevent._event.AsyncResult.get Oct 16 16:56:04 d1 amplify-agent[1954]: File "src/gevent/event.py", line 286, in gevent._event.AsyncResult.get Oct 16 16:56:04 d1 amplify-agent[1954]: File "src/gevent/event.py", line 266, in gevent._event.AsyncResult._raise_exception Oct 16 16:56:04 d1 amplify-agent[1954]: File "src/gevent/event.py", line 211, in gevent._event.AsyncResult.exc_info.__get__ Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 371, in g Oct 16 16:56:04 d1 amplify-agent[1954]: return f(a) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 432, in load_traceback Oct 16 16:56:04 d1 amplify-agent[1954]: return loads(s) Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 337, in unpickle_traceback Oct 16 16:56:04 d1 amplify-agent[1954]: return ret.as_traceback() Oct 16 16:56:04 d1 amplify-agent[1954]: File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 202, in as_traceback Oct 16 16:56:04 d1 amplify-agent[1954]: code = CodeType( Oct 16 16:56:04 d1 amplify-agent[1954]: TypeError: an integer is required (got type bytes) Oct 16 16:56:04 d1 systemd[1]: amplify-agent.service: Control process exited, code=exited, status=1/FAILURE Oct 16 16:56:04 d1 systemd[1]: amplify-agent.service: Failed with result 'exit-code'. Oct 16 16:56:04 d1 systemd[1]: Failed to start NGINX Amplify Agent.
After manually start with systemctl start amplify-agent
agent is working:
# systemctl status amplify-agent
● amplify-agent.service - NGINX Amplify Agent
Loaded: loaded (/lib/systemd/system/amplify-agent.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-10-16 17:43:59 MSK; 16min ago
Docs: https://amplify.nginx.com/docs/
Process: 521159 ExecStart=/etc/init.d/amplify-agent start (code=exited, status=0/SUCCESS)
Main PID: 521200 (amplify-agent)
Tasks: 2 (limit: 76906)
Memory: 38.7M
CGroup: /system.slice/amplify-agent.service
└─521200 amplify-agent
Oct 16 17:43:58 d1 systemd[1]: Starting NGINX Amplify Agent...
Oct 16 17:43:59 d1 systemd[1]: amplify-agent.service: Can't open PID file /run/amplify-agent/amplify-agent.pid (yet?) after start: Operation not permitted
Oct 16 17:43:59 d1 systemd[1]: Started NGINX Amplify Agent.
# ls -la /run/amplify-agent
total 4
drwxr-xr-x 2 nginx root 60 Oct 16 17:43 .
drwxr-xr-x 31 root root 960 Oct 16 17:51 ..
-rw-r--r-- 1 nginx nginx 7 Oct 16 17:43 amplify-agent.pid
Metadata
Metadata
Assignees
Labels
No labels