Skip to Content
0
Aug 11, 2023 at 12:07 PM

Java Cap remote debugging not working with Java 17

317 Views

Hello dear community,

Since our setup of our Java CAP application, we have ben able to remotely connect to our deployed application on the provider account following this and similar guides, like debugging instructions for SapMachine. Since we upgraded our Java version to Java 17, we have not been able to connect to our deployed application even with different variants in our manifest.yml.

This is our current manifest.yml (commented out are other attempts that did not resolve the issue):

image.png

Following the instructions in the SapMachine guide, in Step 2 we also had an error which we could not really identify and thus had to stop the process:
cf ssh javacap -c "export JAVA_PID=`ps -C java -o pid=` && app/META-INF/.sap_java_buildpack/sap_machine_jre/bin/jcmd $JAVA_PID VM.start_java_debugging"

-> /bin/bash: line 0: export: `2064': not a valid identifier


This is what our mta.yaml for the application we deploy looks like:

image.png

The observed behaviour is the following:

-> SSH is enabled

-> Connection through commandline is successful and behaves like we are used to:

image.png

> When we try to start the debugger and connect to the application through VS-Code the connection is being refused and the connection breaks:

image.png

additional info: here is our launch config to attach to the running ssh-connection:

image.png

This exact setup worked with our Java11 application and then somehow stopped working.

If there is any other information I can supply, please inform me.

Thank you in advance,

Pascal.

Attachments

image.png (148.1 kB)
image.png (22.4 kB)
image.png (33.2 kB)
image.png (132.8 kB)
image.png (12.6 kB)