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

Timeout waiting to connect to the Maven daemon #637

Closed
mike-boost opened this issue May 4, 2022 · 21 comments
Closed

Timeout waiting to connect to the Maven daemon #637

mike-boost opened this issue May 4, 2022 · 21 comments

Comments

@mike-boost
Copy link

$ 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 -----

at org.mvndaemon.mvnd.client.DaemonConnector.startDaemon(DaemonConnector.java:299)
at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:122)
at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:272)
at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:118)

$ $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 -----

at org.mvndaemon.mvnd.client.DaemonConnector.startDaemon(DaemonConnector.java:299)
at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:122)
at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:272)
at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:118)

$ 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

@mike-boost
Copy link
Author

unable to use mvnd
I tried install it with sdkman or binary, neither work.

@finalcreator
Copy link

try with latest 0.8.1 build from source, still failed

$ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment GraalVM CE 20.3.6 (build 11.0.15+10-jvmci-20.3-b33)
OpenJDK 64-Bit Server VM GraalVM CE 20.3.6 (build 11.0.15+10-jvmci-20.3-b33, mixed mode, sharing)

$ /Users/xxx/Tools/mvnd081/bin/mvnd -v
mvnd 0.8.1-SNAPSHOT darwin-amd64 native client (c3612be)
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: ee87ff3f
no log file at: /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ee87ff3f.log
output: /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ee87ff3f.out.log
----- Last 200 lines from daemon output - /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ee87ff3f.out.log -----
NOTE: Picked up 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
Listening for transport dt_socket at address: 8000
----- End of the daemon output -----

at org.mvndaemon.mvnd.client.DaemonConnector.startDaemon(DaemonConnector.java:298)
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)
FAIL

$ cat /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ee87ff3f.out.log
NOTE: Picked up 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
Listening for transport dt_socket at address: 8000

@gnodet
Copy link
Contributor

gnodet commented May 5, 2022

