Error in JobQueue Job AutoExport and AutoImport

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

gtg472b
Posts: 7
Joined: Mon Apr 13, 2015 2:53 am

Error in JobQueue Job AutoExport and AutoImport

Post by gtg472b »

I'm banging my head on the wall on this one. I'm putting this one in installation, though if a mod thinks it's better in usage, please move it.

Running 3.10.68-11.el6.centos.alt.x86_64 (xen compatible kernel)
I installed fresh from binaries:

Apache Tomcat 7.0.59
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
OpenEMM 2015 (from Feb 23)


I am getting errors in JobQueue for jobs AutoExport and AutoImport. I have no idea what these two jobs even are. Any ideas? OpenEMM mostly works (I'm having intermittent issues with dyn tags in mailings and templates, but mailings seem to work).

Initially it showed up as errors in the catalina.out log file, every one minute, as

Error reading value for key 'system.alert.mail' from resource bundle 'emm'

Code: Select all

2015-04-18 20:39:31,404: ERROR [openemmScheduler_Worker-5] org.agnitas.util.AgnUtils - Error reading value for key 'system.alert.mail' from resource bundle 'emm'
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key system.alert.mail
        at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
        at java.util.ResourceBundle.getString(ResourceBundle.java:407)
        at org.agnitas.util.AgnUtils.getDefaultValue(AgnUtils.java:653)
        at org.agnitas.service.JobQueueService.alertOnHangingJobs(JobQueueService.java:94)
        at org.agnitas.service.JobQueueService.checkAndRunJobs(JobQueueService.java:56)
        at org.agnitas.service.JobQueueQuartzJob.executeInternal(JobQueueQuartzJob.java:39)
        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
2015-04-18 20:39:31,405: ERROR [openemmScheduler_Worker-5] org.agnitas.util.AgnUtils - Error reading value for key 'system.alert.mail' from resource bundle 'emm'
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key system.alert.mail
        at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
        at java.util.ResourceBundle.getString(ResourceBundle.java:407)
        at org.agnitas.util.AgnUtils.getDefaultValue(AgnUtils.java:653)
        at org.agnitas.service.JobQueueService.alertOnHangingJobs(JobQueueService.java:94)
        at org.agnitas.service.JobQueueService.checkAndRunJobs(JobQueueService.java:56)
        at org.agnitas.service.JobQueueQuartzJob.executeInternal(JobQueueQuartzJob.java:39)
        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

I finally figured out that if I add the following line to /home/openemm/webapps/openemm/WEB-INF/classes/emm.properties

Code: Select all

system.alert.mail=admin@my.domain
After adding that line, I now get two emails sent to my admin address from jobqueue@server.my.domain EVERY MINUTE. The content in both emails is "Hanging job working for more than 5 hours" and the subjects are "Error in JobQueue Job AutoExport(2) on host 'server.my.domain'" and "Error in JobQueue Job AutoImport(1) on host 'server.my.domain'". It doesn't seem to matter whether I restart OpenEMM, sendmail, tomcat, or even my whole server itself.


The interesting thing is that this originates from something in the old web services folder (/home/openemm/webapps/openemm/) as I also added the system.alert.mail line to the file /home/openemm/webapps/openemm-ws/WEB-INF/classes/emm.properties

If I comment out the email line in the WS 1.0 config file but leave it in the WS 2.0 file, I still get errors in my catalina.out log file. As soon as I uncomment the line in the WS 1.0 config file, then I no longer get errors in my catalina.out file and instead just get those two emails sent to admin@my.domain


I have searched everywhere, and this doesn't seem to be a problem anyone else has had. Any ideas? I'm about to try installing from source to see if that fixes it...

Oh, and in case it is related to my other error, here is my post on that https://forum.openemm.org/using-openemm ... c2864.html where I'm getting odd issues with NoTagName for dynamic tags in mailings and templates.

Not related, solved that problem and this one still exists.


Thanks!
Last edited by gtg472b on Sun Apr 19, 2015 4:45 am, edited 2 times in total.
gtg472b
Posts: 7
Joined: Mon Apr 13, 2015 2:53 am

Re: Error in JobQueue Job AutoExport and AutoImport

Post by gtg472b »

In case it helps, here is the entire catalina.out from when I first start OpenEMM until the first error.

Code: Select all

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Apr 18, 2015 9:08:09 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Apr 18, 2015 9:08:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Apr 18, 2015 9:08:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Apr 18, 2015 9:08:10 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 889 ms
Apr 18, 2015 9:08:10 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 18, 2015 9:08:10 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.59
Apr 18, 2015 9:08:10 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Manager} Setting property 'debug' to '0' did not find a matching property.
Apr 18, 2015 9:08:13 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Apr 18, 2015 9:08:13 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Apr 18, 2015 9:08:20 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Manager} Setting property 'debug' to '0' did not find a matching property.
Apr 18, 2015 9:08:22 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Apr 18, 2015 9:08:23 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2015-04-18 21:08:23,068: INFO  [openemm-startStop-1] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
2015-04-18 21:08:23,162: INFO  [openemm-startStop-1] org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Sat Apr 18 21:08:23 CDT 2015]; root of context hierarchy
2015-04-18 21:08:23,223: INFO  [openemm-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-service.xml]
2015-04-18 21:08:23,716: INFO  [openemm-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-dao.xml]
2015-04-18 21:08:23,754: INFO  [openemm-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
2015-04-18 21:08:23,774: INFO  [openemm-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/dataAccessContext.xml]
2015-04-18 21:08:24,075: INFO  [openemm-startStop-1] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [emm.properties]
2015-04-18 21:08:24,138: INFO  [openemm-startStop-1] org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@21a4dd41: defining beans [ColumnInfoService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,modelValidator,bindingService,bindingBulkService,blacklistService,componentService,dynamicTagContentService,dynamicTagNameService,mailinglistService,mailingService,recipientService,recipientBulkService,MailingFactory,Mailgun,mailgunCache,ExtensibleUIDStringBuilder,ExtensibleUIDParser,ExtensibleUIDService,ConfigService,BindingEntryDao,BindingEntry,BlacklistDao,CompanyDao,DynamicTag,DynamicTagContent,DynamicTagContentDao,DynamicTagDao,MailingDao,Mailing,MailingComponent,MailingComponentDao,MailinglistDao,MaildropEntryFactory,Mediatype,MediatypeEmail,ProfileFieldDao,Recipient,RecipientDao,TargetDao,targetFactory,TargetRepresentationFactory,TagDetails,TrackableLink,companyCache,CompanyDaoCache,UserActivityLogDao,ConfigTableDao,TagDao,propertyConfigurer,BindingEntryFactory,RecipientFactory,UserActivityLogService,TagSyntaxChecker,dataSource,sessionFactory,transactionManager,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
2015-04-18 21:08:24,678: INFO  [openemm-startStop-1] org.hibernate.cfg.Environment - Hibernate 3.2.6
2015-04-18 21:08:24,681: INFO  [openemm-startStop-1] org.hibernate.cfg.Environment - hibernate.properties not found
2015-04-18 21:08:24,685: INFO  [openemm-startStop-1] org.hibernate.cfg.Environment - Bytecode provider name : cglib
2015-04-18 21:08:24,687: INFO  [openemm-startStop-1] org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
2015-04-18 21:08:24,841: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: DynamicTag -> dyn_name_tbl
2015-04-18 21:08:24,923: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: DynamicTagContent -> dyn_content_tbl
2015-04-18 21:08:24,947: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: Mailing -> mailing_tbl
2015-04-18 21:08:24,951: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping collection: Mailing.mediatypes -> mailing_mt_tbl
2015-04-18 21:08:24,952: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: MailingComponentEmbedded -> component_tbl
2015-04-18 21:08:24,953: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: DynamicTagEmbedded -> dyn_name_tbl
2015-04-18 21:08:24,960: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: TrackableLinkEmbedded -> rdir_url_tbl
2015-04-18 21:08:24,961: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: DynamicTagContentEmbedded -> dyn_content_tbl
2015-04-18 21:08:24,962: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: MaildropEntryEmbedded -> maildrop_status_tbl
2015-04-18 21:08:24,977: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: MailingComponent -> component_tbl
2015-04-18 21:08:24,987: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: Title -> title_tbl
2015-04-18 21:08:24,987: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping collection: Title.titleGender -> title_gender_tbl
2015-04-18 21:08:24,996: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: DatasourceDescription -> datasource_description_tbl
2015-04-18 21:08:25,005: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: UserForm -> userform_tbl
2015-04-18 21:08:25,014: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: TrackableLink -> rdir_url_tbl
2015-04-18 21:08:25,024: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: ExportPredef -> export_predef_tbl
2015-04-18 21:08:25,033: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: Mailloop -> mailloop_tbl
2015-04-18 21:08:25,045: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping class: ProfileField -> customer_field_tbl
2015-04-18 21:08:25,050: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping collection: DynamicTag.dynContent -> dyn_content_tbl
2015-04-18 21:08:25,053: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping collection: Mailing.dynTags -> dyn_name_tbl
2015-04-18 21:08:25,053: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping collection: Mailing.components -> component_tbl
2015-04-18 21:08:25,054: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping collection: Mailing.trackableLinks -> rdir_url_tbl
2015-04-18 21:08:25,054: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping collection: Mailing.maildropStatus -> maildrop_status_tbl
2015-04-18 21:08:25,054: INFO  [openemm-startStop-1] org.hibernate.cfg.HbmBinder - Mapping collection: DynamicTagEmbedded.dynContent -> dyn_content_tbl
2015-04-18 21:08:25,055: INFO  [openemm-startStop-1] org.springframework.orm.hibernate3.LocalSessionFactoryBean - Building new Hibernate SessionFactory
2015-04-18 21:08:25,088: INFO  [openemm-startStop-1] org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
2015-04-18 21:08:25,429: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - RDBMS: MySQL, version: 5.1.73
2015-04-18 21:08:25,430: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - JDBC driver: MySQL Connector Java, version: mysql-connector-java-5.1.25 ( Revision: ${bzr.revision-id} )
2015-04-18 21:08:25,444: INFO  [openemm-startStop-1] org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
2015-04-18 21:08:25,447: INFO  [openemm-startStop-1] org.hibernate.transaction.TransactionFactoryFactory - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
2015-04-18 21:08:25,448: INFO  [openemm-startStop-1] org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2015-04-18 21:08:25,448: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
2015-04-18 21:08:25,448: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
2015-04-18 21:08:25,448: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
2015-04-18 21:08:25,449: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
2015-04-18 21:08:25,449: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
2015-04-18 21:08:25,449: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
2015-04-18 21:08:25,449: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Connection release mode: auto
2015-04-18 21:08:25,450: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
2015-04-18 21:08:25,450: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
2015-04-18 21:08:25,450: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
2015-04-18 21:08:25,450: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
2015-04-18 21:08:25,451: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
2015-04-18 21:08:25,451: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2015-04-18 21:08:25,452: INFO  [openemm-startStop-1] org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
2015-04-18 21:08:25,452: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
2015-04-18 21:08:25,453: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
2015-04-18 21:08:25,453: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
2015-04-18 21:08:25,453: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Query cache: disabled
2015-04-18 21:08:25,453: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.NoCacheProvider
2015-04-18 21:08:25,453: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
2015-04-18 21:08:25,453: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
2015-04-18 21:08:25,457: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Statistics: disabled
2015-04-18 21:08:25,457: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
2015-04-18 21:08:25,457: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
2015-04-18 21:08:25,457: INFO  [openemm-startStop-1] org.hibernate.cfg.SettingsFactory - Named query checking : enabled
2015-04-18 21:08:25,478: INFO  [openemm-startStop-1] org.hibernate.impl.SessionFactoryImpl - building session factory
2015-04-18 21:08:25,902: INFO  [openemm-startStop-1] org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
2015-04-18 21:08:26,410: INFO  [openemm-startStop-1] org.springframework.orm.hibernate3.HibernateTransactionManager - Using DataSource [org.apache.tomcat.dbcp.dbcp.BasicDataSource@329208e6] of Hibernate SessionFactory for HibernateTransactionManager
2015-04-18 21:08:26,789: INFO  [openemm-startStop-1] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3720 ms
2015-04-18 21:08:26,802: DEBUG [openemm-startStop-1] org.agnitas.web.filter.OpenSessionInViewFilter - Initializing filter 'OpenSessionInView'
2015-04-18 21:08:26,804: DEBUG [openemm-startStop-1] org.agnitas.web.filter.OpenSessionInViewFilter - Filter 'OpenSessionInView' configured successfully
Apr 18, 2015 9:08:26 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Manager} Setting property 'debug' to '0' did not find a matching property.
Apr 18, 2015 9:08:26 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Apr 18, 2015 9:08:26 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Apr 18, 2015 9:08:26 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 16794 ms
2015-04-18 21:08:30,039: ERROR [openemmScheduler_Worker-9] org.agnitas.util.AgnUtils - Error reading value for key 'system.alert.mail' from resource bundle 'emm'
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key system.alert.mail
        at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
        at java.util.ResourceBundle.getString(ResourceBundle.java:407)
        at org.agnitas.util.AgnUtils.getDefaultValue(AgnUtils.java:653)
        at org.agnitas.service.JobQueueService.alertOnHangingJobs(JobQueueService.java:94)
        at org.agnitas.service.JobQueueService.checkAndRunJobs(JobQueueService.java:56)
        at org.agnitas.service.JobQueueQuartzJob.executeInternal(JobQueueQuartzJob.java:39)
        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
2015-04-18 21:08:30,043: ERROR [openemmScheduler_Worker-9] org.agnitas.util.AgnUtils - Error reading value for key 'system.alert.mail' from resource bundle 'emm'
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key system.alert.mail
        at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
        at java.util.ResourceBundle.getString(ResourceBundle.java:407)
        at org.agnitas.util.AgnUtils.getDefaultValue(AgnUtils.java:653)
        at org.agnitas.service.JobQueueService.alertOnHangingJobs(JobQueueService.java:94)
        at org.agnitas.service.JobQueueService.checkAndRunJobs(JobQueueService.java:56)
        at org.agnitas.service.JobQueueQuartzJob.executeInternal(JobQueueQuartzJob.java:39)
        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
gtg472b
Posts: 7
Joined: Mon Apr 13, 2015 2:53 am

Re: Error in JobQueue Job AutoExport and AutoImport

Post by gtg472b »

I'm going to keep a running log of my findings as I work through this one, in case it helps others with a similar problem or it helps anyone else figure out what's wrong with my setup.

I just found where these "AutoImport" and "AutoExport" jobs are being specified, in the openemm.job_queue_tbl table. The default openemm-2015.sql file has the following values inserted:

Code: Select all

INSERT INTO `job_queue_tbl` (`id`, `description`, `created`, `lastStart`, `running`, `lastResult`, `startAfterError`, `lastDuration`, `interval`, `nextStart`, `hostname`, `runClass`, `runOnlyOnHosts`, `emailOnError`, `deleted`) VALUES (1,'AutoImport','2014-11-16 14:56:07','2014-11-16 14:56:07',0,'OK',0,0,'**00','2014-11-16 14:56:07',NULL,'org.agnitas.emm.core.autoimport.service.AutoImportJobWorker',NULL,NULL,0),(2,'AutoExport','2014-11-16 14:56:07','2014-11-16 14:56:07',0,'OK',0,0,'**00','2014-11-16 14:56:07',NULL,'org.agnitas.emm.core.autoexport.service.AutoExportJobWorker',NULL,NULL,0),(3,'DBCleaner','2014-11-16 14:56:07','2014-11-16 14:56:07',0,'OK',0,0,'0300','2014-11-16 14:56:07',NULL,'org.agnitas.util.quartz.DBCleanerJobWorker',NULL,NULL,0),(4,'LoginTrackTableCleaner','2014-11-16 14:56:07','2014-11-16 14:56:07',0,'OK',0,0,'0400','2014-11-16 14:56:07',NULL,'org.agnitas.util.quartz.LoginTrackTableCleanerJobWorker',NULL,NULL,0);
resulting in a table looking like:

Code: Select all

mysql> explain job_queue_tbl;
+-----------------+--------------+------+-----+---------------------+----------------+
| Field           | Type         | Null | Key | Default             | Extra          |
+-----------------+--------------+------+-----+---------------------+----------------+
| id              | int(11)      | NO   | PRI | NULL                | auto_increment |
| description     | varchar(64)  | NO   |     |                     |                |
| created         | timestamp    | NO   |     | CURRENT_TIMESTAMP   |                |
| lastStart       | timestamp    | NO   |     | 0000-00-00 00:00:00 |                |
| running         | int(1)       | NO   |     | 0                   |                |
| lastResult      | varchar(512) | YES  |     | NULL                |                |
| startAfterError | int(1)       | NO   |     | 0                   |                |
| lastDuration    | int(10)      | NO   |     | 0                   |                |
| interval        | varchar(64)  | NO   |     |                     |                |
| nextStart       | timestamp    | NO   |     | 0000-00-00 00:00:00 |                |
| hostname        | varchar(64)  | YES  |     | NULL                |                |
| runClass        | varchar(128) | NO   |     |                     |                |
| runOnlyOnHosts  | varchar(64)  | YES  |     | NULL                |                |
| emailOnError    | varchar(64)  | YES  |     | NULL                |                |
| deleted         | int(1)       | NO   |     | 0                   |                |
+-----------------+--------------+------+-----+---------------------+----------------+
ID 1 and 2 are the AutoImport and AutoExport respectively. They each call either org.agnitas.emm.core.autoimport.service.AutoImportJobWorker or org.agnitas.emm.core.autoimport.service.AutoExportJobWorker classes.

The odd part is that lastResult has a value of "OK" for each of these entries. Both are listed as running = 1, and both indicate lastStart was a week ago (when I first installed OpenEMM). They also both indicate that nextStart should be a week ago (about two hours after lastStart).
gtg472b
Posts: 7
Joined: Mon Apr 13, 2015 2:53 am

Re: Error in JobQueue Job AutoExport and AutoImport

Post by gtg472b »

Success! I stopped OpenEMM via openemm.sh and then reinitialized the job_queue_tbl by just pasting in those lines from the schema.

Initial database values:

Code: Select all

mysql> SELECT * FROM job_queue_tbl;
+----+------------------------+---------------------+---------------------+---------+------------+-----------------+--------------+----------+---------------------+----------+-------------------------------------------------------------+----------------+--------------+---------+
| id | description            | created             | lastStart           | running | lastResult | startAfterError | lastDuration | interval | nextStart           | hostname | runClass                                                    | runOnlyOnHosts | emailOnError | deleted |
+----+------------------------+---------------------+---------------------+---------+------------+-----------------+--------------+----------+---------------------+----------+-------------------------------------------------------------+----------------+--------------+---------+
|  1 | AutoImport             | 2014-11-16 14:56:07 | 2014-11-16 14:56:07 |       0 | OK         |               0 |            0 | **00     | 2014-11-16 14:56:07 | NULL     | org.agnitas.emm.core.autoimport.service.AutoImportJobWorker | NULL           | NULL         |       0 |
|  2 | AutoExport             | 2014-11-16 14:56:07 | 2014-11-16 14:56:07 |       0 | OK         |               0 |            0 | **00     | 2014-11-16 14:56:07 | NULL     | org.agnitas.emm.core.autoexport.service.AutoExportJobWorker | NULL           | NULL         |       0 |
|  3 | DBCleaner              | 2014-11-16 14:56:07 | 2014-11-16 14:56:07 |       0 | OK         |               0 |            0 | 0300     | 2014-11-16 14:56:07 | NULL     | org.agnitas.util.quartz.DBCleanerJobWorker                  | NULL           | NULL         |       0 |
|  4 | LoginTrackTableCleaner | 2014-11-16 14:56:07 | 2014-11-16 14:56:07 |       0 | OK         |               0 |            0 | 0400     | 2014-11-16 14:56:07 | NULL     | org.agnitas.util.quartz.LoginTrackTableCleanerJobWorker     | NULL           | NULL         |       0 |
+----+------------------------+---------------------+---------------------+---------+------------+-----------------+--------------+----------+---------------------+----------+-------------------------------------------------------------+----------------+--------------+---------+
4 rows in set (0.00 sec)

I then restarted OpenEMM via the startup script, and now I get:

Code: Select all

mysql> SELECT * FROM job_queue_tbl;
+----+------------------------+---------------------+---------------------+---------+------------+-----------------+--------------+----------+---------------------+-----------------------------+-------------------------------------------------------------+----------------+--------------+---------+
| id | description            | created             | lastStart           | running | lastResult | startAfterError | lastDuration | interval | nextStart           | hostname                    | runClass                                                    | runOnlyOnHosts | emailOnError | deleted |
+----+------------------------+---------------------+---------------------+---------+------------+-----------------+--------------+----------+---------------------+-----------------------------+-------------------------------------------------------------+----------------+--------------+---------+
|  1 | AutoImport             | 2014-11-16 14:56:07 | 2015-04-19 12:26:45 |       0 | OK         |               0 |            0 | **00     | 2015-04-19 13:00:00 | host.my.domain              | org.agnitas.emm.core.autoimport.service.AutoImportJobWorker | NULL           | NULL         |       0 |
|  2 | AutoExport             | 2014-11-16 14:56:07 | 2015-04-19 12:26:45 |       0 | OK         |               0 |            0 | **00     | 2015-04-19 13:00:00 | host.my.domain              | org.agnitas.emm.core.autoexport.service.AutoExportJobWorker | NULL           | NULL         |       0 |
|  3 | DBCleaner              | 2014-11-16 14:56:07 | 2015-04-19 12:26:45 |       0 | OK         |               0 |            0 | 0300     | 2015-04-20 03:00:00 | host.my.domain              | org.agnitas.util.quartz.DBCleanerJobWorker                  | NULL           | NULL         |       0 |
|  4 | LoginTrackTableCleaner | 2014-11-16 14:56:07 | 2015-04-19 12:26:45 |       0 | OK         |               0 |            0 | 0400     | 2015-04-20 04:00:00 | host.my.domain              | org.agnitas.util.quartz.LoginTrackTableCleanerJobWorker     | NULL           | NULL         |       0 |
+----+------------------------+---------------------+---------------------+---------+------------+-----------------+--------------+----------+---------------------+-----------------------------+-------------------------------------------------------------+----------------+--------------+---------+
4 rows in set (0.00 sec)

Hopefully this will stick (next run is in a half an hour). And hopefully these posts might help someone else with a similar problem.

I have no idea how my DB values weren't set properly...very odd...
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Error in JobQueue Job AutoExport and AutoImport

Post by maschoff »

Thanks for your post. In the next release we will add a line

Code: Select all

system.alert.mail=openemm@localhost
as default alert address to emm.properties.
OpenEMM Maintainer
jim_frey
Posts: 132
Joined: Wed Nov 29, 2006 11:32 pm
Location: Middle Caicos, Turks and Caicos Islands
Contact:

Re: Error in JobQueue Job AutoExport and AutoImport

Post by jim_frey »

Thanks for this post. I'm not sure why, but I had AutoImport with a 1 for running. It was causing a bunch of emails, like you mentioned. I just updated the database and set it to 0 --- all fixed!
OpenEMM Moderator
Post Reply