sys-API icon indicating copy to clipboard operation
sys-API copied to clipboard

Unraid - APPLICATION FAILED TO START "The Tomcat connector configured to listen on port 8080 failed to start. "

Open PrzemekSkw opened this issue 10 months ago • 12 comments

Hello, I want to try new docker template on my unraid server.

Image

I download configuration.yml to /mnt/user/appdata/Monitee-agent/ folder and put user/password. After I start container I get that in logs:

        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.3.0.jar:3.3.0]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.3.0.jar:3.3.0]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) ~[spring-boot-3.3.0.jar:3.3.0]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363) ~[spring-boot-3.3.0.jar:3.3.0]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352) ~[spring-boot-3.3.0.jar:3.3.0]
        at com.krillsson.sysapi.SysAPIApplicationKt.main(SysAPIApplication.kt:67) ~[classes/:na]
Caused by: java.net.BindException: Address already in use
        at java.base/sun.nio.ch.Net.bind0(Native Method) ~[na:na]
        at java.base/sun.nio.ch.Net.bind(Net.java:565) ~[na:na]
        at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:344) ~[na:na]
        at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:301) ~[na:na]
        at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:239) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:194) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
        at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1286) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
        at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1372) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
        at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:635) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1044) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
        ... 19 common frames omitted

2025-02-19T11:22:35.478+01:00  INFO 958449 --- [sysapi] [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2025-02-19T11:22:35.827+01:00  INFO 958449 --- [sysapi] [         task-1] com.krillsson.sysapi.mdns.Mdns           : Registered mDNS: _http._tcp.local with name: unRAID at port 8080 (took 2610ms)
2025-02-19T11:22:35.830+01:00  WARN 958449 --- [sysapi] [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'
2025-02-19T11:22:44.842+01:00  INFO 958449 --- [sysapi] [           main] com.krillsson.sysapi.upnp.UpnpIgd        : No active gateway device found
2025-02-19T11:22:46.850+01:00  INFO 958449 --- [sysapi] [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2025-02-19T11:22:46.851+01:00  INFO 958449 --- [sysapi] [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2025-02-19T11:22:46.852+01:00  INFO 958449 --- [sysapi] [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
2025-02-19T11:22:46.858+01:00  INFO 958449 --- [sysapi] [           main] .s.b.a.l.ConditionEvaluationReportLogger : 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2025-02-19T11:22:46.865+01:00 ERROR 958449 --- [sysapi] [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.

Regards.

PrzemekSkw avatar Feb 19 '25 10:02 PrzemekSkw

Do you have another container on the "Host" Network that already listens to 8080 or 8443?

hndrkx avatar Feb 19 '25 12:02 hndrkx

Do you have another container on the "Host" Network that already listens to 8080 or 8443?

Yes, I have. Do I need to add ports variables to that docker template? Regards.

PrzemekSkw avatar Feb 19 '25 13:02 PrzemekSkw

In the application.properties change:

# Application ports
http.port=8080
server.port=8443

See here: https://monitee.app/unraid/

hndrkx avatar Feb 19 '25 13:02 hndrkx

See here: https://monitee.app/unraid/

Thank You very much. It works now.

Regards.

PrzemekSkw avatar Feb 19 '25 15:02 PrzemekSkw

thanks @hndrkx. I have updated https://monitee.app/unraid/ with a big warning box about this.

I also see that the template erroneously have default paths for the /config + /data. That has also been updated.

Krillsson avatar Feb 19 '25 17:02 Krillsson

Will reopen this for visibility for anyone else running into the problem. See @hndrkx solution:

In the application.properties change:

# Application ports
http.port=8080
server.port=8443

See here: https://monitee.app/unraid/

Krillsson avatar Feb 19 '25 17:02 Krillsson

thanks @hndrkx. I have updated https://monitee.app/unraid/ with a big warning box about this.

I also see that the template erroneously have default paths for the /config + /data.

Thanks. It create .../appdata/docker/data folder. Can I delete it and create /data in /Monitee-agent folder next to /config?

PrzemekSkw avatar Feb 19 '25 17:02 PrzemekSkw

Yes, create /mnt/appdata/Monitee-agent/data

Copy stuff from the wrong directory into it

Then delete the wrong directory

Lastly, edit the container to point to the right directory in unRAID ui

Krillsson avatar Feb 19 '25 18:02 Krillsson

Yes, create /mnt/appdata/Monitee-agent/data

Copy stuff from the wrong directory into it

Then delete the wrong directory

Lastly, edit the container to point to the right directory in unRAID ui

Hi, I noticed that create folder:

Image

to be sure, I need only /data? Not sys-api/data?

PrzemekSkw avatar Feb 19 '25 18:02 PrzemekSkw

Another question. I don't see logs in Monitee-app on smartphone. Can I change default variable /vat/log for /mnt/user/Syslog?

PrzemekSkw avatar Feb 19 '25 18:02 PrzemekSkw

Yes, create /mnt/appdata/Monitee-agent/data Copy stuff from the wrong directory into it Then delete the wrong directory Lastly, edit the container to point to the right directory in unRAID ui

Hi, I noticed that create folder:

Image

to be sure, I need only /data? Not sys-api/data?

✅ Correct directory Image

🛑 Wrong directory - delete Image

Make sure your config looks like this Image

Krillsson avatar Feb 19 '25 18:02 Krillsson

Another question. I don't see logs in Monitee-app on smartphone. Can I change default variable /vat/log for /mnt/user/Syslog?

I replied to your question in #186 so that its easy for others to find

Krillsson avatar Feb 19 '25 18:02 Krillsson