Comments (4)
Adding [email protected]
to Wants
and After
to my /etc/systemd/system/blitzapi.service
systemd-Unit helped.
Now the API is working after restarting my node. No more toaster and errors in blitzapi.service
.
Maybe [email protected]
is doing something with the network-system of linux and than interrupts the API service.
[Unit]
Description=BlitzBackendAPI
Wants=network.target [email protected]
After=network.target mnt-hdd.mount [email protected]
[Service]
WorkingDirectory=/home/blitzapi/blitz_api
# before every start update the config with latest credentials/settings
ExecStartPre=-/home/admin/config.scripts/blitz.web.api.sh update-config
ExecStart=/usr/bin/python -m uvicorn app.main:app --port 11111 --host=0.0.0.0 --root-path /api
User=blitzapi
Group=blitzapi
Type=simple
Restart=always
StandardOutput=journal
StandardError=journal
RestartSec=60
# Hardening
PrivateTmp=true
[Install]
WantedBy=multi-user.target
from tunnelsats.
Fix is on the dev branch (1dffde4), needs some testing before its good to go for main branch
from tunnelsats.
sudo systemctl restart blitzapi
after unlocking the wallet, gets the API up and running again.
Okay, here some logs, where the API get stuck after a fresh restart:
Aug 24 21:47:40 raspberrypi python[1629363]: ERROR:asyncio:Task exception was never retrieved
Aug 24 21:47:40 raspberrypi python[1629363]: future: <Task finished name='Task-32' coro=<_handle_forward_event_listener() done, defined at ./app/repositories/lightning.py:236> exception=HTTPException(status_code=500, detail='htlc event subscription terminated')>
Aug 24 21:47:40 raspberrypi python[1629363]: Traceback (most recent call last):
Aug 24 21:47:40 raspberrypi python[1629363]: File "./app/repositories/ln_impl/lnd_grpc.py", line 687, in listen_forward_events
Aug 24 21:47:40 raspberrypi python[1629363]: async for e in _router_stub.SubscribeHtlcEvents(request):
Aug 24 21:47:40 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/grpc/aio/_call.py", line 326, in _fetch_stream_responses
Aug 24 21:47:40 raspberrypi python[1629363]: await self._raise_for_status()
Aug 24 21:47:40 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/grpc/aio/_call.py", line 236, in _raise_for_status
Aug 24 21:47:40 raspberrypi python[1629363]: raise _create_rpc_error(await self.initial_metadata(), await
Aug 24 21:47:40 raspberrypi python[1629363]: grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
Aug 24 21:47:40 raspberrypi python[1629363]: status = StatusCode.UNKNOWN
Aug 24 21:47:40 raspberrypi python[1629363]: details = "htlc event subscription terminated"
Aug 24 21:47:40 raspberrypi python[1629363]: debug_error_string = "{"created":"@1661374060.858941679","description":"Error received from peer ipv4:127.0.0.1:10009","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"htlc event subscription terminated","grpc_status":2}"
Aug 24 21:47:40 raspberrypi python[1629363]: >
Aug 24 21:47:40 raspberrypi python[1629363]: During handling of the above exception, another exception occurred:
Aug 24 21:47:40 raspberrypi python[1629363]: Traceback (most recent call last):
Aug 24 21:47:40 raspberrypi python[1629363]: File "./app/repositories/lightning.py", line 256, in _handle_forward_event_listener
Aug 24 21:47:40 raspberrypi python[1629363]: async for i in ln.listen_forward_events():
Aug 24 21:47:40 raspberrypi python[1629363]: File "./app/repositories/ln_impl/lnd_grpc.py", line 715, in listen_forward_events
Aug 24 21:47:40 raspberrypi python[1629363]: raise HTTPException(
Aug 24 21:47:40 raspberrypi python[1629363]: fastapi.exceptions.HTTPException: 500
Aug 24 21:47:54 raspberrypi python[1629363]: INFO: 127.0.0.1:43312 - "GET /lightning/list-all-tx?reversed=true HTTP/1.0" 200 OK
Aug 24 21:48:01 raspberrypi python[1629363]: ERROR:asyncio:Task exception was never retrieved
Aug 24 21:48:01 raspberrypi python[1629363]: future: <Task finished name='Task-30' coro=<_handle_info_listener() done, defined at ./app/repositories/lightning.py:207> exception=HTTPException(status_code=500, detail='failed to connect to all addresses')>
Aug 24 21:48:01 raspberrypi python[1629363]: Traceback (most recent call last):
Aug 24 21:48:01 raspberrypi python[1629363]: File "./app/repositories/ln_impl/lnd_grpc.py", line 600, in get_ln_info_impl
Aug 24 21:48:01 raspberrypi python[1629363]: response = await _lnd_stub.GetInfo(req)
Aug 24 21:48:01 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/grpc/aio/_call.py", line 290, in __await__
Aug 24 21:48:01 raspberrypi python[1629363]: raise _create_rpc_error(self._cython_call._initial_metadata,
Aug 24 21:48:01 raspberrypi python[1629363]: grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
Aug 24 21:48:01 raspberrypi python[1629363]: status = StatusCode.UNAVAILABLE
Aug 24 21:48:01 raspberrypi python[1629363]: details = "failed to connect to all addresses"
Aug 24 21:48:01 raspberrypi python[1629363]: debug_error_string = "{"created":"@1661374081.525292545","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3217,"referenced_errors":[{"created":"@1661374081.525289434","description":"failed to connect to all addresses","file":"src/core/lib/transport/error_utils.cc","file_line":165,"grpc_status":14}]}"
Aug 24 21:48:01 raspberrypi python[1629363]: >
Aug 24 21:48:01 raspberrypi python[1629363]: During handling of the above exception, another exception occurred:
Aug 24 21:48:01 raspberrypi python[1629363]: Traceback (most recent call last):
Aug 24 21:48:01 raspberrypi python[1629363]: File "./app/repositories/lightning.py", line 211, in _handle_info_listener
Aug 24 21:48:01 raspberrypi python[1629363]: info = await ln.get_ln_info_impl()
Aug 24 21:48:01 raspberrypi python[1629363]: File "./app/repositories/ln_impl/lnd_grpc.py", line 604, in get_ln_info_impl
Aug 24 21:48:01 raspberrypi python[1629363]: raise HTTPException(
Aug 24 21:48:01 raspberrypi python[1629363]: fastapi.exceptions.HTTPException: 500
Aug 24 21:48:02 raspberrypi python[1629363]: ERROR:asyncio:Task exception was never retrieved
Aug 24 21:48:02 raspberrypi python[1629363]: future: <Task finished name='Task-22' coro=<_handle_gather_bitcoin_status() done, defined at ./app/repositories/bitcoin.py:147> exception=ClientConnectorError(ConnectionKey(host='127.0.0.1', port=8332, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-5377278191959812478), ConnectionRefusedError(111, "Connect call failed ('127.0.0.1', 8332)"))>
Aug 24 21:48:02 raspberrypi python[1629363]: Traceback (most recent call last):
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
Aug 24 21:48:02 raspberrypi python[1629363]: return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
Aug 24 21:48:02 raspberrypi python[1629363]: raise exceptions[0]
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
Aug 24 21:48:02 raspberrypi python[1629363]: sock = await self._connect_sock(
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
Aug 24 21:48:02 raspberrypi python[1629363]: await self.sock_connect(sock, address)
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
Aug 24 21:48:02 raspberrypi python[1629363]: return await fut
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
Aug 24 21:48:02 raspberrypi python[1629363]: raise OSError(err, f'Connect call failed {address}')
Aug 24 21:48:02 raspberrypi python[1629363]: ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 8332)
Aug 24 21:48:02 raspberrypi python[1629363]: The above exception was the direct cause of the following exception:
Aug 24 21:48:02 raspberrypi python[1629363]: Traceback (most recent call last):
Aug 24 21:48:02 raspberrypi python[1629363]: File "./app/repositories/bitcoin.py", line 151, in _handle_gather_bitcoin_status
Aug 24 21:48:02 raspberrypi python[1629363]: info = await get_btc_info()
Aug 24 21:48:02 raspberrypi python[1629363]: File "./app/repositories/bitcoin.py", line 95, in get_btc_info
Aug 24 21:48:02 raspberrypi python[1629363]: binfo = await get_blockchain_info()
Aug 24 21:48:02 raspberrypi python[1629363]: File "./app/repositories/bitcoin.py", line 54, in get_blockchain_info
Aug 24 21:48:02 raspberrypi python[1629363]: result = await bitcoin_rpc_async("getblockchaininfo")
Aug 24 21:48:02 raspberrypi python[1629363]: File "./app/repositories/bitcoin_utils.py", line 72, in bitcoin_rpc_async
Aug 24 21:48:02 raspberrypi python[1629363]: async with session.post(bitcoin_config.rpc_url, data=data) as resp:
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/aiohttp/client.py", line 1138, in __aenter__
Aug 24 21:48:02 raspberrypi python[1629363]: self._resp = await self._coro
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/aiohttp/client.py", line 535, in _request
Aug 24 21:48:02 raspberrypi python[1629363]: conn = await self._connector.connect(
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 542, in connect
Aug 24 21:48:02 raspberrypi python[1629363]: proto = await self._create_connection(req, traces, timeout)
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 907, in _create_connection
Aug 24 21:48:02 raspberrypi python[1629363]: _, proto = await self._create_direct_connection(req, traces, timeout)
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
Aug 24 21:48:02 raspberrypi python[1629363]: raise last_exc
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
Aug 24 21:48:02 raspberrypi python[1629363]: transp, proto = await self._wrap_create_connection(
Aug 24 21:48:02 raspberrypi python[1629363]: File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
Aug 24 21:48:02 raspberrypi python[1629363]: raise client_error(req.connection_key, exc) from exc
Aug 24 21:48:02 raspberrypi python[1629363]: aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8332 ssl:default [Connect call failed ('127.0.0.1', 8332)]
Aug 24 21:48:09 raspberrypi systemd[1]: Stopping BlitzBackendAPI...
Aug 24 21:48:09 raspberrypi python[1629363]: INFO: Shutting down
Aug 24 21:48:09 raspberrypi python[1629363]: INFO:uvicorn.error:Shutting down
from tunnelsats.
The Toaster at the top right displays the status The UI gets from The blitzAPI which in turn gets it from the raspiblitz.
So looks like an issue that LND or at least the RPC service is not starting.
@rootzoll @fusion44 any ideas?
from tunnelsats.
Related Issues (20)
- Umbrel: Verify whether docker-compose restart lnd breaks the tunnel connection
- Logo proposal HOT 3
- Lightningd.service fail after installing Tunnelsats HOT 25
- Slow down Machine After Installing TunnelSats HOT 19
- Validate the hostname check for raspiblitz
- Add current bandwidth usage / month or available GB left in Renew section of the site
- Is there any ways to avoid using nftables? HOT 11
- set component requires nftables v0.9.7 and kernel 5.10 HOT 3
- WG conf file: incorrect AllowedIPs entry returned from VPN HOT 1
- Umbrel: curl / IP verification timing out HOT 1
- modprobe cls_cgroup: module not found in /lib/modules/ HOT 4
- WorldMapRenew: pointer events on map without functionality HOT 1
- apt/apt-get and its usage in scripts
- setupv2.sh bug: misleading cln.service message HOT 1
- Add cstate / server states for public report on server status
- Separate Scripts for Available Projects
- Create an auto-setup script for new VPN servers with Ansible HOT 2
- adaption of the install script to run tunnelsats on openvz/lxc virtualised linux systems (like strato.de) HOT 2
- Layout broken for web on mobile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tunnelsats.