-
Notifications
You must be signed in to change notification settings - Fork 212
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
Timeout waiting to connect to the Maven daemon #637
Comments
unable to use mvnd |
try with latest 0.8.1 build from source, still failed $ java -version $ /Users/xxx/Tools/mvnd081/bin/mvnd -v at org.mvndaemon.mvnd.client.DaemonConnector.startDaemon(DaemonConnector.java:298) $ cat /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ee87ff3f.out.log |
Can you try using the shell script |
Your daemon started a debug session - is that your intention? |
Nice catch, this definitely looks like the daemon is waiting for the debugger to connect. |
Please reopen if needed. |
I rerun with disable debug mode:
|
And for Jansi:
|
Using mvnd.sh
|
Could you reopen this issue? |
user name is plain english character for now. |
I met the same problem, when I use mvd, its output is: mvnd list
Exception in thread "main" org.mvndaemon.mvnd.common.DaemonException$ConnectException: Could not connect to the Maven daemon.Daemon id: 17c56133
log file: /Users/junzhong.qin/.m2/mvnd/registry/0.8.0/daemon-17c56133.log
----- Last 200 lines from daemon log file - /Users/junzhong.qin/.m2/mvnd/registry/0.8.0/daemon-17c56133.log -----
11:20:24.334 D Initializing daemon with properties:
mvnd.home=/Users/junzhong.qin/.sdkman/candidates/mvnd/current
jdk.java.options=--add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED
mvnd.noDaemon=false
mvnd.debug=false
mvnd.idleTimeout=3h
mvnd.keepAlive=100ms
mvnd.extClasspath=
mvnd.coreExtensions=
mvnd.enableAssertions=false
mvnd.expirationCheckDelay=10s
mvnd.duplicateDaemonGracePeriod=10s
mvnd.socketFamily=inet
11:20:24.341 I Daemon started
11:20:24.342 D daemon is running. Sleeping until state changes.
----- End of the daemon log file -----
output: /Users/junzhong.qin/.m2/mvnd/registry/0.8.0/daemon-17c56133.out.log
----- Last 200 lines from daemon output - /Users/junzhong.qin/.m2/mvnd/registry/0.8.0/daemon-17c56133.out.log -----
----- End of the daemon output -----
at org.mvndaemon.mvnd.client.DaemonConnector.connectToDaemonWithId(DaemonConnector.java:435)
at org.mvndaemon.mvnd.client.DaemonConnector.startDaemon(DaemonConnector.java:287)
at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:121)
at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:284)
at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:129)
Caused by: org.mvndaemon.mvnd.common.DaemonException$ConnectException: Could not connect to server /127.0.0.1:51771.
at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:517)
at org.mvndaemon.mvnd.client.DaemonConnector.connectToDaemon(DaemonConnector.java:446)
at org.mvndaemon.mvnd.client.DaemonConnector.connectToDaemonWithId(DaemonConnector.java:432)
... 4 more
Caused by: java.io.IOException: Timeout
at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:494)
... 6 more when using mvd.sh, its output is: ./mvnd.sh list
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/mvndaemon/mvnd/client/DefaultClient has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601) My mvnd version is 0.8.0 and my Java version is oracle64-1.8.0.333. |
It failed for me as well. I'm using JDK 11.0.9.1 on Mac OS 12.4
|
when I upgrade jdk it start working now, but maybe it not the root cause. openjdk 11.0.15 2022-04-19 LTS mvnd 0.8.0 darwin-amd64 native client (2cfffe2) |
I'm having same issue with mvnd version 0.8.1 on Intel (x86_64) iMac running MacOS 12.6 and graalvm-ee-java17-22.1.0.1
|
Today I upgraded mvnd to 0.8.2 (via brew) and also upgraded GraalVM to 22.2.0.1 but same issue still persists. |
I have been using Error message:
installation path:
JDK/maven versions:
mvnd status:
and output from
|
I have also upgraded the maven daemon to 0.8.2 version and set the daemon properties to
but still getting intermittent error for
|
This should be fixed by #778, please reopen if needed. |
@gnodet this is great news. any timelines on when the 0.9.0 release will be available? |
I' using latest build maven-mvnd-1.0-m8-m40-windows-amd64 and got also this kind of errors ...
But then mvnd --status shows that process ...
And then later I can use the mvnd ... so building works. Its just this first logging about timeout. |
$ java -version
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (Zulu 8.62.0.19-CA-macosx) (build 1.8.0_332-b09)
OpenJDK 64-Bit Server VM (Zulu 8.62.0.19-CA-macosx) (build 25.332-b09, mixed mode)
$ $MVND_HOME/bin/mvnd --status
ID PID Address Status RSS Last activity Java home
$ $MVND_HOME/bin/mvnd --version
mvnd native client 0.7.1-darwin-amd64 (97c587c)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty
Exception in thread "main" org.mvndaemon.mvnd.common.DaemonException$ConnectException: Timeout waiting to connect to the Maven daemon.
Daemon id: 2505973f
no log file at: /Users/xxx/.m2/mvnd/registry/0.7.1/daemon-2505973f.log
output: /Users/xxx/.m2/mvnd/registry/0.7.1/daemon-2505973f.out.log
----- Last 200 lines from daemon output - /Users/xxx/.m2/mvnd/registry/0.7.1/daemon-2505973f.out.log -----
Listening for transport dt_socket at address: 8000
----- End of the daemon output -----
$ $MVND_HOME/bin/mvnd --status
ID PID Address Status RSS Last activity Java home
$ $MVND_HOME/bin/mvnd clean install
Exception in thread "main" org.mvndaemon.mvnd.common.DaemonException$ConnectException: Timeout waiting to connect to the Maven daemon.
Daemon id: 19a8bc0e
no log file at: /Users/xxx/.m2/mvnd/registry/0.7.1/daemon-19a8bc0e.log
output: /Users/xxx/.m2/mvnd/registry/0.7.1/daemon-19a8bc0e.out.log
----- Last 200 lines from daemon output - /Users/xxx/.m2/mvnd/registry/0.7.1/daemon-19a8bc0e.out.log -----
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
----- End of the daemon output -----
$ ps -ef|grep mvnd
[
501 84661 1 0 3:14下午 ttys005 0:00.09 /Users/xxx/.sdkman/candidates/java/8.0.332-zulu/bin/java -classpath /Users/xxx/Tools/mvnd/mvn/lib/ext/mvnd-common-0.7.1.jar:/Users/xxx/Tools/mvnd/mvn/lib/ext/mvnd-agent-0.7.1.jar -javaagent:/Users/xxx/Tools/mvnd/mvn/lib/ext/mvnd-agent-0.7.1.jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000 -Xms128M -Xmx2G -Xss1M -Dmvnd.home=/Users/xxx/Tools/mvnd -Dmvnd.java.home=/Users/xxx/.sdkman/candidates/java/8.0.332-zulu -Dlogback.configurationFile=/Users/xxx/Tools/mvnd/conf/logback.xml -Dmvnd.id=2505973f -Dmvnd.daemonStorage=/Users/xxx/.m2/mvnd/registry/0.7.1 -Dmvnd.registry=/Users/xxx/.m2/mvnd/registry/0.7.1/registry.bin -Dmvnd.socketFamily=inet -Djdk.java.options= --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED -Dmvnd.noDaemon=true -Dmvnd.debug=true -Dmvnd.idleTimeout=3h -Dmvnd.keepAlive=100ms -Dmvnd.extClasspath= -Dmvnd.coreExtensions= -Dmvnd.minHeapSize=128M -Dmvnd.maxHeapSize=2G -Dmvnd.threadStackSize=1M -Dmvnd.enableAssertions=false -Dmvnd.expirationCheckDelay=10s -Dmvnd.duplicateDaemonGracePeriod=10s -Dmvnd.socketFamily=inet org.mvndaemon.mvnd.common.MavenDaemon
OS: macOS 12.3.1 21E258 x86_64
Kernel: 21.4.0
Shell: zsh 5.8
The text was updated successfully, but these errors were encountered: