CFCouchbase and CommandBox App Startup Issue

Hi,

I was trying to get more familiar with keying strategies and the CFCouchbase SDK in general so I thought the easiest way to do so would be to create and app via commandbox, install coldbox and in stall the cfcouchbase module. However, once I enter my Couchbase server name and bucket name (beer-sample) the server start command just results in a command box server that hangs up.

Here is a pastebin of the exception that is thrown: http://pastebin.com/nZjadcjD

Since this couchbase server is running on another computer in my workgroup I have opened all of the necessary ports ( http://docs.couchbase.com/admin/admin/Install/install-networkPorts.html ) I know these rules work since I can make the REST calls manually in the web browser and the same rules work to run the app on a CF11 install.

I’m not sure if you have any insight as to what’s going on here, but any help would be appreciated as I would prefer to use commandbox for my development and playground app.

Thanks!
~Tim

Definitely seems like some sort of connectivity issue. Can you check the server logs to see if there’s any messages about not being able to connect and retrying? Usually when I can’t connect, it just errors out right away, but usually it’s ports not being open that causes it to hang.

The “server log” command will show you the log from that Railo context which is stored at the location shows when you run the “server list serverName --verbose” command.

The general Railo logs are stored here:

~.CommandBox\engine\cfml\server\railo-server\context\logs

And I think the servlet “out” logs from undertow are here:
~.CommandBox\server\server_name\log

I haven’t done a ton of work with the CFCouchbase SDK on the CommandBox embedded server to have a lot of experience knowing which logs have what. It tends to vary-- even from Windows and Linux on regular installs.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

This doesn’t appear to be a firewall issue, but rather something during the start up of the app and loading of the modules related to the embedded Railo and even an express install of Lucee. I get the same behavior for both of those engines. However, the app loads up fine from a CF11 and CF9 server. The CF9 server runs into some other syntactic issues due to struct creation using the colon instead of equal signs for the key values in certain spots, but it seems that the client / connection can be created unlike on Railo and Lucee.

The logs don’t provide anything further beyond the log I linked to previously. Any thoughts on other things to try would be much appreciated. Looks like
http://pastebin.com/nZjadcjD

~Tim

Assuming 50 seconds elapse before the error, what does a stack trace show you the thread is doing?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

This is all that is logged in any of the logs I can find (which is essentially the same as I had posted in the paste bin before). If this isn’t what you are looking for let me know how to go about getting the information needed to further troubleshoot.

I simplified the setup to confirm that this wasn’t a connectivity issue by installing Couchbase on the same laptop that I’m running the command box instance instead of trying to connect to a “remote” Couchbase instance.

Since my the sample apps will work on CF I’m not sure if there is some setting I need to adjust in the Railo Admin of the command box server instance.

Thanks for any thoughts on this!

~Tim

Railo 4.2.1.008 Error (application)
Message a timeout occurred after 50 seconds
Java Stacktrace a timeout occurred after 50 seconds
at railo.commons.lock.SimpleLock.lock(SimpleLock.java:25):25
at railo.commons.lock.KeyLock.lock(KeyLock.java:30):30
at railo.runtime.PageContextImpl.initApplicationContext(PageContextImpl.java:2774):2774
at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:101):101
at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2212):2212
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2179):2179
at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:331):331
at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790):790
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85):85
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61):61
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36):36
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131):131
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56):56
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43):43
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45):45
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63):63
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58):58
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70):70
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76):76
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43):43
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43):43
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261):261
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247):247
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76):76
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166):166
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197):197
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759):759
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617
at java.lang.Thread.run(Thread.java:745):745

Timestamp 3/9/15 11:06:18 PM MST

I finally got a chance to come back to this so I got CF11 installed on my box and pointed an IIS site to the coldbox app, but it appears the same issue is present on CF11 as the commandbox embedded Railo server.

The error thrown is shown in this GIST ( https://gist.github.com/timmaybrown/2c51ac3e3180004ade9c ).
*If this is not the FULL Stack Trace that would be needed for further debugging, any direction on how to get the full stack trace would be much appreciated.

I’ve simplified my setup by making everything run on the same box hoping that could bypass the initial issue that I thought was related to the Couchbase server being “remote” on a different box.

I’ve gotten the Couchbase Client to successfully instantiate via vanilla CF using the “beer-brewery-manager” sample application.

Any further insight anyone might have on what to look into next would be awesome as I’m stumped at the moment.

Thanks!
~Tim

Use a tool like Fusion Reactor to pull stack traces of the thread before the timeout error occurs. Are their multiple threads running at once? I assume there are since this thread appears to be
waiting on another to release a lock.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I’ll get fusion reactor up and running and get the stack trace when I hit the application. I have restarted CF and Couchbase services. Then I attempt to load my apps URL. If there are multiple threads running it would seem to be something going on with the framework / wirebox attempting to load/register the modules.

Hopefully, I’ll be able to debug better after getting Fusion Reactor running on this box.

Thanks!
Tim

If this still isn’t the full stack trace I’ll have to dig into Fusion Reactor more, but this was the stack trace shown and this was the only request running on my local server.

Hopefully this Gist helps - > https://gist.github.com/timmaybrown/aef31d9cfc01929c5232

Thanks for your help!
Tim

Yes, that’s good. If you refresh the stack trace, does it show the same thing for a long time? I can’t way i recognize that behavior right off.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Yep. I let it run for a minute or more refreshing stack trace every so often and this was the only info ever shown.

-tim

This definitely sounds like an issue with the underlying Java client. I think it may be related to this ticket here which supposedly is fixed in 1.2:

https://issues.couchbase.com/browse/JCBC-368

What’s the name of your “couchbase-client-1.x.x.jar” file in the lib directory. If you can’t find anything in ANY of your log files, we may have to bug the Couchbase guys. They have a public forum, or if you have purchased a license, it comes with support.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

It shows the couchbase-client is couchbase-client-1.3.1.jar running on Couchbase Version: 3.0.2-1603 Enterprise Edition.

I’ll keep digging. I installed the cfcouchbasesdk via commandbox. Is the available client up to 2.1 now?

Thanks!
Tim