cfadmin updateDatesource timeout?

20 views
Skip to first unread message

Seth Johnson

unread,
Apr 12, 2013, 2:08:07 PM4/12/13
to ra...@googlegroups.com
Hi All,

I am running Railo 4.0.3.004 final on Ubuntu 12.04.  My system allows users to enter the IP address, username, and password of their locally running Postgresql database.  I have a scheduled task that executes daily and loops over the list of databases and imports each of the customer's data from their database.  Rather than creating hundreds of datasources, I am using the cfadmin tag to update one datasource each time the loop executes.  This all works great, as long as the database is online and the credentials are good.  If the database is offline or the credentials are wrong the cfadmin tag continues to try to 'update' the datasource until the page eventually times out.  

Here's the stacktrace when this happens:

Something unusual has occured to cause the driver to fail. Please report this exception. at org.postgresql.Driver.connect(Driver.java:285):285 at java.sql.DriverManager.getConnection(Unknown Source):-1 at java.sql.DriverManager.getConnection(Unknown Source):-1 at railo.commons.db.DBUtil.getConnection(DBUtil.java:88):88 at railo.runtime.tag.Admin.getConnection(Admin.java:2798):2798 at railo.runtime.tag.Admin._doVerifyDatasource(Admin.java:2785):2785 at railo.runtime.tag.Admin._doVerifyDatasource(Admin.java:2775):2775 at railo.runtime.tag.Admin.doUpdateDatasource(Admin.java:2529):2529 at railo.runtime.tag.Admin._doStartTag(Admin.java:615):615 at railo.runtime.tag.Admin.doStartTag(Admin.java:323):323 at scheduled.sch_merge_api_bio_cfm$cf.call(/var/www/scheduled/sch_merge_api_bio.cfm:36):36 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:802):802 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:754):754 at railo.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:36):36 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:19):19 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2256):2256 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2223):2223 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:315):315 at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 at javax.servlet.http.HttpServlet.service(HttpServlet.java:728):728 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210 at com.intergral.fusionreactor.filter.FusionReactorCoreFilter.doHttpServletRequest(FusionReactorCoreFilter.java:503):503 at com.intergral.fusionreactor.filter.FusionReactorCoreFilter.doFusionRequest(FusionReactorCoreFilter.java:337):337 at com.intergral.fusionreactor.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:246):246 at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java:121):121 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243):243 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222):222 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123):123 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472):472 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171):171 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99):99 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407):407 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004):1004 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589):589 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310):310 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source):-1 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1 at java.lang.Thread.run(Unknown Source):-1

I am not sure if this is a bug, or otherwise.  I am not married to this solution, so if anyone has a better idea please let me know!

Thanks,

Seth

Seth Johnson

unread,
Apr 13, 2013, 11:29:48 PM4/13/13
to ra...@googlegroups.com
I determined that the only time the cfadmin tag continues to execute until page timeout is when the IP address of the target datasource is invalid.  

I ended up just using cfexecute to run an nmap to determine if the database is online prior to using cfadmin to create the datasource.

Seth

Michael Offner

unread,
Apr 15, 2013, 6:05:42 AM4/15/13
to ra...@googlegroups.com
what you expect that happens?
Micha

2013/4/14 Seth Johnson <cfx...@gmail.com>
--
Need help right now? Why not have one of the Railo Team help you directly: http://www.getrailo.com/index.cfm/consulting/
---
You received this message because you are subscribed to the Google Groups "Railo" group.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
/micha

Michael Offner CTO Railo Technologies GmbH

Seth Johnson

unread,
Apr 15, 2013, 8:57:56 AM4/15/13
to ra...@googlegroups.com

I would expect the cfadmin tag would throw an error that the database could not be reached, similar to what happens when the username or password is invalid.  Instead it grinds on until the page times out giving no opportunity to catch the error and deal with it.

Seth

You received this message because you are subscribed to a topic in the Google Groups "Railo" group.
Reply all
Reply to author
Forward
0 new messages