Discussion:
zeneventserver SQLException: Can't find file: 'event_time' (errno: 2)
jshardlow
2012-10-16 09:12:27 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"zeneventserver SQLException: Can't find file: 'event_time' (errno: 2)"

To view the discussion, visit: http://community.zenoss.org/message/69232#69232

--------------------------------------------------------------
I upgraded one of my Zenoss 4.2 SP1 servers from CentOS 6.0 to 6.3 along with some nagios plugins from EPEL. After rebooting and restarting when I log into to the GUI via web I get a rather unhelpful message that an eror has occurred.

So I did some digging around and starting at the bottom, it looks like zeneventserver is not very happy. From zeneventserver.log:
2012-10-16T09:47:11.733 [main] INFO  org.zenoss.zep.impl.Application - Initializing ZEP
2012-10-16T09:47:11.776 [main] INFO  org.zenoss.utils.dao.impl.MySqlRangePartitioner - Adding partition p20121016_090000 to table event_time
2012-10-16T09:47:11.776 [main] INFO  org.zenoss.utils.dao.impl.MySqlRangePartitioner - Adding partition p20121016_100000 to table event_time
2012-10-16T09:47:12.116 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [ALTER TABLE event_time PARTITION BY RANGE(processed) (PARTITION p20121016_090000 VALUES LESS THAN(1350378000000),PARTITION p20121016_100000 VALUES LESS THAN(1350381600000))]; SQL state [HY000]; error code [1017]; Can't find file: 'event_time' (errno: 2); nested exception is java.sql.SQLException: Can't find file: 'event_time' (errno: 2)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83) ~[spring-jdbc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
09:47:02,125 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [APPENDER] to Logger[ROOT]
2012-10-16 09:47:02.469:INFO:zeneventserver:Initializing Spring root WebApplicationContext
2012-10-16 09:47:12.117:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/zeneventserver,file:/opt/zenoss/webapps/zeneventserver/},/opt/zenoss/webapps/zeneventserver
org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [ALTER TABLE event_time PARTITION BY RANGE(processed) (PARTITION p20121016_090000 VALUES LESS THAN(1350378000000),PARTITION p20121016_100000 VALUES LESS THAN(1350381600000))]; SQL state [HY000]; error code [1017]; Can't find file: 'event_time' (errno: 2); nested exception is java.sql.SQLException: Can't find file: 'event_time' (errno: 2)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)


There are some event_time files in /var/lib/mysql/zenoss_zep but they're dated from before I did the upgrade:
-rw-rw---- 1 mysql mysql 1.0K Oct 16 07:07 event_time#P#p20121016_080000.MYI
-rw-rw---- 1 mysql mysql    0 Oct 16 07:07 event_time#P#p20121016_080000.MYD
-rw-rw---- 1 mysql mysql 8.7K Oct 16 08:07 event_time.frm
-rw-rw---- 1 mysql mysql  344 Oct 16 08:07 event_time.par


My very brief MySQL knowledge with help from Google thought checking a table might be a good idea, but that is throwing the same error:
mysql> CHECK TABLE event_time;
+-----------------------+-------+----------+------------------------------------------+
| Table                 | Op    | Msg_type | Msg_text                                 |
+-----------------------+-------+----------+------------------------------------------+
| zenoss_zep.event_time | check | Error    | Can't find file: 'event_time' (errno: 2) |
| zenoss_zep.event_time | check | status   | Operation failed                         |
+-----------------------+-------+----------+------------------------------------------+
2 rows in set (0.00 sec)


Has anyone got any ideas? I'm not too concerned about the events as it's a test box. But I would very much like to get it up and running again. Thanks in advance if anyone can shine some light on this.

Cheers,

Jamie
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69232#69232]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-10-16 10:26:40 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: zeneventserver SQLException: Can't find file: 'event_time' (errno: 2)"

To view the discussion, visit: http://community.zenoss.org/message/69233#69233

--------------------------------------------------------------
With the help of our trusty DBA I managed to recover enough. In short we took dump of the event_time table from another test box and then imported it.

Dump (working box):
mysqldump zenoss_zep event_time > /tmp/et.dump

Load (broken box):
cat et.dump | mysql -uroot -p -D zenoss_zep

Though I'd still be very interested to figure out how this 'corruption' happened.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69233#69233]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
pwarren
2012-10-16 14:12:18 UTC
Permalink
pwarren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: zeneventserver SQLException: Can't find file: 'event_time' (errno: 2)"

To view the discussion, visit: http://community.zenoss.org/message/69253#69253

--------------------------------------------------------------
I'm interested to know what the root cause of this problem is - we have had one other report of the same stack trace. Can you give me the result of this query against the database?

* SELECT version FROM zenoss_zep.schema_version;

Are there any  errors present in the $ZENHOME/log/install.log file?

FYI: The 'event_time' table is not used by the core zenoss product and so you didn't lose any data by having to re-import that table - it is used by an add-on extension for the Zenoss Analytics project.

--
Philip Warren
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69253#69253]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-10-16 14:19:30 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: zeneventserver SQLException: Can't find file: 'event_time' (errno: 2)"

To view the discussion, visit: http://community.zenoss.org/message/69254#69254

--------------------------------------------------------------
Here's the query result:
mysql> SELECT version FROM zenoss_zep.schema_version;
+---------+
| version |
+---------+
|       1 |
|       2 |
|       3 |
|       4 |
+---------+
4 rows in set (0.01 sec)


The only errors in the install.log refer to /opt/zenoss/zenjmx.py not existing and then wget automatically using a proxy for a localhost connection. So nothing MySQL/zeneventserver like.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69254#69254]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
pwarren
2012-10-16 14:29:35 UTC
Permalink
pwarren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: zeneventserver SQLException: Can't find file: 'event_time' (errno: 2)"

To view the discussion, visit: http://community.zenoss.org/message/69257#69257

--------------------------------------------------------------
Jamie,

Do you mind opening a JIRA issue on this? I believe I have found the root cause for the problem.

Thanks,

Philip Warren
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69257#69257]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-10-16 14:45:58 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: zeneventserver SQLException: Can't find file: 'event_time' (errno: 2)"

To view the discussion, visit: http://community.zenoss.org/message/69258#69258

--------------------------------------------------------------
Done! http://jira.zenoss.com/jira/browse/ZEN-3803 http://jira.zenoss.com/jira/browse/ZEN-3803
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69258#69258]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
slingeland
2013-07-11 15:31:41 UTC
Permalink
slingeland [http://community.zenoss.org/people/slingeland] created the discussion

"Re: zeneventserver SQLException: Can't find file: 'event_time' (errno: 2)"

To view the discussion, visit: http://community.zenoss.org/message/73924#73924

--------------------------------------------------------------
Hi,

I have the same problem with the event_time table.
Can someone please explain what i need to do to get it to work?

Thanks
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73924#73924]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...