exadel-inc / exadel-inc/CompreFace

Having JDWP enabled breaks usability in podman pods.

Open
#1,101 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

If I take the docker-compose and translate all the env-variables and stuff into podman to a buildah file, the compreface-admin part will fail to start due to:

```
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)

```
This is due to ADMIN and API both having JDWP enabled on the same port. In podman the containers in a pod implicitly share a network namespace. This allows e.g. the pod to share a single public IP.

JDWP is enabled here:

```
cat dev/Dockerfile |grep jdwp
ENTRYPOINT ["sh","-c","java $API_JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar /home/app.jar"]
ENTRYPOINT ["sh","-c","java $ADMIN_JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar /home/app.jar"]
```
Now wouldn't it be more prudent to not enable the JDWP interface by default? I'm no java expert, but sounds like it's not used for control plane traffic. If someone want's to debug things, then enable it in API_JAVA_OPTS or ADMIN_JAVA_OPTS.

There seems to be no way to disable it as trying to e.g. change the port results in:

`ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.