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
Status: CLOSED NOTABUG
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:
Blocks:
  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:
Environment:
Last Closed: 2014-07-03 08:23:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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:
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 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.