[FOLIO-886] add java remote debugging as standard for docker java images Created: 13/Jul/17  Updated: 12/Nov/18  Resolved: 20/Dec/17

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: shale99 Assignee: John Malconian
Resolution: Done Votes: 0
Labels: ci, sprint24, sprint25, sprint26, sprint27, sprint28
Remaining Estimate: 6 hours
Time Spent: 2 days, 2 hours
Original estimate: Not Specified

Issue links:
Blocks
is blocked by FOLIO-926 Explicitly set port mappings for dock... Closed
Relates
relates to FOLIO-976 Use real module jar rather than modul... Closed
relates to FOLIO-968 Container RAM usage is getting out of... Closed
Sprint:

 Description   

when there is a bug to fix in a biz logic module which depends on storage modules / other biz modules - there is sometimes a need to debug the modules in the black box in order to better understand the problem
for java modules this can be done by adding the following to the java command that is used to start the verticle
java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar <module-fat>.jar

note that the port needs to be different per module (and exposed) so that we can connect via a remote debugger



 Comments   
Comment by shale99 [ 13/Jul/17 ]

Wayne Schneider , John Malconian - is this something you can handle? it is very difficult to debug any biz module that needs to access multiple modules running within the black box

Comment by John Malconian [ 13/Jul/17 ]

shale99 I'll take it

Comment by shale99 [ 15/Jul/17 ]

thanks

Comment by John Malconian [ 06/Oct/17 ]

Fabric8 has some interesting Java Docker images in their Docker repositories. One that caught my eye in particular was
https://hub.docker.com/r/fabric8/java-alpine-openjdk8-jdk/ . It's an openjdk-8 alpine based image with two kinds of JMX hooks built in - one for Jolokia and the other is jmx_exporter which is used by Prometheus. Test this image with some of our server-side FOLIO modules.

Comment by John Malconian [ 27/Oct/17 ]

Implemented much of the excellent fabric8 JMX work into FOLIO java-base docker images which are now on Docker Hub at folioci/openjdk8-jre and folioci/openjdk8-jre-alpine. The latest Okapi core docker images is now based on this. Still need to convert other java-based docker image to use the new JMX-enabled base images.

Comment by John Malconian [ 20/Dec/17 ]

All java-based modules are now using the fabric8-based Docker images - either folioci/openjdk8-jre or folioci/openjdk8-jre-alpine. More information on those images can be found here:

https://github.com/folio-org/folio-tools/tree/master/folio-java-docker/openjdk8

Generated at Thu Feb 08 23:09:03 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.