maciejwalkowiak / just

Magical 🪄 command line toolkit for developing 🍃 Spring Boot apps
312 stars 6 forks source link

Startup fails with `Failed to unlock acceptor for ... because the local address was not available` #5

Open xerverless opened 1 year ago

xerverless commented 1 year ago

Screenshot from 2022-12-15 12-20-44

Error - just: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by just) just: /lib/x86_64-linux-gnu/libc.so.6: versionGLIBC_2.34' not found (required by just)

Ubuntu Details - lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal

maciejwalkowiak commented 1 year ago

GLIBC_2.34 is required to run just (that's because native images built with GraalVM require it). It does work on out of the box on Ubuntu 22.04 LTS.

xerverless commented 1 year ago

Hi Maciej, Thanks for the prompt response. I upgraded to Ubuntu 22.04 LTS. Installation was succesfull. but now each command ends with an error below. I searched over google for error but cant find anything concrete.

just | Failed to unlock acceptor for [http-nio-41037] because the local address was not available just | Socket accept failed java.nio.channels.AsynchronousCloseException: null at java.base@17.0.5/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202) at java.base@17.0.5/sun.nio.ch.ServerSocketChannelImpl.end(ServerSocketChannelImpl.java:376) at java.base@17.0.5/sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:399) at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:520) at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:79) at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:128) at java.base@17.0.5/java.lang.Thread.run(Thread.java:833) at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775) at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)

image

maciejwalkowiak commented 1 year ago

Just starts server on random available port. I am not sure what is happening but it seems like it picked a port that is already taken? Can you try to run it again (different port will be used) or force port with:

$ JUST_SERVER_PORT=8082 just -V
xerverless commented 1 year ago

Hi Maciej, I tried running the below command as is -

Still getting the same error. will do more google and try to get some solutions. Thanks for the help. will paste the solution here if able to resolve it. Looks like it is not related to port but something else.

Screenshot from 2022-12-16 11-48-17

MaxWenzel commented 1 year ago

I have also this error on Mac M1.

maciejwalkowiak commented 1 year ago

@MaxWenzel i assume it happens with random port too? Can you check if the port it selects is already taken?

MaxWenzel commented 1 year ago

You are right, it seems to be a problem with the port. If I use

JUST_SERVER_PORT=6060 just run

I cannot reproduce it but I get the next error: Issue-50