Can you try using the shell script mvnd.sh ?
Could you also try creating a user with a name with only ascii characters and try with it (so that there's no unicode chars in the installation path and user home ?
Also, try running java -jar $MVND_HOME/mvn/lib/ext/jansi-2.4.0.jar and paste the output in case...
Do you have rosetta 2 installed if you're running on a M1 Mac ?

@ppalaga
Copy link
Contributor

ppalaga commented May 5, 2022

Listening for transport dt_socket at address: 8000

Your daemon started a debug session - is that your intention?

@gnodet
Copy link
Contributor

gnodet commented May 5, 2022

Listening for transport dt_socket at address: 8000

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.
See the -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000 parameters passed as an argument when starting the daemon JVM.
@mike-boost you must have the mvnd.debug system property set to true somewhere....

@gnodet
Copy link
Contributor

gnodet commented May 6, 2022

Please reopen if needed.

@gnodet gnodet closed this as completed May 6, 2022
@finalcreator
Copy link

finalcreator commented May 6, 2022

I rerun with disable debug mode:

$ /Users/xxx/Tools/mvnd081/bin/mvnd -v                                                                                           
mvnd 0.8.1-SNAPSHOT darwin-amd64 native client (c3612be87eedac16826572e831618291b777213e)
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: Could not connect to the Maven daemon.
Daemon id: ec828fc6
  log file: /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ec828fc6.log
----- Last  200 lines from daemon log file - /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ec828fc6.log -----
03:41:06.118 D Initializing daemon with properties:
     mvnd.home=/Users/xxx/Tools/mvnd081
     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=true
     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

03:41:06.124 I Daemon started
----- End of the daemon log file -----
  output: /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ec828fc6.out.log
----- Last  200 lines from daemon output - /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-ec828fc6.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:65465.
	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

@finalcreator
Copy link

finalcreator commented May 6, 2022

And for Jansi:

Jansi 2.4.0

library.jansi.path=
library.jansi.version=
Jansi native library loaded from /var/folders/vr/q68k22xs57x27hm3kvlbg9jc0000gn/T/jansi-2.4.0-fa49bfb250277970-libjansi.jnilib
   which was auto-extracted from jar:file:/Users/xxx/Tools/mvnd081/mvn/lib/ext/jansi-2.4.0.jar!/org/fusesource/jansi/internal/native/Mac/x86_64/libjansi.jnilib

os.name= Mac OS X, os.version= 10.16, os.arch= x86_64
file.encoding= UTF-8
java.version= 1.8.0_332, java.vendor= Azul Systems, Inc., java.home= /Users/xxx/.sdkman/candidates/java/8.0.332-zulu/zulu-8.jdk/Contents/Home/jre

jansi.graceful=
jansi.mode=
jansi.out.mode=
jansi.err.mode=
jansi.colors=
jansi.out.colors=
jansi.err.colors=
jansi.passthrough= false
jansi.strip= false
jansi.force= false
jansi.noreset= false
org.fusesource.jansi.Ansi.disable= false

IS_WINDOWS: false

isatty(STDOUT_FILENO): 1, System.out is a terminal
isatty(STDERR_FILENO): 1, System.err is a terminal

Resulting Jansi modes for stout/stderr streams:
  - System.out: AnsiPrintStream{type=Native, colors=TrueColor, mode=Default, resetAtUninstall=true}
  - System.err: AnsiPrintStream{type=Native, colors=TrueColor, mode=Default, resetAtUninstall=true}
Processor types description:
  - Native: Supports ansi sequences natively
  - Unsupported: Ansi sequences are stripped out
  - VirtualTerminal: Supported through windows virtual terminal
  - Emulation: Emulated through using windows API console commands
  - Redirected: The stream is redirected to a file or a pipe
Colors support description:
  - Colors16: 16 colors
  - Colors256: 256 colors
  - TrueColor: 24-bit colors
Modes description:
  - Strip: Strip all ansi sequences
  - Default: Print ansi sequences if the stream is a terminal
  - Force: Always print ansi sequences, even if the stream is redirected

test on System.out: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
            bright: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
              bold: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
             faint: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
        bold+faint: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
        256 colors:





         truecolor: /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\
test on System.err: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
            bright: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
              bold: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
             faint: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
        bold+faint: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
        256 colors:





         truecolor: /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\

                      ┌──┐┌─────┐ ┌─────┐ ┌──────┬──┐
                      │██├┘█████└┬┘█████└┬┘██████│▐▌│
                 ┌──┐ │██│██▄▄▄██│██┌─┐██│██▄▄▄▄ │▄▄│
                 │▒▒└─┘▒█│▒█┌─┐▒█│▒█│ │▒█│ ▀▀▀▀▒█│▒█│
                 └┐▓▓▓▓▓┌┤▓▓│ │▓▓│▓▓│ │▓▓│▀▓▓▓▓▓▀│▓▓│
                  └─────┘└──┘ └──┴──┘ └──┴───────┴──┘

@finalcreator
Copy link

finalcreator commented May 6, 2022

Using mvnd.sh

$ /Users/xxx/Tools/mvnd081/bin/mvnd.sh -v                                                                                                                            
03:49:35.853 [main] DEBUG org.mvndaemon.mvnd.client.DefaultClient - Starting client
                                                                                                                                                                                Looking up daemon...  time: 00:00daemon.mvnd.common.DaemonRegistry - loading own PID from VM name: 2033
03:49:36.290 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Found 0 idle daemons, 0 compatibles
03:49:36.291 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Found 1 busy daemons, 0 cancelled, 0 compatibles
03:49:36.293 [main] DEBUG org.mvndaemon.mvnd.common.DaemonRegistry - Removing 0 daemon stop events from registry
Starting new daemon c954c9ce, 1 busy and 1 stopped daemons could not be reused, use --status for details  time: 00:00ating system
03:49:36.329 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Starting daemon process: id = c954c9ce, workingDir = /Users/xxx/Repo/valtech/MBBB/85826_mbbc_prs, daemonArgs: /Users/xxx/.sdkman/candidates/java/20.3.6.r11-grl/bin/java -classpath /Users/xxx/Tools/mvnd081/mvn/lib/ext/mvnd-common-0.8.1-SNAPSHOT.jar:/Users/xxx/Tools/mvnd081/mvn/lib/ext/mvnd-agent-0.8.1-SNAPSHOT.jar -javaagent:/Users/xxx/Tools/mvnd081/mvn/lib/ext/mvnd-agent-0.8.1-SNAPSHOT.jar -Dmvnd.home=/Users/xxx/Tools/mvnd081 -Dmaven.home=/Users/xxx/Tools/mvnd081/mvn -Dmaven.conf=/Users/xxx/Tools/mvnd081/mvn/conf -Dmvnd.java.home=/Users/xxx/.sdkman/candidates/java/20.3.6.r11-grl -Dlogback.configurationFile=/Users/xxx/Tools/mvnd081/conf/logback.xml -Dmvnd.id=c954c9ce -Dmvnd.daemonStorage=/Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT -Dmvnd.registry=/Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/registry.bin -Dmvnd.socketFamily=inet -Dmvnd.home=/Users/xxx/Tools/mvnd081 -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.net.www.protocol.jar=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED -Dmvnd.noDaemon=true -Dmvnd.debug=false -Dmvnd.idleTimeout=3h -Dmvnd.keepAlive=100ms -Dmvnd.extClasspath= -Dmvnd.coreExtensions= -Dmvnd.enableAssertions=false -Dmvnd.expirationCheckDelay=10s -Dmvnd.duplicateDaemonGracePeriod=10s -Dmvnd.socketFamily=inet org.mvndaemon.mvnd.common.MavenDaemon
03:49:36.373 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Started Maven daemon c954c9ce
03:49:37.979 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connecting to Daemon
03:49:37.980 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Trying to connect to address /127.0.0.1:49156.
03:49:37.998 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Removing daemon from the registry due to communication failure. Daemon information: DaemonInfo{id=c954c9cejavaHome=/Users/xxx/.sdkman/candidates/java/20.3.6.r11-grl, options=[mvnd.home=/Users/xxx/Tools/mvnd081, 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=true, 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], mavenHome=/Users/xxx/Tools/mvnd081, pid=2048, address=inet:/127.0.0.1:49156, locale=en-CN, state=Busy, lastIdle=1651866577781, lastBusy=1651866577781}
03:49:37.999 [main] DEBUG org.mvndaemon.mvnd.common.DaemonRegistry - Storing daemon stop event with timestamp 1651866577999
mvnd 0.8.1-SNAPSHOT JVM client (c3612be87eedac16826572e831618291b777213e)
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: Could not connect to the Maven daemon.
Daemon id: c954c9ce
  log file: /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-c954c9ce.log
----- Last  200 lines from daemon log file - /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-c954c9ce.log -----
03:49:37.779 D Initializing daemon with properties:
     mvnd.home=/Users/xxx/Tools/mvnd081
     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=true
     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

03:49:37.785 I Daemon started
----- End of the daemon log file -----
  output: /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-c954c9ce.out.log
----- Last  200 lines from daemon output - /Users/xxx/.m2/mvnd/registry/0.8.1-SNAPSHOT/daemon-c954c9ce.out.log -----
NOTE: Picked up 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
----- 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:49156.
	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

@finalcreator
Copy link

Please reopen if needed.

Could you reopen this issue?

@finalcreator
Copy link

Can you try using the shell script mvnd.sh ? Could you also try creating a user with a name with only ascii characters and try with it (so that there's no unicode chars in the installation path and user home ? Also, try running java -jar $MVND_HOME/mvn/lib/ext/jansi-2.4.0.jar and paste the output in case... Do you have rosetta 2 installed if you're running on a M1 Mac ?

user name is plain english character for now.

@gnodet gnodet reopened this May 6, 2022
@qinf
Copy link

qinf commented Jun 20, 2022

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.

@eperret
Copy link

eperret commented Jul 6, 2022

It failed for me as well. I'm using JDK 11.0.9.1 on Mac OS 12.4

Exception in thread "main" org.mvndaemon.mvnd.common.DaemonException$ConnectException: Could not connect to the Maven daemon.
Daemon id: d542b597
  log file: /Users/user_name/.m2/mvnd/registry/0.8.0/daemon-d542b597.log
----- Last  200 lines from daemon log file - /Users/user_name/.m2/mvnd/registry/0.8.0/daemon-d542b597.log -----
19:48:52.056 D Initializing daemon with properties:
     mvnd.home=/usr/local/Cellar/mvnd/0.8.0/libexec
     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

19:48:52.061 I Daemon started
19:48:52.062 D daemon is running. Sleeping until state changes.
----- End of the daemon log file -----
  output: /Users/user_name/.m2/mvnd/registry/0.8.0/daemon-d542b597.out.log
----- Last  200 lines from daemon output - /Users/user_name/.m2/mvnd/registry/0.8.0/daemon-d542b597.out.log -----
NOTE: Picked up 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
----- 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:58138.
	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

@finalcreator
Copy link

when I upgrade jdk it start working now, but maybe it not the root cause.

openjdk 11.0.15 2022-04-19 LTS
OpenJDK Runtime Environment Zulu11.56+19-CA (build 11.0.15+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.56+19-CA (build 11.0.15+10-LTS, mixed mode)

mvnd 0.8.0 darwin-amd64 native client (2cfffe2)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty
Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)

@errodrigues
Copy link

errodrigues commented Oct 5, 2022

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
It had been working just fine and stopped all of a sudden. Can't figure out why. Triple checked I'm using vanilla configuration.

mvnd -version
mvnd 0.8.1 darwin-amd64 native client (821c6a54a20ce4c4a2b94419334aaf125a128caf)
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: Could not connect to the Maven daemon.
Daemon id: 14a63473
  log file: /Users/user_name/.m2/mvnd/registry/0.8.1/daemon-14a63473.log
----- Last  200 lines from daemon log file - /Users/user_name/.m2/mvnd/registry/0.8.1/daemon-14a63473.log -----
12:25:51.701 D Initializing daemon with properties:
     mvnd.home=/usr/local/Cellar/mvnd/0.8.1/libexec
     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

12:25:51.705 I Daemon started
12:25:51.706 D daemon is running. Sleeping until state changes.
----- End of the daemon log file -----
  output: /Users/user_name/.m2/mvnd/registry/0.8.1/daemon-14a63473.out.log
----- Last  200 lines from daemon output - /Users/user_name/.m2/mvnd/registry/0.8.1/daemon-14a63473.out.log -----
NOTE: Picked up 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
----- 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:308)
	at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:131)
