Skip to content
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

Incorrect error message reported when lavalink can't bind to the configured IP #299

Closed
vicky5124 opened this issue May 26, 2020 · 3 comments
Labels

Comments

@vicky5124
Copy link
Contributor

Description

If application.yml -> server:address is set to an IP Lavalink can't bind to, at run time, Lavalink will close reporting an error stating that the Port is already in use, rather than stating that Lavalink could not bind to the IP configured.

This is an issue that's hard to debug if the file has configured a local static IP address, rather than 0.0.0.0 or 127.0.0.1

This issue has appeared in my case when re-purposing my configuration for a docker container, where the container could not bind to the IP, so it never started.

Versions

java11 --version

openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10)
OpenJDK 64-Bit Server VM (build 11.0.7+10, mixed mode)

java11 -jar Lavalink.jar

        Version:        07d84e72d098a650fb0166cb89214c731123b7a5-SNAPSHOT
        Build:          1053
        Build time:     22.05.2020 16:46:25 UTC
        Branch          HEAD
        Commit:         07d84e7
        Commit time:    22.05.2020 16:34:27 UTC
        JVM:            11.0.7
        Lavaplayer      1.3.49

Logs

Exit logs

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (jar:file:/opt/Lavalink/Lavalink.jar!/BOOT-INF/lib/xnio-nio-3.3.8.Final.jar!/) to constructor sun.nio.ch.EPollSelectorProvider()
WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2020-05-25 08:18:14.010  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-05-25 08:18:14.013 ERROR 1 --- [           main] lavalink.server.Launcher                 : Application failed

org.springframework.boot.web.server.PortInUseException: Port 2333 is already in use
	at org.springframework.boot.web.embedded.undertow.UndertowServletWebServer.start(UndertowServletWebServer.java:154) ~[spring-boot-2.1.8.RELEASE.jar!/:2.1.8.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297) ~[spring-boot-2.1.8.RELEASE.jar!/:2.1.8.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) ~[spring-boot-2.1.8.RELEASE.jar!/:2.1.8.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.8.RELEASE.jar!/:2.1.8.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) ~[spring-boot-2.1.8.RELEASE.jar!/:2.1.8.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) ~[spring-boot-2.1.8.RELEASE.jar!/:2.1.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[spring-boot-2.1.8.RELEASE.jar!/:2.1.8.RELEASE]
	at lavalink.server.Launcher.main(Launcher.kt:127) ~[classes!/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[Lavalink.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[Lavalink.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) ~[Lavalink.jar:na]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) ~[Lavalink.jar:na]

2020-05-25 08:18:14.014 ERROR 1 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

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

Description:

Web server failed to start. Port 2333 was already in use.

Action:

Identify and stop the process that's listening on port 2333 or configure this application to listen on another port.

2020-05-25 08:18:14.017  INFO 1 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
2020-05-25 08:18:14.018  INFO 1 --- [           main] c.s.d.l.tools.GarbageCollectionMonitor   : GC monitoring disabled.

@freyacodes
Copy link
Member

Hi

This looks like it was fixed in a newer version of Spring Boot. I'll just have to update it at some point.

spring-projects/spring-boot#21101

@freyacodes freyacodes added the bug label May 26, 2020
@claude-3922
Copy link

claude-3922 commented Mar 26, 2021

one year later; still isn't fixed

@topi314
Copy link
Member

topi314 commented Oct 31, 2022

it looks like this should be resolved as lavalink uses 2.6.6 of spring boot and this should be resolved in spring boot 2.2.7.
If this issue persists feel free to reopen the issue

@topi314 topi314 closed this as completed Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants