Bug 1013713 - EAP6 becomes unavailable in JON 3.2 after events started to be monitored
EAP6 becomes unavailable in JON 3.2 after events started to be monitored
Product: JBoss Operations Network
Classification: JBoss
Component: UI (Show other bugs)
JON 3.2
Unspecified Unspecified
unspecified Severity high
: ---
: JON 3.3.0
Assigned To: Libor Zoubek
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2013-09-30 12:02 EDT by jvlasak
Modified: 2015-11-01 19:43 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-07-03 08:23:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Screenshot of unavailable EAP (190.18 KB, image/png)
2013-09-30 12:02 EDT, jvlasak
no flags Details
Thrown exception (4.19 KB, text/plain)
2013-09-30 12:04 EDT, jvlasak
no flags Details

  None (edit)
Description jvlasak 2013-09-30 12:02:50 EDT
Created attachment 805328 [details]
Screenshot of unavailable EAP

Description of problem:
EAP6 becomes unavailable in JON 3.2 after events started to be monitored using event log file when date format is considered.

Version-Release number of selected component (if applicable):
Version: 3.2.0.ER1
Build Number: 54dd29c:464a643

How reproducible:

Steps to Reproduce:
1. Start JBoss ON 3.2 system.
2. Import RHQ Agent and RHQ Server into inventory.
3. Create /tmp/generateLog using the script below.
4. Then run /tmp/generateLog to generate our random log data:
    a) chmod +x /tmp/generateLog
    b) /tmp/generateLog /tmp/file.log 2>/dev/null &
5. Modify RHQ Agent resource configuration Event Report Max Per Source and Event Report Max Total to 1000 and 10000.
6. Click on Inventory, then on Servers - Top Level Imports under Resources section, then on EAP and go to its subtab Connection Settings under tab Inventory.
7. In section Events add event logging source using generated log file /tmp/file.log and set the following:
    a) Enabled = Yes
    b) Date Format = YYYY-mm-dd HH:mm:ss,SSS
    c) Includes Pattern = Unset
    d) Minimum Severity = Unset

8. In section Advanced set Availability Check Period to 60 seconds and click on Save button.
9. EAP goes down in a moment (screenshot and thrown exception are in the attachments).     

File: /tmp/generateLog



$(echo Thread-{0..99})
$(echo Fake-{0..9}))


logMessages=("A log message"
"Another log message"
"A log message with some meaning"
"A log message without any meaning"
"To be a log message or not to be"
"To infinity and beyond"
"Every rose has its throne"
"Come out and pay"
"That thing wasn't supposed to do that."
"Now that's what I'm talking about"'!'
"Friends don't let friends eat grapefruit")

function printRandomLogLevel() {
    echo -n ${logLevels[$((RANDOM%numLogLevels))]}

function printRandomLogThread() {
    echo -n ${logThreads[$((RANDOM%numLogThreads))]}

function printRandomLogCategory() {
    echo -n ${logCategories[$((RANDOM%numLogCategories))]}

function printRandomLogMessage() {
    echo -n ${logMessages[$((RANDOM%numLogMessages))]}

function printLogTimestamp() {
    timestamp=$(date +"%F %T|%N")
    ms="$(printf "%03d" $(( 10#${timestamp#*|}/1000000 )))"
    echo -n "${timestamp%|*},${ms}"

function printRandomLogEntry() {
    echo "$(printLogTimestamp) $(printRandomLogLevel) [$(printRandomLogThread)] ($(printRandomLogCategory)) $(printRandomLogMessage)"

function printRandomLogEntries() {

    while [ true ]; do
        [ $((${maxSleepTime}-(${totalSleepTime}+${randomSleep}))) -lt 0 ] && randomSleep=$((${randomSleep} +(${maxSleepTime}-(${totalSleepTime}+${randomSleep}))))
        echo >&2 Sleeping for ${randomSleep} seconds...
        sleep ${randomSleep}s
        [ $((${maxEntries}-(${totalEntries}+${randomNumEntries}))) -lt 0 ] && randomNumEntries=$((${randomNumEntries} +(${maxEntries}-(${totalEntries}+${randomNumEntries}))))
        echo >&2 Printing ${randomNumEntries} log entries...
        for ((i=0; i<randomNumEntries; i++)); do
            [ $# -gt 0 ] && {
                echo $(printRandomLogEntry) >>"$1"
            } || {
                echo $(printRandomLogEntry)
        [ ${totalEntries} -ge ${maxEntries} -o ${totalSleepTime} -ge ${maxSleepTime} ] && break
    echo >&2 Total entries is ${totalEntries} and total sleep time was ${totalSleepTime} seconds.

printRandomLogEntries $@

Actual results:
EAP becomes unavailable.

Expected results:
EAP is available.

Additional info:
Comment 1 jvlasak 2013-09-30 12:04:01 EDT
Created attachment 805331 [details]
Thrown exception
Comment 2 jvlasak 2013-10-01 10:46:08 EDT
The bug is also in Version-Release number:

Version: 3.2.0.ER2
Build Number: 9bf6f76:371eac0
Comment 4 Simeon Pinder 2013-11-08 09:41:31 EST
Moving to unspecified target milestone as only JON 3.2.0 'blockers'(https://url.corp.redhat.com/bz-jon32-blockers-list-notmodified-nodocs) will make it into subsequent builds after ER5.
Comment 6 Libor Zoubek 2014-07-03 08:23:46 EDT
This is expected behaviour since resource configuration was invalid (dateTime format in particular). Odly enough, format "YYYY-mm-dd HH:mm:ss,SSS" is valid (at least on JDK 1.7)

When plugin configuration is invalid, there is a yellow triangle (right top corner) which notifies user he screwed something up.

Supressing this exception would lead to user confusion, because event's wouldn't be collected at all and user would have no way to find out (except agent log of course).

Closing this one as NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.