apache / apache/maven-mvnd

Unsupported socket address: ''

Open
#931 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.5k
Forks
250
Avg merge
16h 22m
Merged PRs (30d)
36

Description

We use Jenkins to build our project with Kubernetes agents, so a brand new agent container is created for every build.
Without any notable changes, we ran into the following issue:
```
+ mvnd clean install

Apr 15, 2024 2:50:15 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
[main] WARNING org.jline - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
Apache Maven Daemon (mvnd) 1.0-m8 linux-amd64 native client (0f4bdb6df5e74453d8d558d292789da4e66a7933)
Terminal: org.jline.terminal.impl.DumbTerminal
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported socket address: ''
at org.mvndaemon.mvnd.common.SocketFamily.fromString(SocketFamily.java:105)
at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:565)
at org.mvndaemon.mvnd.client.DaemonConnector.connectToDaemon(DaemonConnector.java:534)
at org.mvndaemon.mvnd.client.DaemonConnector.connectToDaemonWithId(DaemonConnector.java:519)
at org.mvndaemon.mvnd.client.DaemonConnector.startDaemon(DaemonConnector.java:318)
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)
```
The build failed.
Restarting the build (with another brand new agent container) "fixed" the issue.

No clue what the cause was. There were zero changes to our code, or the build environment.

Cannot reproduce.
But wanted to post it anyway in case this isn't 1:10000 edge-case, and others might find a reproduction scenario.

Not sure in what case https://github.com/apache/maven-mvnd/blob/master/common/src/main/java/org/mvndaemon/mvnd/common/DaemonInfo.java#L87 `DaemonInfo.getAddress()` might return an empty String, but apparently it's possible.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with common/src/main/java/org/mvndaemon/mvnd/common/DaemonInfo.java around getAddress(), then trace DaemonConnector.connect() and SocketFamily.fromString(). Investigate how an empty socket address can reach this path in a fresh Jenkins Kubernetes agent; done requires a reproducible cause or a confirmed way to handle the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.