falcon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pallavi Rao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FALCON-1682) Falcon server starts successfully even if mysql db is not created.
Date Thu, 07 Jan 2016 07:15:39 GMT

    [ https://issues.apache.org/jira/browse/FALCON-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15086962#comment-15086962
] 

Pallavi Rao commented on FALCON-1682:
-------------------------------------

Understand the problem. The context initialization/application will have no reference to the
server and we cannot stop it from there.

Two options I can think of:
1. Just improve messaging - Set a servletContext attribute during initialization to indicate
the services didn't start and use it in a Filter to return to error message or forward call.
And whenever user hits an API, he/she will get a message saying "Falcon has not started properly...
etc", if Falcon has not started.

2. In falcon-start script, after issuing a start, issue a get version request (with retries
and timeout). This will fail when the webapp has not started cleanly. If the call fails, print
out an error message and call falcon-stop.

Personally, prefer option 2.

> Falcon server starts successfully even if mysql db is not created.
> ------------------------------------------------------------------
>
>                 Key: FALCON-1682
>                 URL: https://issues.apache.org/jira/browse/FALCON-1682
>             Project: Falcon
>          Issue Type: Bug
>    Affects Versions: 0.9
>            Reporter: Pragya Mittal
>            Assignee: pavan kumar kolamuri
>
> If falcon is configured to run with mysql db, and user does not create db then server
start should fail and throw error for the same. But server starts successfully as of now.
Although error is logged in server logs saying :
> {noformat}
> 2015-12-21 13:41:01,899 ERROR - [main:] ~ Failed to initialize service org.apache.falcon.state.store.service.FalconJPAService
(ServiceInitializer:49)
> <openjpa-2.4.0-r422266:1674604 fatal general error> org.apache.openjpa.persistence.PersistenceException:
Cannot create PoolableConnectionFactory (Access denied for user 'sa'@'localhost' (using password:
NO))
> 	at org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary(DBDictionaryFactory.java:106)
> 	at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:603)
> 	at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(MappingRepository.java:1518)
> 	at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:533)
> 	at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:458)
> 	at org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:121)
> 	at org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataRepositoryValue.java:68)
> 	at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
> 	at org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:967)
> 	at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:958)
> 	at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:642)
> 	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:202)
> 	at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:154)
> 	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:226)
> 	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:153)
> 	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:59)
> 	at org.apache.falcon.state.store.service.FalconJPAService.getEntityManager(FalconJPAService.java:169)
> 	at org.apache.falcon.state.store.service.FalconJPAService.init(FalconJPAService.java:91)
> 	at org.apache.falcon.service.ServiceInitializer.initialize(ServiceInitializer.java:47)
> 	at org.apache.falcon.listener.ContextStartupListener.contextInitialized(ContextStartupListener.java:56)
> 	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:550)
> 	at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
> 	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
> 	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:519)
> 	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> 	at org.mortbay.jetty.Server.doStart(Server.java:224)
> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 	at org.apache.falcon.util.EmbeddedServer.start(EmbeddedServer.java:57)
> 	at org.apache.falcon.FalconServer.main(FalconServer.java:102)
> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
(Access denied for user 'sa'@'localhost' (using password: NO))
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message