Caused by: org.mvndaemon.mvnd.common.DaemonException$ConnectException: Could not connect to server /127.0.0.1:55672.
	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

@errodrigues
Copy link

Today I upgraded mvnd to 0.8.2 (via brew) and also upgraded GraalVM to 22.2.0.1 but same issue still persists.

@usmanakram232
Copy link

I have been using 0.8.2 for a while on Fedora 3. But since last week, I also started having the same issue. Unfortunately, I am unable to put my finger on the change which would have triggered this issue. I have tried with Amazon's JDK corretto-17.0.4.1 and corretto-19.

Error message:

❯ mvnd --help
Exception in thread "main" org.mvndaemon.mvnd.common.DaemonException$ConnectException: Could not connect to the Maven daemon.
Daemon id: 65300677
  log file: /home/usman/.m2/mvnd/registry/0.8.2/daemon-65300677.log
----- Last  200 lines from daemon log file - /home/usman/.m2/mvnd/registry/0.8.2/daemon-65300677.log -----
10:00:03.651 D Initializing daemon with properties:
     mvnd.home=/home/usman/.local/lib/apache-maven-mvnd-0.8.2
     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

10:00:03.654 I Daemon started
10:00:03.655 D daemon is running. Sleeping until state changes.
----- End of the daemon log file -----
  output: /home/usman/.m2/mvnd/registry/0.8.2/daemon-65300677.out.log
