BTCPayServer Starting

BTCPayServer stuck on “starting…”

Im having trouble with BTCPayServer on Umbrel.

Its a fresh installation.

  1. Install Bitcoin (wait for it to sync) - works ok
  2. install lnd - works ok
  3. install BTCPayServer - says “starting”, will not start.

It is not reachable on port 3003, even though the logs says it is listening…

CONTAINER ID   IMAGE                               COMMAND                  CREATED         STATUS                          PORTS                                                                                                                                 NAMES
a2845b043e25   btcpayserver/btcpayserver:1.9.2     "dotnet BTCPayServer…"   6 minutes ago   Up 6 minutes                                                                                                                                                          btcpay-server_web_1
091cd1a06463   nicolasdorier/nbxplorer:2.3.62      "dotnet NBXplorer.dll"   6 minutes ago   Up 6 minutes                                                                                                                                                          btcpay-server_nbxplorer_1
88c1c50c1ef9   btcpayserver/postgres:13.7          "/migrate-docker-ent…"   6 minutes ago   Up 6 minutes                    5432/tcp                                                                                                                              btcpay-server_postgres_1

Logs BtcpayServer:
info: Configuration: Data Directory: /data
info: Configuration: Configuration File: /data/Main/settings.config
info: BTCPayServer.Plugins.PluginManager: Loading plugins from /data/plugins
info: BTCPayServer.Plugins.PluginManager: Adding and executing plugin BTCPayServer - 1.9.2
info: BTCPayServer.Plugins.PluginManager: Adding and executing plugin BTCPayServer.Plugins.Shopify - 1.9.2
info: BTCPayServer.Plugins.PluginManager: Adding and executing plugin BTCPayServer.Plugins.PointOfSale - 1.9.2
info: BTCPayServer.Plugins.PluginManager: Adding and executing plugin BTCPayServer.Plugins.PayButton - 1.9.2
info: BTCPayServer.Plugins.PluginManager: Adding and executing plugin BTCPayServer.Plugins.NFC - 1.9.2
info: BTCPayServer.Plugins.PluginManager: Adding and executing plugin BTCPayServer.Plugins.Crowdfund - 1.9.2
info: Configuration: Supported chains: BTC
info: Configuration: BTC: Explorer url is http://btcpay-server_nbxplorer_1:32838/
info: Configuration: BTC: Cookie file is /data/.nbxplorer/Main/.cookie
info: Configuration: Network: Mainnet
info: Configuration: Root Path: /
info: Configuration: Connection to NBXplorer’s database successful, dashboard and reporting features activated.
info: PayServer: Checking if any payment arrived on lightning while the server was offline…
info: PayServer: Processing lightning payments…
info: PayServer: Starting listening NBXplorer (BTC)
info: PayServer: Start watching invoices
info: PayServer: Starting payment request expiration watcher
info: PayServer: 0 pending payment requests being checked since last run
info: Configuration: Now listening on: http://0.0.0.0:3003
info: PayServer: BTC: Checking if any pending invoice got paid while offline…
info: PayServer: BTC: 0 payments happened while offline
info: PayServer: Connected to WebSocket of NBXplorer (BTC)

Logs NBXplorer:
Hosting environment: Production
Content root path: /app/
Now listening on: http://0.0.0.0:32838
Application started. Press Ctrl+C to shut down.
info: NBXplorer.Indexer.BTC: Full node version detected: 240001
warn: NBXplorer.Indexer.BTC: BTC: Your NBXplorer server is not whitelisted by your node, you should add “whitelist=10.21.0.7” to the configuration file of your node. (Or use whitebind)
info: NBXplorer.Events: BTC: Node state changed: NotStarted => NBXplorerSynching
info: NBXplorer.Indexer.BTC: Current Index Progress not found, start syncing from the header’s chain tip (At height: 791009)
info: NBXplorer.Events: BTC: Node state changed: NBXplorerSynching => Ready
info: NBXplorer.Events: BTC: New block 000000000000000000033ffe0cdfae1707f7c8ca4631e6e555898772250a6c08 (791009)
info: NBXplorer.Events: BTC: New block 0000000000000000000561dedc4fb6ab12d4bd1a5abbc7ea360145fa2d3b7aa1 (791010)

Logs Postgres:
2023-05-23 07:08:21.900 UTC [1] LOG: starting PostgreSQL 13.6 (Debian 13.6-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-05-23 07:08:21.900 UTC [1] LOG: listening on IPv4 address “0.0.0.0”, port 5432
2023-05-23 07:08:21.900 UTC [1] LOG: listening on IPv6 address “::”, port 5432
2023-05-23 07:08:21.901 UTC [1] LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”
2023-05-23 07:08:21.905 UTC [27] LOG: database system was shut down at 2023-05-23 07:08:18 UTC
2023-05-23 07:08:21.910 UTC [1] LOG: database system is ready to accept connections
2023-05-23 07:08:24.179 UTC [34] FATAL: database “nbxplorermainnet” does not exist
2023-05-23 07:08:24.648 UTC [36] ERROR: relation “nbxv1_migrations” does not exist at character 25
2023-05-23 07:08:24.648 UTC [36] STATEMENT: SELECT script_name FROM nbxv1_migrations
2023-05-23 07:08:28.304 UTC [40] FATAL: database “btcpayservermainnet” does not exist
2023-05-23 07:08:28.350 UTC [41] FATAL: database “btcpayservermainnet” does not exist

It seems to be a postgres issue?

Not sure how to fix this. I tried uninstalling and reinstalling BTCPayServer. Did not change the situation.

Any hints appreciated :slight_smile:

Some more log data from the btcpayserver docker:

info: PayServer: Connected to WebSocket of NBXplorer (BTC)
warn: PayServer: InitializeTasks failed
Npgsql.PostgresException (0x80004005): 57P01: terminating connection due to administrator command
at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|215_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass33_02.<b__0>d.MoveNext()
— End of stack trace from previous location —
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func4 operation, Func4 verifySucceeded, TState state, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func4 operation, Func4 verifySucceeded, TState state, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at BTCPayServer.Services.DelayedTransactionBroadcaster.ProcessAll(CancellationToken cancellationToken) in /source/BTCPayServer/Services/DelayedTransactionBroadcaster.cs:line 70 at BTCPayServer.HostedServices.DelayedTransactionBroadcasterHostedService.Rebroadcast() in /source/BTCPayServer/HostedServices/DelayedTransactionBroadcasterHostedService.cs:line 31 at BTCPayServer.HostedServices.BaseAsyncService.CreateLoopTask(Func1 act, String caller) in /source/BTCPayServer/HostedServices/BaseAsyncService.cs:line 55
Exception data:
Severity: FATAL
SqlState: 57P01
MessageText: terminating connection due to administrator command
File: postgres.c
Line: 3094
Routine: ProcessInterrupts
info: PayServer: DelayedTransactionBroadcasterHostedService successfully exited…