mynodebtc / mynode

The easiest way to run Bitcoin and Lightning!
Other
637 stars 145 forks source link

LNDHub Fails to start on fresh install #378

Open maltokyo opened 4 years ago

maltokyo commented 4 years ago

Logs below, had red traffic light and the logs look like this.

admin@myNode:~$ tail -f /home/bitcoin/.npm/_logs/2020-08-02T11_51_20_193Z-debug.log
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v11.15.0
19 verbose npm  v6.7.0
20 error code ELIFECYCLE
21 error errno 5
22 error LndHub@1.2.0 start: `babel-node index.js`
22 error Exit status 5
23 error Failed at the LndHub@1.2.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 5, true ]

Log from mynode UI:

-- Logs begin at Sun 2020-08-02 03:48:00 CDT, end at Sun 2020-08-02 06:52:00 CDT. --
Aug 02 06:51:20 myNode systemd[1]: lndhub.service: Failed with result 'exit-code'.
Aug 02 06:51:20 myNode systemd[1]: lndhub.service: Main process exited, code=exited, status=5/NOTINSTALLED
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR!     /home/bitcoin/.npm/_logs/2020-08-02T11_51_20_193Z-debug.log
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR! A complete log of this run can be found in:
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR! Failed at the LndHub@1.2.0 start script.
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR!
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR! Exit status 5
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR! LndHub@1.2.0 start: `babel-node index.js`
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR! errno 5
Aug 02 06:51:20 myNode lndhub[4293]: npm ERR! code ELIFECYCLE
Aug 02 06:51:20 myNode lndhub[4293]: redis failure
Aug 02 06:51:20 myNode lndhub[4293]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1088:14)
Aug 02 06:51:20 myNode lndhub[4293]: [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
Aug 02 06:51:20 myNode lndhub[4293]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1088:14)
Aug 02 06:51:20 myNode lndhub[4293]: [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
Aug 02 06:51:19 myNode lndhub[4293]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1088:14)
tehelsper commented 4 years ago

Is there more to the log? It looks like redis may not be installed and running properly.

Can you run and share the output:

sudo systemctl status redis

maltokyo commented 4 years ago

Hi @tehelsper

Nothing more in the mynode logs, thats it.

The output of sudo systemctl status redis is (looks like filesystem error? This was working prior to recent upgrade) as follows:

root@myNode:~# systemctl status redis
● redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
   Active: deactivating (stop-sigterm) (Result: timeout)
     Docs: http://redis.io/documentation,
           man:redis-server(1)
Cntrl PID: 4320 (redis-server)
    Tasks: 4 (limit: 4915)
   Memory: 7.0M
   CGroup: /system.slice/redis-server.service
           └─4320 /usr/bin/redis-server 127.0.0.1:6379

Aug 03 04:50:31 myNode redis-server[4320]: 4320:M 03 Aug 2020 04:50:31.384 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo neve
Aug 03 04:50:31 myNode redis-server[4320]: 4320:M 03 Aug 2020 04:50:31.384 * DB loaded from disk: 0.000 seconds
Aug 03 04:50:31 myNode redis-server[4320]: 4320:M 03 Aug 2020 04:50:31.384 * Ready to accept connections
Aug 03 04:52:01 myNode systemd[1]: redis-server.service: Start operation timed out. Terminating.
Aug 03 04:52:01 myNode redis-server[4320]: 4320:signal-handler (1596448321) Received SIGTERM scheduling shutdown...
Aug 03 04:52:01 myNode redis-server[4320]: 4320:M 03 Aug 2020 04:52:01.490 # User requested shutdown...
Aug 03 04:52:01 myNode redis-server[4320]: 4320:M 03 Aug 2020 04:52:01.490 * Saving the final RDB snapshot before exiting.
Aug 03 04:52:01 myNode redis-server[4320]: 4320:M 03 Aug 2020 04:52:01.490 # Failed opening the RDB file dump.rdb (in server root dir /mnt/hdd/mynode/redis) for saving: Read-only file system
Aug 03 04:52:01 myNode redis-server[4320]: 4320:M 03 Aug 2020 04:52:01.490 # Error trying to save the DB, can't exit.
Aug 03 04:52:01 myNode redis-server[4320]: 4320:M 03 Aug 2020 04:52:01.490 # SIGTERM received but errors trying to shut down the server, check the logs for more information
tehelsper commented 4 years ago

Is anything else not working? It is very unusual that it would think /mnt/hdd/mynode/redis is read-only if other apps are using the external drive properly.

You could try deleting the database file (dump.rdb) and that may help, but you would lose info stored in lndhub.

tehelsper commented 3 years ago

Added detection for read-only issues of the external drive.