-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled exception. Npgsql.NpgsqlException (0x80004005): Failed to connect to 127.0.0.1:39383 #406
Comments
Do you have your postgres instance running at port 39383 ? |
no, it is running on its default port (5432) |
no, it is running on its default port (5432) |
Yeah so update your configuration file, as you have it pointing to 39383 according to the error message. |
ok, thanks for your help, i changed the port of postgres and now i am getting this error, how can i pass the password? i am using this command to execute it "dotnet run --project NBXplorer" info: Configuration: Data Directory: C:\Users\Alejandro Valencia\AppData\Roaming\NBXplorer\Main |
The configuration file should have the username and password added. In this format... |
do you mean the config file on this url "C:\UsersAlejandro Valencia\AppData\Roaming\NBXplorer\Main\settings.config"? because in that file I don't see the postgres configuration data, I only see this ####Common Commands#### This is the RPC Connection to your node#agm.rpc.url=http://127.0.0.1:9899/ This is the connection to your node through P2P#agm.node.endpoint=127.0.0.1:AGM minutxovalue defines the minimum value allowed for a utxo to be tracked#agm.minutxovalue=1 startheight defines from which block you will start scanning, if -1 is set, it will use current blockchain height#agm.startheight=-1 rescan forces a rescan from startheight#agm.rescan=0 rescaniftimebefore only lets rescan occur if current unix timestamp (seconds) is less than the given valuerequires agm.rescan to be true#agm.rescaniftimebefore=1635210000 This is the RPC Connection to your node#btc.rpc.url=http://127.0.0.1:8332/ |
I was able to run it with this command "dotnet run --no-launch-profile --no-build -c Release --project .\NBXplorer\NBXplorer.csproj --postgres="host=127.0.0.1;password=postgres;port=5432;database=nbxplorer;User Id=postgres"", sending the postgres data in the command, but now I am getting this error with the RPC, any ideas? info: Configuration: Configuration File: C:\Users\Alejandro Valencia\AppData\Roaming\NBXplorer\Main\settings.config |
Yep so you need to be able to connect to your bitcoin node now via rpc. Have you got a bitcoin node running locally ? |
The postgres command is ok as you have it in the command line also, either command line or config file works. |
So my settings.config file has the following config values for the bitcoin node rpc. btc.rpc.url=http://127.0.0.1:8332/ |
hey, sorry for the delay, I was really busy, this is what my settings file looks like, how can I pass the bitcoin node settings through a command? ####Common Commands#### This is the RPC Connection to your node#agm.rpc.url=http://127.0.0.1:9899/ This is the connection to your node through P2P#agm.node.endpoint=127.0.0.1:AGM minutxovalue defines the minimum value allowed for a utxo to be tracked#agm.minutxovalue=1 startheight defines from which block you will start scanning, if -1 is set, it will use current blockchain height#agm.startheight=-1 rescan forces a rescan from startheight#agm.rescan=0 rescaniftimebefore only lets rescan occur if current unix timestamp (seconds) is less than the given valuerequires agm.rescan to be true#agm.rescaniftimebefore=1635210000 This is the RPC Connection to your node#btc.rpc.url=http://127.0.0.1:8332/ |
I am getting this error when running the project, can someone help me with this?
info: Configuration: Data Directory: C:\Users\Alejandro Valencia\AppData\Roaming\NBXplorer\Main
info: Configuration: Configuration File: C:\Users\Alejandro Valencia\AppData\Roaming\NBXplorer\Main\settings.config
info: Configuration: Network: Mainnet
info: Configuration: Supported chains: BTC
info: Configuration: DBCache: 50 MB
info: Configuration: Network: Mainnet
info: Configuration: Supported chains: BTC
info: Configuration: DBCache: 50 MB
info: NBXplorer.DatabaseSetup: Postgres services activated
Unhandled exception. Npgsql.NpgsqlException (0x80004005): Failed to connect to 127.0.0.1:39383
---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at Npgsql.TaskExtensions.ExecuteWithTimeout(Func
2 func, NpgsqlTimeout timeout, CancellationToken cancellationToken) at Npgsql.Internal.NpgsqlConnector.ConnectAsync(NpgsqlTimeout timeout, CancellationToken cancellationToken) at Npgsql.Internal.NpgsqlConnector.ConnectAsync(NpgsqlTimeout timeout, CancellationToken cancellationToken) at Npgsql.Internal.NpgsqlConnector.RawOpen(SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt) at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|195_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt) at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.ConnectorPool.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.ConnectorPool.<Get>g__RentAsync|28_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|45_0(Boolean async, CancellationToken cancellationToken) at NBXplorer.Backends.Postgres.DbConnectionFactory.CreateConnection(Action
1 action) in C:\Users\Alejandro Valencia\Desktop\BTCPay\NBXplorer\NBXplorer\Backends\Postgres\DbConnectionFactory.cs:line 54at NBXplorer.HostedServices.DatabaseSetupHostedService.StartAsync(CancellationToken cancellationToken) in C:\Users\Alejandro Valencia\Desktop\BTCPay\NBXplorer\NBXplorer\HostedServices\DatabaseSetupHostedService.cs:line 33
at Microsoft.AspNetCore.Hosting.HostedServiceExecutor.ExecuteAsync(Func`2 callback, Boolean throwOnFirstFailure)
at Microsoft.AspNetCore.Hosting.WebHost.StartAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
at NBXplorer.Program.Main(String[] args) in C:\Users\Alejandro Valencia\Desktop\BTCPay\NBXplorer\NBXplorer\Program.cs:line 60
PS C:\Users\Alejandro Valencia\Desktop\BTCPay\NBXplorer>
The text was updated successfully, but these errors were encountered: