[BUG] iGotify wont bind to 8080, says port is in use when its not
Describe the bug iGotify won't fully start as it states it cannot bind to 8080. It claims the port is in use when its not.
Expected behavior iGotify should fully start.
Troubleshooting ###Compose file:
igotify:
image: ghcr.io/androidseb25/igotify-notification-assist:latest
container_name: igotify
networks:
#macvlan_network:
#ipv4_address: 192.168.100.208
gotify_network: {}
dns:
- 8.8.8.8
- 8.8.4.4
security_opt:
- no-new-privileges:true
pull_policy: always
ports:
- 8093:8080
volumes:
- /home/fareedwarrad/docker/igotify:/app:rw
environment:
GOTIFY_URLS: 'https://gotify.nonooculusnas.com'
GOTIFY_CLIENT_TOKENS: 'C3B7--.G10-g22R'
#SECNTFY_SERVER: https://ntfy.sh # Default SecNtfy server
#SECNTFY_TOKENS:
ENABLE_CONSOLE_LOG: true
restart: always
labels:
- com.centurylinklabs.watchtower.enable=true
###Docker Logs:
Ubuntu-US-Southeast-Server-3
ghcr.io/androidseb25/igotify-notification-assist:latest
Database is created: True
Gotify Url list is: empty
Gotify Client list is: empty
SecNtfy Token list is: empty
If one or more lists are empty please check the environment variable! GOTIFY_SERVERS or GOTIFY_CLIENTS or NTFY_TOKENS
If all lists are empty do nothing, you will configure the gotify server over the iGotify app.
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://[::]:8080
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /app
###Running /app# /app/iGotify\ Notification\ Assist from within the container:
Database is created: True
Gotify Url list is: empty
Gotify Client list is: empty
SecNtfy Token list is: empty
If one or more lists are empty please check the environment variable! GOTIFY_SERVERS or GOTIFY_CLIENTS or NTFY_TOKENS
If all lists are empty do nothing, you will configure the gotify server over the iGotify app.
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
Hosting failed to start
System.IO.IOException: Failed to bind to address http://[::]:8080: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
Unhandled exception. System.IO.IOException: Failed to bind to address http://[::]:8080: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Program.<Main>$(String[] args) in /src/Program.cs:line 63
Aborted (core dumped)
###SS Tulnp command and Docker PS showing whats using port 8080:
root@nonooculus-ubuntu-server-3:/home/fareedwarrad/docker# ss -tulnp | grep 8080
tcp LISTEN 0 4096 0.0.0.0:8080 0.0.0.0:* users:(("docker-proxy",pid=195350,fd=7))
tcp LISTEN 0 4096 [::]:8080 [::]:* users:(("docker-proxy",pid=195356,fd=7))
root@nonooculus-ubuntu-server-3:/home/fareedwarrad/docker# docker ps -a | grep 8080
549bc374cff5 ghcr.io/androidseb25/igotify-notification-assist:latest "dotnet 'iGotify Not…" 22 minutes ago Up 22 minutes 5047/tcp, 7221/tcp, 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp igotify
aa3ae149ef39 containrrr/watchtower:latest "/watchtower" 25 minutes ago Up 25 minutes (healthy) 8080/tcp watchtower
root@nonooculus-ubuntu-server-3:/home/fareedwarrad/docker#
Additional context Not sure if this is a bug or what, but my compose file config looks fine and no other service is. using 8080 on this particular host and the compose file maps 8080 to 8080. Any help will be appreciated,
is this bug already fixed?
I think there is somewhere a misconfiguration, but I haven't found time yet to investigate this issue.
Please I will notify you when I found something.
@farewarr yeah i know why you get the binding error, you're config is the problem you have make the network of the container public in you're he didn't cast the ports to 8093 from the config
remove the network part in the compose
networks:
#macvlan_network:
#ipv4_address: 192.168.100.208
gotify_network: {}
a docker has its own network with his own port mapping, don't make it public or make sure that you're ports are unique and not used more multiple times
inactive since more then one month