aptabase / self-hosting

Configuration and Documentation for Self-Hosting Aptabase
36 stars 9 forks source link

Connection refused when dockerized #8

Closed rivz1k closed 4 months ago

rivz1k commented 5 months ago

Remote linux host, aptabase_app cant connect tp aptabase_evets_db

i have opened all ports

Unhandled exception. System.Net.Http.HttpRequestException: Connection refused (aptabase_events_db:8123) ---> System.Net.Sockets.SocketException (111): Connection refused 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.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at ClickHouse.Client.ADO.ClickHouseConnection.OpenAsync(CancellationToken cancellationToken) at ClickHouse.Client.ADO.ClickHouseConnection.Open() at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action2 paramReader) in //Dapper/SqlMapper.cs:line 2959 at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in //Dapper/SqlMapper.cs:line 656 at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable1 commandTimeout, Nullable1 commandType) in /_/Dapper/SqlMapper.cs:line 527 at Aptabase.Data.ClickHouseMigrationRunner.MigrateUp() in /work/src/Data/ClickHouseMigrationRunner.cs:line 33 at Program.RunMigrations(IServiceProvider sp) in /work/src/Program.cs:line 243 at Program.Main(String[] args) in /work/src/Program.cs:line 225 {"EventId":60,"LogLevel":"Warning","Category":"Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository","Message":"Storing keys in a directory \u0027/root/.aspnet/DataProtection-Keys\u0027 that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.","State":{"Message":"Storing keys in a directory \u0027/root/.aspnet/DataProtection-Keys\u0027 that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.","path":"/root/.aspnet/DataProtection-Keys","{OriginalFormat}":"Storing keys in a directory \u0027{path}\u0027 that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed."}} {"EventId":35,"LogLevel":"Warning","Category":"Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager","Message":"No XML encryptor configured. Key {ac1cfbe5-3c4e-4691-a3e8-f526d495991c} may be persisted to storage in unencrypted form.","State":{"Message":"No XML encryptor configured. Key {ac1cfbe5-3c4e-4691-a3e8-f526d495991c} may be persisted to storage in unencrypted form.","KeyId":"ac1cfbe5-3c4e-4691-a3e8-f526d495991c","{OriginalFormat}":"No XML encryptor configured. Key {KeyId:B} may be persisted to storage in unencrypted form."}} {"EventId":0,"LogLevel":"Information","Category":"Aptabase.Features.Ingestion.Buffer.EventBackgroundWritter","Message":"EventBackgroundWritter is starting.","State":{"Message":"EventBackgroundWritter is starting.","{OriginalFormat}":"EventBackgroundWritter is starting."}} {"EventId":0,"LogLevel":"Information","Category":"Aptabase.Features.Privacy.PurgeDailySaltsCronJob","Message":"PurgeDailySaltsCronJob is starting.","State":{"Message":"PurgeDailySaltsCronJob is starting.","{OriginalFormat}":"PurgeDailySaltsCronJob is starting."}} {"EventId":14,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Now listening on: http://[::]:80","State":{"Message":"Now listening on: http://[::]:80","address":"http://[::]:80","{OriginalFormat}":"Now listening on: {address}"}} {"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Application started. Press Ctrl\u002BC to shut down.","State":{"Message":"Application started. Press Ctrl\u002BC to shut down.","{OriginalFormat}":"Application started. Press Ctrl\u002BC to shut down."}} {"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Hosting environment: Production","State":{"Message":"Hosting environment: Production","EnvName":"Production","{OriginalFormat}":"Hosting environment: {EnvName}"}} {"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Content root path: /app","State":{"Message":"Content root path: /app","ContentRoot":"/app","{OriginalFormat}":"Content root path: {ContentRoot}"}} `

this is my docker-compose.yml

`version: "3.2" services: aptabase_db: container_name: aptabase_db image: postgres:15-alpine restart: unless-stopped ports:

volumes: db-data: driver: local events-db-data: driver: local

networks: aptabase: driver: bridge `