----- Last  200 lines from daemon output - /home/usman/.m2/mvnd/registry/0.8.2/daemon-65300677.out.log -----
NOTE: Picked up 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
----- 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:310)
	at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:144)
Caused by: org.mvndaemon.mvnd.common.DaemonException$ConnectException: Could not connect to server /127.0.0.1:39405.
	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

installation path:

❯ which mvnd
~/.local/lib/apache-maven-mvnd-0.8.2/bin/mvnd

JDK/maven versions:

❯ java --version
openjdk 19 2022-09-20
OpenJDK Runtime Environment Corretto-19.0.0.36.1 (build 19+36-FR)
OpenJDK 64-Bit Server VM Corretto-19.0.0.36.1 (build 19+36-FR, mixed mode, sharing)

❯ mvn --version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /home/usman/.local/lib/apache-maven-3.8.6
Java version: 19, vendor: Amazon.com Inc., runtime: /home/usman/.jdks/corretto-19
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.0.7-200.fc36.x86_64", arch: "amd64", family: "unix"

mvnd status:

❯ mvnd --status
      ID      PID                   Address   Status    RSS            Last activity  Java home
93f18529    22484     inet:/127.0.0.1:44147  StopRequested   135m  2022-11-15T10:47:27.596  /home/usman/.jdks/corretto-19
65300677    17461     inet:/127.0.0.1:39405  StopRequested   129m  2022-11-15T10:00:03.652  /home/usman/.jdks/corretto-19

and output from java -jar $MVND_HOME/mvn/lib/ext/jansi-2.4.0.jar

❯ java -jar $MVND_HOME/mvn/lib/ext/jansi-2.4.0.jar
Jansi 2.4.0

