lightninglabs / loop

Lightning Loop: A Non-Custodial Off/On Chain Bridge
MIT License
558 stars 116 forks source link

LOOPD fails with - address already in use #260

Closed marssystems closed 4 years ago

marssystems commented 4 years ago

When starting loopd, I get this error -

admin@raspberrypi:~ $ loopd 2020-07-27 11:00:50.393 [INF] LOOPD: Version: 0.7.0-beta commit= 2020-07-27 11:00:50.394 [INF] LNDC: Creating lnd connection to localhost:10009 2020-07-27 11:00:50.395 [INF] LNDC: Connected to lnd 2020-07-27 11:00:57.621 [INF] LNDC: lnd version: v0.10.4-beta, build tags 'autopilotrpc,signrpc,walletrpc,chainrpc,invoicesrpc,watchtowerrpc' 2020-07-27 11:00:57.621 [INF] LNDC: Using network mainnet 2020-07-27 11:00:57.621 [INF] LOOPD: Swap server address: swap.lightning.today:11010 2020-07-27 11:00:57.632 [INF] STORE: Checking for schema update: latest_version=4, db_version=4 2020-07-27 11:00:57.633 [INF] LOOPD: Starting gRPC listener 2020-07-27 11:00:57.633 [ERR] LOOPD: Error while starting daemon: 2020-07-27 11:00:57.634 [INF] LOOPD: Starting swap client 2020-07-27 11:00:57.634 [INF] LOOP: Connected to lnd node 'MarsSystems1Routing' with pubkey XXXXXXXXXXXXXXXXXXXX (version v0.10.4-beta, build tags 'autopilotrpc,signrpc,walletrpc,chainrpc,invoicesrpc,watchtowerrpc') 2020-07-27 11:00:57.634 [INF] LOOP: Wait for first block ntfn 2020-07-27 11:00:57.635 [INF] LOOPD: Waiting for updates 2020-07-27 11:00:57.635 [INF] LOOPD: Stopping gRPC server 2020-07-27 11:00:57.635 [INF] LOOPD: Stopping REST server 2020-07-27 11:00:57.635 [INF] LOOP: Swap client terminating 2020-07-27 11:00:57.635 [INF] LOOP: Swap client terminated 2020-07-27 11:00:57.635 [INF] LOOPD: Swap client stopped 2020-07-27 11:00:57.635 [INF] LOOPD: Daemon exited loopd exited with an error: RPC server unable to listen on localhost:11010: listen tcp 127.0.0.1:11010: bind: address already in use admin@raspberrypi:~ $

How can I fix this?

halseth commented 4 years ago

Change your listening port to something unique, you might have something else running on that port.

marssystems commented 4 years ago

I am running the standard RaspiBlitz build - v1.5.1 - so there shouldn't be anything using port 11010. I will check with RaspiBlitz support.

guggero commented 4 years ago

Maybe another instance of loopd already running? Check with ps -ef.

marssystems commented 4 years ago

OK - found this -

bitcoin 2062 1 0 10:40 ? 00:00:02 /usr/local/gocode/bin/loopd --network=mainnet

guggero commented 4 years ago

Yes, you need to stop that first. For example with sudo kill 2062.

Closing the issue as this is not a loop problem.

frennkie commented 4 years ago

Just in case anybody else finds this issue.

On RaspiBlitz we are using a systemd service file to run loopd. I saw at least one user following the loopd "getting started" instructions which ask to run loopd & - which in that case conflicted with the already running process from systemd.