Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
ggeorge
Posts: 10
Joined: Mon Dec 08, 2014 3:32 am

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by ggeorge »

hi again,
let me be more specific, i ve got the error in the following places:
server statistics-->message count
server statistics-->message volume
server statistics-->anti spam/virus activity
advanced statistics->group zmmtastats (all counters)

in addition:
advanced statistics->zmstatuslog (all counters) are dead lines (0 values) on all charts (without any error)

thanks in advance
User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2782
Joined: Thu May 22, 2014 4:47 pm

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by jorgedlcruz »

Hi  ggeorge,
First do you have a Self-Siged certificate? Execute the next command for view the info of the certificate:
/opt/zimbra/bin/zmcertmgr viewdeployedcrt
I recommend regenerate:
/opt/zimbra/bin/zmcertmgr createca -new
/opt/zimbra/bin/zmcertmgr createcrt -new -days 365
/opt/zimbra/bin/zmcertmgr deploycrt self
/opt/zimbra/bin/zmcertmgr deployca
/opt/zimbra/bin/zmcertmgr viewdeployedcrt
zmcontrol restart
Then try again the next command:
cd /opt/zimbra/bin/
./zmsshkeygen
./zmupdateauthkeys

Best regards!
Jorge de la Cruz https://jorgedelacruz.es
Systems Engineer at Veeam Software https://www.veeam.com/
ggeorge
Posts: 10
Joined: Mon Dec 08, 2014 3:32 am

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by ggeorge »

dear jorge,

let me clarify something, i have found the current zimbra installation so it isn't installed by me.

this installation serves near 3000 accounts for 6 months.

i will run 'zmcertmgr viewdeployedcrt' tomorrow morning at the office but could you explain to me why we need this step?

we have installed SSL domain certificate from TERENA CA, the same one we use for all web services.

i thought we need self signed certificates when real ones can't be provided.
User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2782
Joined: Thu May 22, 2014 4:47 pm

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by jorgedlcruz »

Hi ggeorge,

If you have a commercial SSL, then you don't should run the commands that I've provided you.



Did you change the SSH port?



Best regards
Jorge de la Cruz https://jorgedelacruz.es
Systems Engineer at Veeam Software https://www.veeam.com/
ggeorge
Posts: 10
Joined: Mon Dec 08, 2014 3:32 am

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by ggeorge »

nope, standard ssh port 22
ggeorge
Posts: 10
Joined: Mon Dec 08, 2014 3:32 am

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by ggeorge »

hi Jorge,

zmcertmgr viewdeployedcrt output is OK



any other ideas?



could you check or send me the source code from at com.zimbra.cs.service.admin.GetLoggerStats of Release 8.0.7_GA_6020.RHEL6_64_20140321160526 RHEL6_64 FOSS edition, Patch 8.0.7_P2.



i am developer so i may find what is going wrong
User avatar
msquadrat
Advanced member
Advanced member
Posts: 183
Joined: Mon Oct 14, 2013 10:09 am

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by msquadrat »

Glancing at the source in GetLoggerStats.java:328 it looks like this happens when some CSV data for your statistics is corrupt. Ie. when a line of data has less columns than the header.
User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2782
Joined: Thu May 22, 2014 4:47 pm

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by jorgedlcruz »

Hi ggeorge,

Do you have the user and group zimbra in all the files inside this folder /opt/zimbra/zmstat/*



Run please a zmstatctl restart and wait 10 minutes, then try again. Other issue is like Malte says, some corruption in some CSV.



Best regards
Jorge de la Cruz https://jorgedelacruz.es
Systems Engineer at Veeam Software https://www.veeam.com/
ggeorge
Posts: 10
Joined: Mon Dec 08, 2014 3:32 am

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by ggeorge »

thanks guys for your help,

'zmstatctl restart' was one of the first things i have tried with no luck.



how can i recreate all the csv & charts files?

just deleting all files from /opt/zimbra/zmstat/* ?
User avatar
msquadrat
Advanced member
Advanced member
Posts: 183
Joined: Mon Oct 14, 2013 10:09 am

Java error appears when I open server statistics: "ArrayIndexOutOfBoundsException"

Post by msquadrat »

I think just purging the files is not a good idea because they are referenced in the sqlite database but maybe somebody has a pointer to a wiki page or something which discussing resetting the zmstats data.





If you like you can try the following command (will run a while):



find /opt/zimbra/zmstat -name '*.csv.gz' -print | while read f; do zcat "$f" | tr -c -d ',
' | sort -u | sed -e "s:^:$f :"; done | cut -d ' ' -f 1 | sort | uniq -c | awk '$1 != 1 { print $2 }'



This should show you all archived csv files which have lines with a different number of columns. I actually get a few mailboxd.csv.gz and ldap.csv.gz but in those cases they have lines which have *more* columns than the header (and look like garbage). But that might be a start to find your bad file (if my theory is right).
Post Reply