0

I know this question has been asked a lot, however none of the answers are resolving my issue(s).

Steps I take:

  1. I add -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8765 to the JAVA_TOOL_OPTIONS so it looks like this
- name: JAVA_TOOL_OPTIONS
          value: -XX:+ExitOnOutOfMemoryError -Xms512m -Xmx1g -Xss256k -Dhttp.maxConnections=1000
            -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8765 -Dlogging.config=classpath:logback-kube.xml
  1. I run kubectl port-forward [pod name] 8765:8765

  2. I make a debug configuration in IntelliJ that looks like the following screenshot debug configuration

  3. run the debug configuration I just made.

This breaks on step 1. By breaks I mean the pod enters the CrashLoopBackOff state.

What am I missing? If I need to upload more info please let me know and I'll add it as soon as I can.

Container logs (retrieved using kubectl logs [pod name]): Picked up JAVA_TOOL_OPTIONS: -XX:+ExitOnOutOfMemoryError -Xms512m -Xmx1g -Xss256k -Dhttp.maxConnections=1000 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5010 -Dlogging.config=classpath:logback-kube.xml ERROR: transport error 202: gethostbyname: unknown host 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]

Fluffy Cow
  • 63
  • 1
  • 7

1 Answers1

0

The solution was rather simple. -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8765

should be changed to -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8765

Fluffy Cow
  • 63
  • 1
  • 7