Description of problem: EAP 6.4.4 start-up script $JBOSS_HOME/bin/init.d/jboss-as-standalone.sh tries to get successful start timestamp using following command: grep -o '[0-9]*' $JBOSS_MARKERFILE This however does not work on RHEL 5 OS, as grep-2.5.1 does not return regular expression result correctly when used with -o option. Version-Release number of selected component (if applicable): JBoss EAP 6.4 CP04 bring this change in the script that is not working properly. How reproducible: Everytime Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: As a temporary workaround, regular expression can be modified and script then works as expected. Here is an example of such workaround command: grep -o '[0-9]\+' $JBOSS_MARKERFILE
So here is the meaning of the regular expressions: -o, --only-matching Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line. Repetition * The preceding item will be matched zero or more times. + The preceding item will be matched one or more times. I tried testing grep with -o option with both the regular expressions on RHEL5 as well as RHEL6 and RHEL7. Definitely there are differences and See the following. For RHEL5: [root@rhel5 ~]# cat testrhel5 pushpendra 01042016 082236 12345678 90876abcd chavantest123 linux4you [root@rhel5 ~]# grep -o '[0-9]*' testrhel5 01042016 082236 12345678 90876 For RHEL6: [root@rhel6 ~]# cat testrhel6 pushpendra 01042016 082236 12345678 90876abcd chavantest123 linux4you [root@rhel6 ~]# grep -o '[0-9]*' testrhel6 01042016 082236 12345678 90876 123 4 For RHEL7: [root@rhel7 ~]# cat testrhel7 pushpendra 01042016 082236 12345678 90876abcd chavantest123 linux4you [root@rhel7 ~]# grep -o '[0-9]*' testrhel7 01042016 082236 12345678 90876 123 4 Whereas for all RHEL5/6/7, we get same output for following regular expression. [root@rhel5 ~]# grep -o '[0-9]\+' testrhel5 01042016 082236 12345678 90876 123 4 [root@rhel6 ~]# grep -o '[0-9]\+' testrhel6 01042016 082236 12345678 90876 123 4 [root@rhel7 ~]# grep -o '[0-9]\+' testrhel7 01042016 082236 12345678 90876 123 4
This deserves an upstream fix and also in jboss-as-domain.sh
Thanks for noticing this. Original PR is updated and additional PRs are created
Vlado Pakan <vpakan> updated the status of jira JBEAP-4590 to Resolved
Workaround is working as expected hence verified for EAP-6.4.16-CP.CR1; Note: Mentioned change in behavior was introduced in `grep-2.5.3`
Released on June 20 2017 as part of the EAP 6.4.16 maintenance release.