library.jansi.path=
library.jansi.version=
Jansi native library loaded from /tmp/jansi-2.4.0-d7e910c754cc9851-libjansi.so
   which was auto-extracted from jar:file:/home/usman/.local/lib/apache-maven-mvnd-0.8.2/mvn/lib/ext/jansi-2.4.0.jar!/org/fusesource/jansi/internal/native/Linux/x86_64/libjansi.so

os.name= Linux, os.version= 6.0.7-200.fc36.x86_64, os.arch= amd64
file.encoding= UTF-8
java.version= 19, java.vendor= Amazon.com Inc., java.home= /home/usman/.jdks/corretto-19

jansi.graceful=
jansi.mode=
jansi.out.mode=
jansi.err.mode=
jansi.colors=
jansi.out.colors=
jansi.err.colors=
jansi.passthrough= false
jansi.strip= false
jansi.force= false
jansi.noreset= false
org.fusesource.jansi.Ansi.disable= false

IS_WINDOWS: false

isatty(STDOUT_FILENO): 1, System.out is a terminal
isatty(STDERR_FILENO): 1, System.err is a terminal

Resulting Jansi modes for stout/stderr streams:
  - System.out: AnsiPrintStream{type=Native, colors=TrueColor, mode=Default, resetAtUninstall=true}
  - System.err: AnsiPrintStream{type=Native, colors=TrueColor, mode=Default, resetAtUninstall=true}
Processor types description:
  - Native: Supports ansi sequences natively
  - Unsupported: Ansi sequences are stripped out
  - VirtualTerminal: Supported through windows virtual terminal
  - Emulation: Emulated through using windows API console commands
  - Redirected: The stream is redirected to a file or a pipe
Colors support description:
  - Colors16: 16 colors
  - Colors256: 256 colors
  - TrueColor: 24-bit colors
Modes description:
  - Strip: Strip all ansi sequences
  - Default: Print ansi sequences if the stream is a terminal
  - Force: Always print ansi sequences, even if the stream is redirected

test on System.out: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
            bright: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
              bold: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
             faint: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
        bold+faint: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
        256 colors:





         truecolor: /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\
test on System.err: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
            bright: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
              bold: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
             faint: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
        bold+faint: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
        256 colors:





         truecolor: /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                    /\/\/\/\/\/\/\/\

                      ┌──┐┌─────┐ ┌─────┐ ┌──────┬──┐
                      │██├┘█████└┬┘█████└┬┘██████│▐▌│
                 ┌──┐ │██│██▄▄▄██│██┌─┐██│██▄▄▄▄ │▄▄│
                 │▒▒└─┘▒█│▒█┌─┐▒█│▒█│ │▒█│ ▀▀▀▀▒█│▒█│
                 └┐▓▓▓▓▓┌┤▓▓│ │▓▓│▓▓│ │▓▓│▀▓▓▓▓▓▀│▓▓│
                  └─────┘└──┘ └──┴──┘ └──┴───────┴──┘

@ishantagarwal-x213235
Copy link

ishantagarwal-x213235 commented Dec 6, 2022

I have also upgraded the maven daemon to 0.8.2 version and set the daemon properties to

-Dmvnd.keepAlive=10000
-Dmvnd.maxLostKeepAlive=120

but still getting intermittent error for DaemonExceptionConnectException

Exception in thread "main" org.mvndaemon.mvnd.common.DaemonException$ConnectException: Timeout waiting to connect to the Maven daemon.
Daemon id: 5013a5e2
log file: /home/runner/.m2/mvnd/registry/0.8.2/daemon-5013a5e2.log
----- Last  200 lines from daemon log file - /home/runner/.m2/mvnd/registry/0.8.2/daemon-5013a5e2.log -----
12:11:34.750 D Initializing daemon with properties:
   mvnd.home=/home/runner/.mavend
   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=10s
   mvnd.extClasspath=
   mvnd.coreExtensions=
   mvnd.enableAssertions=false
   mvnd.expirationCheckDelay=10s
   mvnd.duplicateDaemonGracePeriod=10s
   mvnd.socketFamily=inet

12:11:34.874 I Daemon started
12:11:34.909 D daemon is running. Sleeping until state changes.
----- End of the daemon log file -----
output: /home/runner/.m2/mvnd/registry/0.8.2/daemon-5013a5e2.out.log
----- Last  200 lines from daemon output - /home/runner/.m2/mvnd/registry/0.8.2/daemon-5013a5e2.out.log -----

