Skip to content

Commit

Permalink
Fix the JDWP setup for rhn-search and align tomcat port for containers
Browse files Browse the repository at this point in the history
When running the server container on k3s we cannot use port 8000 for
tomcat debugging as it's already used by traefik. This port will move to
8003 from now on to be consistent everywhere.
  • Loading branch information
cbosdo committed Sep 29, 2023
1 parent a447e5d commit d16f5e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions salt/server/spacewalk-search.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ spacewalk_search_config:
file.append:
- name: /usr/share/rhn/config-defaults/rhn_search_daemon.conf
- text: |
wrapper.java.additional.1=-Xdebug
wrapper.java.additional.2=-Xrunjdwp:transport=dt_socket,address=8002,server=y,suspend=n
wrapper.java.additional.3=-Dcom.sun.management.jmxremote.port=3335
wrapper.java.additional.4=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.5=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.6=-Djava.rmi.server.hostname={{ salt['network.interfaces']()['eth0']['inet'][0]['address'] }}
JAVA_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,address=*:8002,server=y,suspend=n'
- require:
- sls: server

Expand Down
2 changes: 1 addition & 1 deletion salt/server/tomcat.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tomcat_config:
file.replace:
- name: /etc/tomcat/conf.d/remote_debug.conf
- pattern: 'JAVA_OPTS="(?!-Xdebug)(.*)"'
- repl: 'JAVA_OPTS=" $JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=*:8000,server=y,suspend=n "'
- repl: 'JAVA_OPTS=" $JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=*:8003,server=y,suspend=n "'
- append_if_not_found: True
- ignore_if_missing: True
- require:
Expand Down

0 comments on commit d16f5e4

Please sign in to comment.