Sometimes, JBoss reports that it is unable to bind to a port, saying it is already in use. However, this is not always the case.
Tag Archive: jboss
Sep 25
JBoss run.sh may be harmful
A coworker and I discovered an issue with jboss’ run.sh (which starts the app server). The problem lies in different flavours of unix (or unix-like) shells returning different values for wait. The relevant code is:
1 2 3 4 5 6 7 |
# Wait until the background process exits WAIT_STATUS=0 while [ "$WAIT_STATUS" -ne 127 ]; do JBOSS_STATUS=$WAIT_STATUS wait $JBOSS_PID 2>/dev/null WAIT_STATUS=$? done |
This is all well and good in linux — redhat uses /bin/bash and ubuntu uses /bin/dash for /bin/sh — …