----- End of the daemon output -----

        at org.mvndaemon.mvnd.client.DaemonConnector.startDaemon(DaemonConnector.java:298)
        at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:121)
        at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:310)
        at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:144)

@gnodet
Copy link
Contributor

gnodet commented Jan 24, 2023

This should be fixed by #778, please reopen if needed.

@gnodet gnodet closed this as completed Jan 24, 2023
@tedchang77
Copy link

@gnodet this is great news. any timelines on when the 0.9.0 release will be available?

@ahoehma
Copy link

ahoehma commented Feb 4, 2024

I' using latest build maven-mvnd-1.0-m8-m40-windows-amd64 and got also this kind of errors ...

Exception in thread "main" org.mvndaemon.mvnd.common.DaemonException$ConnectException: Timeout waiting to connect to the Maven daemon.
Daemon id: 605f900c
  log file: C:\Users\hoehmann\.m2\mvnd\registry\1.0-m8\daemon-605f900c.log
----- Last  200 lines from daemon log file - C:\Users\hoehmann\.m2\mvnd\registry\1.0-m8\daemon-605f900c.log -----

----- End of the daemon log file -----
  output: C:\Users\hoehmann\.m2\mvnd\registry\1.0-m8\daemon-605f900c.out.log
----- Last  200 lines from daemon output - C:\Users\hoehmann\.m2\mvnd\registry\1.0-m8\daemon-605f900c.out.log -----
Starting daemon process: id = 605f900c, workingDir = D:\Dev\ApacheMaven\maven-mvnd-1.0-m8-m40-windows-amd64, daemonArgs: D:\Dev\Java\jdk-17.0.4\bin\java.exe -classpath D:\Dev\ApacheMaven\maven-mvnd-1.0-m8-m40-windows-amd64\mvn\boot\plexus-classworlds-2.6.0.jar -javaagent:D:\Dev\ApacheMaven\maven-mvnd-1
.0-m8-m40-windows-amd64\mvn\lib\mvnd\mvnd-agent-1.0-m8.jar -Dmvnd.home=D:\Dev\ApacheMaven\maven-mvnd-1.0-m8-m40-windows-amd64 -Dmaven.home=D:\Dev\ApacheMaven\maven-mvnd-1.0-m8-m40-windows-amd64\mvn -Dmaven.conf=D:\Dev\ApacheMaven\maven-mvnd-1.0-m8-m40-windows-amd64\mvn\conf -Dclassworlds.conf=D:\Dev\Ap
acheMaven\maven-mvnd-1.0-m8-m40-windows-amd64\bin\mvnd-daemon.conf -Dorg.slf4j.simpleLogger.logFile=C:\Users\hoehmann\.m2\mvnd\registry\1.0-m8\daemon-605f900c.log -Dmvnd.java.home=D:\Dev\Java\jdk-17.0.4 -Dmvnd.id=605f900c -Dmvnd.daemonStorage=C:\Users\hoehmann\.m2\mvnd\registry\1.0-m8 -Dmvnd.registry=C
:\Users\hoehmann\.m2\mvnd\registry\1.0-m8\registry.bin -Dmvnd.socketFamily=inet -Dmvnd.home=D:\Dev\ApacheMaven\maven-mvnd-1.0-m8-m40-windows-amd64 -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-o
pens java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED -Dmvnd.noDaemon=false -Dmvnd.debug=false -Dmvnd.debug.address=8000 -Dmvnd.idleTimeout=3h -Dmvnd.keepAlive=100ms -Dmvnd.extClasspath= -Dmvnd.coreExtensions= -Dmvnd.enableAssertions=false -Dmvnd.expirationChe
ckDelay=10s -Dmvnd.duplicateDaemonGracePeriod=10s -Dmvnd.socketFamily=inet org.codehaus.plexus.classworlds.launcher.LauncherNOTE: Picked up 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 jav
a.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED
----- End of the daemon output -----

        at org.mvndaemon.mvnd.client.DaemonConnector.startDaemon(DaemonConnector.java:330)
        at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:123)
        at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:339)
        at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:161)

But then

mvnd --status shows that process ...

      ID      PID                   Address   Status    RSS            Last activity  Java home
15e6c0ca    20040     inet:/127.0.0.1:23817     Busy   128m  2024-02-04T15:41:34.467  D:\Dev\Java\jdk-17.0.4

And then later I can use the mvnd ... so building works. Its just this first logging about timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests