Bug 1013713 - EAP6 becomes unavailable in JON 3.2 after events started to be monitored
Summary: EAP6 becomes unavailable in JON 3.2 after events started to be monitored
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: JON 3.3.0
Assignee: Libor Zoubek
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-30 16:02 UTC by jvlasak
Modified: 2015-11-02 00:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-03 12:23:46 UTC
Type: Bug
Embargoed:


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

Description jvlasak 2013-09-30 16:02:50 UTC
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:
always

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
------------------------------------------------------------------------
#!/bin/sh
#

maxSleepTimePerSleep=2
maxEntriesPerSleep=5
maxEntries=1000000
maxSleepTime=3600





logLevels=("FATAL"
"ERROR"
"WARN "
"INFO "
"DEBUG"
"TRACE")

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

logCategories=(apache.cassandra.db.commitlog.CommitLogReplayer
org.jboss.as.server.deployment 
org.jboss.as.messaging 
org.some.other.category)

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() {
    numLogLevels=${#logLevels[*]}
    echo -n ${logLevels[$((RANDOM%numLogLevels))]}
}

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

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

function printRandomLogMessage() {
    numLogMessages=${#logMessages[*]}
    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() {
    totalSleepTime=0
    totalEntries=0

    while [ true ]; do
        randomSleep=$((RANDOM%${maxSleepTimePerSleep}))
        [ $((${maxSleepTime}-(${totalSleepTime}+${randomSleep}))) -lt 0 ] && randomSleep=$((${randomSleep} +(${maxSleepTime}-(${totalSleepTime}+${randomSleep}))))
        echo >&2 Sleeping for ${randomSleep} seconds...
        sleep ${randomSleep}s
        totalSleepTime=$((totalSleepTime+$randomSleep))
        randomNumEntries=$((RANDOM%${maxEntriesPerSleep}))
        [ $((${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)
            }
        done
        totalEntries=$((totalEntries+${randomNumEntries}))
        [ ${totalEntries} -ge ${maxEntries} -o ${totalSleepTime} -ge ${maxSleepTime} ] && break
    done
    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 16:04:01 UTC
Created attachment 805331 [details]
Thrown exception

Comment 2 jvlasak 2013-10-01 14:46:08 UTC
The bug is also in Version-Release number:

Version: 3.2.0.ER2
Build Number: 9bf6f76:371eac0

Comment 4 Simeon Pinder 2013-11-08 14:41:31 UTC
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 12:23:46 UTC
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.