Hi,
I have created a connect function (restxq) that:
- Works perfectly well on my Mac. - Returns a *BXCL0001 *when used on the Linux production server.
The function uses:
-
*client:connect*(*$app:feedback-server-host*, 1984, *$session-user*, * $session-password*)
The only reason I can find is that the production server is deployed through a servlet. Could this affect the behaviour?
- The admin:users() function does list the user we are trying to use in 'connect', so we are assuming that the server is connected and that the user does exist. - We are using the correct password. - We have tried setting up the value of the SERVERHOST option in .basex to make sure it matches $app:feedback-server-host, although that didn't seem necessary for the mac setup. - 1984 is the configured PORT. - Could the fact that the production server is using TomCat have an impact on the client:connect function?
We are out of things to try. Any clue would be helpful.
Thanks,
France
Dear France,
Works perfectly well on my Mac. Returns a BXCL0001 when used on the Linux production server.
could you additionally tell us what error message is attached to the error code?
The only reason I can find is that the production server is deployed through a servlet. Could this affect the behaviour?
Could the fact that the production server is using TomCat have an impact on the client:connect function?
As your code seems to work on your Mac, I indeed assume it has to do with the servlet configuration. You could try to add the following snippet to the web.xml configuration file:
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param>
This way, some additional debugging information such as Java stack traces will be output to STDERR, which you could send us as well (this information may e. g. end up on command line or in logs/catalina.out, depending on your Tomcat configuration).
Hope this helps? Christian
Adding Sean to the thread, he will forward more details soon.
On Tue, Apr 30, 2013 at 3:55 AM, Christian Grün christian.gruen@gmail.comwrote:
Dear France,
Works perfectly well on my Mac. Returns a BXCL0001 when used on the Linux production server.
could you additionally tell us what error message is attached to the error code?
The only reason I can find is that the production server is deployed
through
a servlet. Could this affect the behaviour?
Could the fact that the production server is using TomCat have an impact
on
the client:connect function?
As your code seems to work on your Mac, I indeed assume it has to do with the servlet configuration. You could try to add the following snippet to the web.xml configuration file:
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param>
This way, some additional debugging information such as Java stack traces will be output to STDERR, which you could send us as well (this information may e. g. end up on command line or in logs/catalina.out, depending on your Tomcat configuration).
Hope this helps? Christian
Ubuntu Server 12.10 Tomcat 7 BaseX 7.6
We are using the client module to make the following call: client:connect($app:feedback-server-host, 1984, $session-user, $session-password). Port 1984 successfully connects within a client/server application; however, when we deploy as a web application to Tomcat, either BaseX Server is not starting up or port 1984 is not available. We added <param-name>org.basex.debug</param-name> to Tomcat's web.xml. The output of …/tomcat7/logs/catalina.out follows:
... INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.war May 1, 2013 4:22:17 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8984"] May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8443"] May 1, 2013 4:22:17 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 52056 ms org.basex.http.HTTPException: No function found that matches the request. org.basex.http.HTTPErr.thrw(HTTPErr.java:56) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:26) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c - host: ouripaddress:8984 - user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0 - accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 - accept-language: en-US,en;q=0.5 - accept-encoding: gzip, deflate - cookie: JSESSIONID=XXXXXXX - connection: keep-alive _ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22java.net.ConnectException: Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) java.net.Socket.connect(Socket.java:529) org.basex.server.ClientSession.<init>(ClientSession.java:107) org.basex.server.ClientSession.<init>(ClientSession.java:85) org.basex.query.func.FNClient.connect(FNClient.java:81) org.basex.query.func.FNClient.item(FNClient.java:61) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.func.FNClient.value(FNClient.java:53) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.expr.Try.value(Try.java:69) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102) org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99) org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c - host: ouripaddress:8984 - connection: keep-alive - cache-control: max-age=0 - accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 - user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31 - dnt: 1 - accept-encoding: gzip,deflate,sdch - accept-language: en-US,en;q=0.8 - accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 _ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22_ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@ac0b3d1 - host: ouripaddress:8984 - connection: keep-alive - accept: */* - user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31 - dnt: 1 - referer: http://ouripaddress:8984/bxApp/restxq/etc - accept-encoding: gzip,deflate,sdch - accept-language: en-US,en;q=0.8 - accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 - cookie: JSESSIONID=XXXXXXXXX _ RESPONSE ________________________________ …
I ran netstat -an | grep "LISTEN ". Port 1984 was not listed. Thinking that 1984 was closed, I ran iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 1984 -j ACCEPT. However after running netstat -lnp | grep 1984 -- still nothing.
The file .basex is at the root of our webapp and looks like this:
... # Client/Server Architecture HOST = ouripaddress PORT = 1984 SERVERPORT = 1984 EVENTPORT = 1985 USER = user PASSWORD = userpassword SERVERHOST = ouripaddress PROXYHOST = PROXYPORT = 80 NONPROXYHOSTS = TIMEOUT = 30 KEEPALIVE = 600 PARALLEL = 8 LOG = true LOGMSGMAXLEN = 1000 ...
Any help as to why we are not able to connect would be much appreciated!
-Sean
On Wednesday, May 1, 2013 at 11:57 AM, France Baril wrote:
On Tue, Apr 30, 2013 at 3:55 AM, Christian Grün <christian.gruen@gmail.com (mailto:christian.gruen@gmail.com)> wrote:
Dear France,
Works perfectly well on my Mac. Returns a BXCL0001 when used on the Linux production server.
could you additionally tell us what error message is attached to the error code?
The only reason I can find is that the production server is deployed through a servlet. Could this affect the behaviour?
Could the fact that the production server is using TomCat have an impact on the client:connect function?
As your code seems to work on your Mac, I indeed assume it has to do with the servlet configuration. You could try to add the following snippet to the web.xml (http://web.xml) configuration file:
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param>
This way, some additional debugging information such as Java stack traces will be output to STDERR, which you could send us as well (this information may e. g. end up on command line or in logs/catalina.out, depending on your Tomcat configuration).
Hope this helps? Christian
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com (mailto:france.baril@architextus.com) (514) 572-0341
Dear Sean,
sorry for the delay, and thanks for your report. Some hints:
– did you manage to connect to localhost with Tomcat? – the .basex configuration file won’t be parsed if BaseX is deployed as servlet container [1]. Instead, you’ll have to specify all options in the web.xml configuration file
If this doesn't help, don’t hesitate and ask again; I’ll then try to rebuild your scenario.
All the best, Christian
[1] http://docs.basex.org/wiki/Web_Application#Configuration ___________________________
On Wed, May 1, 2013 at 9:23 PM, Sean Healy sjh@seanjhealy.com wrote:
Ubuntu Server 12.10 Tomcat 7 BaseX 7.6
We are using the client module to make the following call: client:connect($app:feedback-server-host, 1984, $session-user, $session-password). Port 1984 successfully connects within a client/server application; however, when we deploy as a web application to Tomcat, either BaseX Server is not starting up or port 1984 is not available. We added <param-name>org.basex.debug</param-name> to Tomcat's web.xml. The output of …/tomcat7/logs/catalina.out follows:
... INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.war May 1, 2013 4:22:17 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8984"] May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8443"] May 1, 2013 4:22:17 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 52056 ms org.basex.http.HTTPException: No function found that matches the request. org.basex.http.HTTPErr.thrw(HTTPErr.java:56) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:26) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c
- host: ouripaddress:8984
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- accept-language: en-US,en;q=0.5
- accept-encoding: gzip, deflate
- cookie: JSESSIONID=XXXXXXX
- connection: keep-alive
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22java.net.ConnectException: Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) java.net.Socket.connect(Socket.java:529) org.basex.server.ClientSession.<init>(ClientSession.java:107) org.basex.server.ClientSession.<init>(ClientSession.java:85) org.basex.query.func.FNClient.connect(FNClient.java:81) org.basex.query.func.FNClient.item(FNClient.java:61) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.func.FNClient.value(FNClient.java:53) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.expr.Try.value(Try.java:69) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102) org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99) org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c
- host: ouripaddress:8984
- connection: keep-alive
- cache-control: max-age=0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
- dnt: 1
- accept-encoding: gzip,deflate,sdch
- accept-language: en-US,en;q=0.8
- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22_ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@ac0b3d1
- host: ouripaddress:8984
- connection: keep-alive
- accept: */*
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
- dnt: 1
- referer: http://ouripaddress:8984/bxApp/restxq/etc
- accept-encoding: gzip,deflate,sdch
- accept-language: en-US,en;q=0.8
- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
- cookie: JSESSIONID=XXXXXXXXX
_ RESPONSE ________________________________ …
I ran netstat -an | grep "LISTEN ". Port 1984 was not listed. Thinking that 1984 was closed, I ran iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 1984 -j ACCEPT. However after running netstat -lnp | grep 1984 -- still nothing.
The file .basex is at the root of our webapp and looks like this:
... # Client/Server Architecture HOST = ouripaddress PORT = 1984 SERVERPORT = 1984 EVENTPORT = 1985 USER = user PASSWORD = userpassword SERVERHOST = ouripaddress PROXYHOST = PROXYPORT = 80 NONPROXYHOSTS = TIMEOUT = 30 KEEPALIVE = 600 PARALLEL = 8 LOG = true LOGMSGMAXLEN = 1000 ...
Any help as to why we are not able to connect would be much appreciated!
-Sean
On Wednesday, May 1, 2013 at 11:57 AM, France Baril wrote:
On Tue, Apr 30, 2013 at 3:55 AM, Christian Grün christian.gruen@gmail.com wrote:
Dear France,
Works perfectly well on my Mac. Returns a BXCL0001 when used on the Linux production server.
could you additionally tell us what error message is attached to the error code?
The only reason I can find is that the production server is deployed through a servlet. Could this affect the behaviour?
Could the fact that the production server is using TomCat have an impact on the client:connect function?
As your code seems to work on your Mac, I indeed assume it has to do with the servlet configuration. You could try to add the following snippet to the web.xml configuration file:
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param>
This way, some additional debugging information such as Java stack traces will be output to STDERR, which you could send us as well (this information may e. g. end up on command line or in logs/catalina.out, depending on your Tomcat configuration).
Hope this helps? Christian
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com (514) 572-0341
Hi Christian,
Thanks for your response. After editing web.xml (See below) and deploying the updated WAR to Tomcat, we no longer receive the "org.basex.http.HTTPException: No function found that matches the request" message in catalina.out; however, the "Connection refused" message remains. In web.xml, I've set org.basex.httplocal to true and to false with same outcome per catalina.out. Do I need to modify Tomcat's server.xml file as well? Given the log and web.xml below, do you see any issues?
Again, we appreciate your help.
-Sean
********************** Begin catalina.out ********************** ... May 2, 2013 9:09:53 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8984"] May 2, 2013 9:09:53 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8443"] May 2, 2013 9:09:53 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 11944 ms May 2, 2013 9:13:29 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/bxApp] May 2, 2013 9:14:02 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.war java.net.ConnectException: Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) java.net.Socket.connect(Socket.java:529) org.basex.server.ClientSession.<init>(ClientSession.java:107) org.basex.server.ClientSession.<init>(ClientSession.java:85) org.basex.query.func.FNClient.connect(FNClient.java:81) org.basex.query.func.FNClient.item(FNClient.java:61) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.func.FNClient.value(FNClient.java:53) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.expr.Try.value(Try.java:69) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102) org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99) org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6cff7cd8 - host: ouripaddress:8984 - user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0 - accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 - accept-language: en-US,en;q=0.5 - accept-encoding: gzip, deflate - cookie: JSESSIONID=XXXXXXXXX - connection: keep-alive _ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@69b3d448_ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6cff7cd8 - host: ouripaddress:8984 - user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0 - accept: text/css,*/*;q=0.1 - accept-language: en-US,en;q=0.5 - accept-encoding: gzip, deflate - referer: http://ouripaddress:8984/bxApp/restxq/etc - cookie: JSESSIONID=XXXXXXX - connection: keep-alive
... ********************** End of catalina.out **********************
********************** Begin web.xml ********************** <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <description>HTTP Services</description>
<context-param> <param-name>org.basex.user</param-name> <param-value>some-username</param-value> </context-param> <context-param> <param-name>org.basex.password</param-name> <param-value>some-username-pw</param-value> </context-param>
<!-- Path to .basexperm & .basex: http://docs.basex.org/wiki/Configuration--> <context-param> <param-name>org.basex.path</param-name> <param-value>/var/lib/tomcat7/webapps/bxApp</param-value> </context-param>
<!-- Per Christian on Apr 2, 2013 Start--> <context-param> <param-name>org.basex.httplocal</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>org.basex.host</param-name> <param-value>ouridaddress</param-value> </context-param> <context-param> <param-name>org.basex.port</param-name> <param-value>1984</param-value> </context-param> <context-param> <param-name>org.basex.serverport</param-name> <param-value>1984</param-value> </context-param> <context-param> <param-name>org.basex.eventport</param-name> <param-value>1985</param-value> </context-param> <context-param> <param-name>org.basex.serverhost</param-name> <param-value>ouridaddress</param-value> </context-param> <context-param> <param-name>org.basex.proxyport</param-name> <param-value>80</param-value> </context-param> <context-param> <param-name>org.basex.timeout</param-name> <param-value>30</param-value> </context-param> <context-param> <param-name>org.basex.keepalive</param-name> <param-value>600</param-value> </context-param> <context-param> <param-name>org.basex.parallel</param-name> <param-value>8</param-value> </context-param> <context-param> <param-name>org.basex.log</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.basex.logmsgmaxlen</param-name> <param-value>1000</param-value> </context-param> <context-param> <param-name>org.basex.stopport</param-name> <param-value>8985</param-value> </context-param> <context-param> <param-name>org.basex.dblocking</param-name> <param-value>false</param-value> </context-param>
<!--DEBUG: See Tomcat Log--> <context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.basex.restxqpath</param-name> <param-value>.</param-value> </context-param> <context-param> <param-name>org.basex.dbpath</param-name> <param-value>WEB-INF/data</param-value> </context-param> <context-param> <param-name>org.basex.repopath</param-name> <param-value>WEB-INF/repo</param-value> </context-param>
<!-- Global session listener --> <listener> <listener-class>org.basex.http.SessionListener</listener-class> </listener>
<!-- Mapping for static resources (may be restricted to a sub path) --> <servlet> <servlet-name>default</servlet-name> <init-param> <param-name>useFileMappedBuffer</param-name> <param-value>false</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
<!-- WebDAV Service (can be deactivated by removing this entry) --> <servlet> <servlet-name>WebDAV</servlet-name> <servlet-class>org.basex.http.webdav.WebDAVServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>WebDAV</servlet-name> <url-pattern>/webdav/*</url-pattern> </servlet-mapping>
<!-- REST Service (can be deactivated by removing this entry) --> <servlet> <servlet-name>REST</servlet-name> <servlet-class>org.basex.http.rest.RESTServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>REST</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping>
<!-- RESTXQ Service (can be deactivated by removing this entry) --> <servlet> <servlet-name>RESTXQ</servlet-name> <servlet-class>org.basex.http.restxq.RestXqServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>RESTXQ</servlet-name> <url-pattern>/restxq/*</url-pattern> <load-on-startup>1</load-on-startup> </servlet-mapping>
<!-- Direct association to queries and scripts --> <servlet> <servlet-name>Direct</servlet-name> <servlet-class>org.basex.http.direct.DirectServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Direct</servlet-name> <url-pattern>*.xq</url-pattern> <url-pattern>*.xql</url-pattern> <url-pattern>*.xqm</url-pattern> <url-pattern>*.xqu</url-pattern> <url-pattern>*.xquery</url-pattern> <url-pattern>*.bxs</url-pattern> </servlet-mapping> <security-constraint> <web-resource-collection> <web-resource-name>Private</web-resource-name> <description>Matches all pages.</description> <url-pattern>/some-non-restxq-dir/*</url-pattern> <http-method>DELETE</http-method> <http-method>PUT</http-method> <http-method>HEAD</http-method> <http-method>OPTIONS</http-method> <http-method>TRACE</http-method> <http-method>GET</http-method> <http-method>POST</http-method> <http-method>CONNECT</http-method> </web-resource-collection> <auth-constraint> <role-name>intentionally-unauth-user</role-name> </auth-constraint> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>Exclude from Security</web-resource-name> <url-pattern>/some-non-restxq-dir/OurResource/*</url-pattern> </web-resource-collection> </security-constraint> <security-role> <role-name>intentionally-unauth-user</role-name> </security-role> </web-app>
********************** End web.xml **********************
Sean
On Thursday, May 2, 2013 at 12:37 PM, Christian Grün wrote:
Dear Sean,
sorry for the delay, and thanks for your report. Some hints:
– did you manage to connect to localhost with Tomcat? – the .basex configuration file won’t be parsed if BaseX is deployed as servlet container [1]. Instead, you’ll have to specify all options in the web.xml (http://web.xml) configuration file
If this doesn't help, don’t hesitate and ask again; I’ll then try to rebuild your scenario.
All the best, Christian
[1] http://docs.basex.org/wiki/Web_Application#Configuration ___________________________
On Wed, May 1, 2013 at 9:23 PM, Sean Healy <sjh@seanjhealy.com (mailto:sjh@seanjhealy.com)> wrote:
Ubuntu Server 12.10 Tomcat 7 BaseX 7.6
We are using the client module to make the following call: client:connect($app:feedback-server-host, 1984, $session-user, $session-password). Port 1984 successfully connects within a client/server application; however, when we deploy as a web application to Tomcat, either BaseX Server is not starting up or port 1984 is not available. We added <param-name>org.basex.debug</param-name> to Tomcat's web.xml (http://web.xml). The output of …/tomcat7/logs/catalina.out follows:
... INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.war May 1, 2013 4:22:17 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8984"] May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8443"] May 1, 2013 4:22:17 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 52056 ms org.basex.http.HTTPException: No function found that matches the request. org.basex.http.HTTPErr.thrw(HTTPErr.java:56) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:26) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c
- host: ouripaddress:8984
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- accept-language: en-US,en;q=0.5
- accept-encoding: gzip, deflate
- cookie: JSESSIONID=XXXXXXX
- connection: keep-alive
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22java.net.ConnectException (mailto:org.apache.catalina.connector.ResponseFacade@63721e22java.net.ConnectException): Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) java.net.Socket.connect(Socket.java:529) org.basex.server.ClientSession.<init>(ClientSession.java:107) org.basex.server.ClientSession.<init>(ClientSession.java:85) org.basex.query.func.FNClient.connect(FNClient.java:81) org.basex.query.func.FNClient.item(FNClient.java:61) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.func.FNClient.value(FNClient.java:53) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.expr.Try.value(Try.java:69) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102) org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99) org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c
- host: ouripaddress:8984
- connection: keep-alive
- cache-control: max-age=0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
- dnt: 1
- accept-encoding: gzip,deflate,sdch
- accept-language: en-US,en;q=0.8
- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22_ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@ac0b3d1
- host: ouripaddress:8984
- connection: keep-alive
- accept: */*
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
- dnt: 1
- referer: http://ouripaddress:8984/bxApp/restxq/etc
- accept-encoding: gzip,deflate,sdch
- accept-language: en-US,en;q=0.8
- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
- cookie: JSESSIONID=XXXXXXXXX
_ RESPONSE ________________________________ …
I ran netstat -an | grep "LISTEN ". Port 1984 was not listed. Thinking that 1984 was closed, I ran iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 1984 -j ACCEPT. However after running netstat -lnp | grep 1984 -- still nothing.
The file .basex is at the root of our webapp and looks like this:
... # Client/Server Architecture HOST = ouripaddress PORT = 1984 SERVERPORT = 1984 EVENTPORT = 1985 USER = user PASSWORD = userpassword SERVERHOST = ouripaddress PROXYHOST = PROXYPORT = 80 NONPROXYHOSTS = TIMEOUT = 30 KEEPALIVE = 600 PARALLEL = 8 LOG = true LOGMSGMAXLEN = 1000 ...
Any help as to why we are not able to connect would be much appreciated!
-Sean
On Wednesday, May 1, 2013 at 11:57 AM, France Baril wrote:
On Tue, Apr 30, 2013 at 3:55 AM, Christian Grün <christian.gruen@gmail.com (mailto:christian.gruen@gmail.com)> wrote:
Dear France,
Works perfectly well on my Mac. Returns a BXCL0001 when used on the Linux production server.
could you additionally tell us what error message is attached to the error code?
The only reason I can find is that the production server is deployed through a servlet. Could this affect the behaviour?
Could the fact that the production server is using TomCat have an impact on the client:connect function?
As your code seems to work on your Mac, I indeed assume it has to do with the servlet configuration. You could try to add the following snippet to the web.xml (http://web.xml) configuration file:
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param>
This way, some additional debugging information such as Java stack traces will be output to STDERR, which you could send us as well (this information may e. g. end up on command line or in logs/catalina.out, depending on your Tomcat configuration).
Hope this helps? Christian
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com (mailto:france.baril@architextus.com) (514) 572-0341
Sean,
sorry for letting you wait. To be honest, I have no concrete idea what might be the problem. This may also be because I have done too less with Tomcat, but afaik there’s usually no need to update the server.xml file. I’ll first need to reproduce your scenario locally, but this may take some time.
Maybe someone else on this list can give some advice on Tomcat faster than me? Christian ___________________________
On Fri, May 3, 2013 at 12:13 AM, Sean Healy sjh@seanjhealy.com wrote:
Hi Christian,
Thanks for your response. After editing web.xml (See below) and deploying the updated WAR to Tomcat, we no longer receive the "org.basex.http.HTTPException: No function found that matches the request" message in catalina.out; however, the "Connection refused" message remains. In web.xml, I've set org.basex.httplocal to true and to false with same outcome per catalina.out. Do I need to modify Tomcat's server.xml file as well? Given the log and web.xml below, do you see any issues?
Again, we appreciate your help.
-Sean
Begin catalina.out
... May 2, 2013 9:09:53 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8984"] May 2, 2013 9:09:53 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8443"] May 2, 2013 9:09:53 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 11944 ms May 2, 2013 9:13:29 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/bxApp] May 2, 2013 9:14:02 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.war java.net.ConnectException: Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) java.net.Socket.connect(Socket.java:529) org.basex.server.ClientSession.<init>(ClientSession.java:107) org.basex.server.ClientSession.<init>(ClientSession.java:85) org.basex.query.func.FNClient.connect(FNClient.java:81) org.basex.query.func.FNClient.item(FNClient.java:61) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.func.FNClient.value(FNClient.java:53) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.expr.Try.value(Try.java:69) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102) org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99) org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6cff7cd8
- host: ouripaddress:8984
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- accept-language: en-US,en;q=0.5
- accept-encoding: gzip, deflate
- cookie: JSESSIONID=XXXXXXXXX
- connection: keep-alive
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@69b3d448_ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6cff7cd8
- host: ouripaddress:8984
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
- accept: text/css,*/*;q=0.1
- accept-language: en-US,en;q=0.5
- accept-encoding: gzip, deflate
- referer: http://ouripaddress:8984/bxApp/restxq/etc
- cookie: JSESSIONID=XXXXXXX
- connection: keep-alive
...
End of catalina.out
Begin web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <description>HTTP Services</description>
<context-param> <param-name>org.basex.user</param-name> <param-value>some-username</param-value> </context-param> <context-param> <param-name>org.basex.password</param-name> <param-value>some-username-pw</param-value> </context-param>
<!-- Path to .basexperm & .basex: http://docs.basex.org/wiki/Configuration-->
<context-param> <param-name>org.basex.path</param-name> <param-value>/var/lib/tomcat7/webapps/bxApp</param-value> </context-param>
<!-- Per Christian on Apr 2, 2013 Start-->
<context-param> <param-name>org.basex.httplocal</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>org.basex.host</param-name> <param-value>ouridaddress</param-value> </context-param> <context-param> <param-name>org.basex.port</param-name> <param-value>1984</param-value> </context-param> <context-param> <param-name>org.basex.serverport</param-name> <param-value>1984</param-value> </context-param> <context-param> <param-name>org.basex.eventport</param-name> <param-value>1985</param-value> </context-param> <context-param> <param-name>org.basex.serverhost</param-name> <param-value>ouridaddress</param-value> </context-param> <context-param> <param-name>org.basex.proxyport</param-name> <param-value>80</param-value> </context-param> <context-param> <param-name>org.basex.timeout</param-name> <param-value>30</param-value> </context-param> <context-param> <param-name>org.basex.keepalive</param-name> <param-value>600</param-value> </context-param> <context-param> <param-name>org.basex.parallel</param-name> <param-value>8</param-value> </context-param> <context-param> <param-name>org.basex.log</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.basex.logmsgmaxlen</param-name> <param-value>1000</param-value> </context-param> <context-param> <param-name>org.basex.stopport</param-name> <param-value>8985</param-value> </context-param> <context-param> <param-name>org.basex.dblocking</param-name> <param-value>false</param-value> </context-param>
<!--DEBUG: See Tomcat Log-->
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.basex.restxqpath</param-name> <param-value>.</param-value> </context-param> <context-param> <param-name>org.basex.dbpath</param-name> <param-value>WEB-INF/data</param-value> </context-param> <context-param> <param-name>org.basex.repopath</param-name> <param-value>WEB-INF/repo</param-value> </context-param>
<!-- Global session listener -->
<listener> <listener-class>org.basex.http.SessionListener</listener-class> </listener>
<!-- Mapping for static resources (may be restricted to a sub path) -->
<servlet> <servlet-name>default</servlet-name> <init-param> <param-name>useFileMappedBuffer</param-name> <param-value>false</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
<!-- WebDAV Service (can be deactivated by removing this entry) -->
<servlet> <servlet-name>WebDAV</servlet-name> <servlet-class>org.basex.http.webdav.WebDAVServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>WebDAV</servlet-name> <url-pattern>/webdav/*</url-pattern> </servlet-mapping>
<!-- REST Service (can be deactivated by removing this entry) -->
<servlet> <servlet-name>REST</servlet-name> <servlet-class>org.basex.http.rest.RESTServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>REST</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping>
<!-- RESTXQ Service (can be deactivated by removing this entry) -->
<servlet> <servlet-name>RESTXQ</servlet-name> <servlet-class>org.basex.http.restxq.RestXqServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>RESTXQ</servlet-name> <url-pattern>/restxq/*</url-pattern> <load-on-startup>1</load-on-startup> </servlet-mapping>
<!-- Direct association to queries and scripts -->
<servlet> <servlet-name>Direct</servlet-name> <servlet-class>org.basex.http.direct.DirectServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Direct</servlet-name> <url-pattern>*.xq</url-pattern> <url-pattern>*.xql</url-pattern> <url-pattern>*.xqm</url-pattern> <url-pattern>*.xqu</url-pattern> <url-pattern>*.xquery</url-pattern> <url-pattern>*.bxs</url-pattern> </servlet-mapping> <security-constraint> <web-resource-collection> <web-resource-name>Private</web-resource-name> <description>Matches all pages.</description> <url-pattern>/some-non-restxq-dir/*</url-pattern> <http-method>DELETE</http-method> <http-method>PUT</http-method> <http-method>HEAD</http-method> <http-method>OPTIONS</http-method> <http-method>TRACE</http-method> <http-method>GET</http-method> <http-method>POST</http-method> <http-method>CONNECT</http-method> </web-resource-collection> <auth-constraint> <role-name>intentionally-unauth-user</role-name> </auth-constraint> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>Exclude from Security</web-resource-name> <url-pattern>/some-non-restxq-dir/OurResource/*</url-pattern> </web-resource-collection> </security-constraint> <security-role> <role-name>intentionally-unauth-user</role-name> </security-role> </web-app>
End web.xml
Sean
On Thursday, May 2, 2013 at 12:37 PM, Christian Grün wrote:
Dear Sean,
sorry for the delay, and thanks for your report. Some hints:
– did you manage to connect to localhost with Tomcat? – the .basex configuration file won’t be parsed if BaseX is deployed as servlet container [1]. Instead, you’ll have to specify all options in the web.xml configuration file
If this doesn't help, don’t hesitate and ask again; I’ll then try to rebuild your scenario.
All the best, Christian
[1] http://docs.basex.org/wiki/Web_Application#Configuration ___________________________
On Wed, May 1, 2013 at 9:23 PM, Sean Healy sjh@seanjhealy.com wrote:
Ubuntu Server 12.10 Tomcat 7 BaseX 7.6
We are using the client module to make the following call: client:connect($app:feedback-server-host, 1984, $session-user, $session-password). Port 1984 successfully connects within a client/server application; however, when we deploy as a web application to Tomcat, either BaseX Server is not starting up or port 1984 is not available. We added <param-name>org.basex.debug</param-name> to Tomcat's web.xml. The output of …/tomcat7/logs/catalina.out follows:
... INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.war May 1, 2013 4:22:17 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8984"] May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8443"] May 1, 2013 4:22:17 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 52056 ms org.basex.http.HTTPException: No function found that matches the request. org.basex.http.HTTPErr.thrw(HTTPErr.java:56) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:26) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c
- host: ouripaddress:8984
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- accept-language: en-US,en;q=0.5
- accept-encoding: gzip, deflate
- cookie: JSESSIONID=XXXXXXX
- connection: keep-alive
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22java.net.ConnectException: Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) java.net.Socket.connect(Socket.java:529) org.basex.server.ClientSession.<init>(ClientSession.java:107) org.basex.server.ClientSession.<init>(ClientSession.java:85) org.basex.query.func.FNClient.connect(FNClient.java:81) org.basex.query.func.FNClient.item(FNClient.java:61) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.func.FNClient.value(FNClient.java:53) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.expr.Try.value(Try.java:69) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102) org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99) org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c
- host: ouripaddress:8984
- connection: keep-alive
- cache-control: max-age=0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
- dnt: 1
- accept-encoding: gzip,deflate,sdch
- accept-language: en-US,en;q=0.8
- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22_ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@ac0b3d1
- host: ouripaddress:8984
- connection: keep-alive
- accept: */*
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
- dnt: 1
- referer: http://ouripaddress:8984/bxApp/restxq/etc
- accept-encoding: gzip,deflate,sdch
- accept-language: en-US,en;q=0.8
- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
- cookie: JSESSIONID=XXXXXXXXX
_ RESPONSE ________________________________ …
I ran netstat -an | grep "LISTEN ". Port 1984 was not listed. Thinking that 1984 was closed, I ran iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 1984 -j ACCEPT. However after running netstat -lnp | grep 1984 -- still nothing.
The file .basex is at the root of our webapp and looks like this:
... # Client/Server Architecture HOST = ouripaddress PORT = 1984 SERVERPORT = 1984 EVENTPORT = 1985 USER = user PASSWORD = userpassword SERVERHOST = ouripaddress PROXYHOST = PROXYPORT = 80 NONPROXYHOSTS = TIMEOUT = 30 KEEPALIVE = 600 PARALLEL = 8 LOG = true LOGMSGMAXLEN = 1000 ...
Any help as to why we are not able to connect would be much appreciated!
-Sean
On Wednesday, May 1, 2013 at 11:57 AM, France Baril wrote:
On Tue, Apr 30, 2013 at 3:55 AM, Christian Grün christian.gruen@gmail.com wrote:
Dear France,
Works perfectly well on my Mac. Returns a BXCL0001 when used on the Linux production server.
could you additionally tell us what error message is attached to the error code?
The only reason I can find is that the production server is deployed through a servlet. Could this affect the behaviour?
Could the fact that the production server is using TomCat have an impact on the client:connect function?
As your code seems to work on your Mac, I indeed assume it has to do with the servlet configuration. You could try to add the following snippet to the web.xml configuration file:
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param>
This way, some additional debugging information such as Java stack traces will be output to STDERR, which you could send us as well (this information may e. g. end up on command line or in logs/catalina.out, depending on your Tomcat configuration).
Hope this helps? Christian
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com (514) 572-0341
Christian, Thank you for looking into this! Sean
On May 6, 2013, at 6:19 AM, Christian Grün christian.gruen@gmail.com wrote:
Sean,
sorry for letting you wait. To be honest, I have no concrete idea what might be the problem. This may also be because I have done too less with Tomcat, but afaik there’s usually no need to update the server.xml file. I’ll first need to reproduce your scenario locally, but this may take some time.
Maybe someone else on this list can give some advice on Tomcat faster than me? Christian ___________________________
On Fri, May 3, 2013 at 12:13 AM, Sean Healy sjh@seanjhealy.com wrote:
Hi Christian,
Thanks for your response. After editing web.xml (See below) and deploying the updated WAR to Tomcat, we no longer receive the "org.basex.http.HTTPException: No function found that matches the request" message in catalina.out; however, the "Connection refused" message remains. In web.xml, I've set org.basex.httplocal to true and to false with same outcome per catalina.out. Do I need to modify Tomcat's server.xml file as well? Given the log and web.xml below, do you see any issues?
Again, we appreciate your help.
-Sean
Begin catalina.out
... May 2, 2013 9:09:53 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8984"] May 2, 2013 9:09:53 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8443"] May 2, 2013 9:09:53 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 11944 ms May 2, 2013 9:13:29 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/bxApp] May 2, 2013 9:14:02 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.war java.net.ConnectException: Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) java.net.Socket.connect(Socket.java:529) org.basex.server.ClientSession.<init>(ClientSession.java:107) org.basex.server.ClientSession.<init>(ClientSession.java:85) org.basex.query.func.FNClient.connect(FNClient.java:81) org.basex.query.func.FNClient.item(FNClient.java:61) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.func.FNClient.value(FNClient.java:53) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.expr.Try.value(Try.java:69) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102) org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99) org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6cff7cd8
- host: ouripaddress:8984
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- accept-language: en-US,en;q=0.5
- accept-encoding: gzip, deflate
- cookie: JSESSIONID=XXXXXXXXX
- connection: keep-alive
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@69b3d448_ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6cff7cd8
- host: ouripaddress:8984
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
- accept: text/css,*/*;q=0.1
- accept-language: en-US,en;q=0.5
- accept-encoding: gzip, deflate
- referer: http://ouripaddress:8984/bxApp/restxq/etc
- cookie: JSESSIONID=XXXXXXX
- connection: keep-alive
...
End of catalina.out
Begin web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <description>HTTP Services</description>
<context-param> <param-name>org.basex.user</param-name> <param-value>some-username</param-value> </context-param> <context-param> <param-name>org.basex.password</param-name> <param-value>some-username-pw</param-value> </context-param>
<!-- Path to .basexperm & .basex: http://docs.basex.org/wiki/Configuration-->
<context-param> <param-name>org.basex.path</param-name> <param-value>/var/lib/tomcat7/webapps/bxApp</param-value> </context-param>
<!-- Per Christian on Apr 2, 2013 Start-->
<context-param> <param-name>org.basex.httplocal</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>org.basex.host</param-name> <param-value>ouridaddress</param-value> </context-param> <context-param> <param-name>org.basex.port</param-name> <param-value>1984</param-value> </context-param> <context-param> <param-name>org.basex.serverport</param-name> <param-value>1984</param-value> </context-param> <context-param> <param-name>org.basex.eventport</param-name> <param-value>1985</param-value> </context-param> <context-param> <param-name>org.basex.serverhost</param-name> <param-value>ouridaddress</param-value> </context-param> <context-param> <param-name>org.basex.proxyport</param-name> <param-value>80</param-value> </context-param> <context-param> <param-name>org.basex.timeout</param-name> <param-value>30</param-value> </context-param> <context-param> <param-name>org.basex.keepalive</param-name> <param-value>600</param-value> </context-param> <context-param> <param-name>org.basex.parallel</param-name> <param-value>8</param-value> </context-param> <context-param> <param-name>org.basex.log</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.basex.logmsgmaxlen</param-name> <param-value>1000</param-value> </context-param> <context-param> <param-name>org.basex.stopport</param-name> <param-value>8985</param-value> </context-param> <context-param> <param-name>org.basex.dblocking</param-name> <param-value>false</param-value> </context-param>
<!--DEBUG: See Tomcat Log-->
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.basex.restxqpath</param-name> <param-value>.</param-value> </context-param> <context-param> <param-name>org.basex.dbpath</param-name> <param-value>WEB-INF/data</param-value> </context-param> <context-param> <param-name>org.basex.repopath</param-name> <param-value>WEB-INF/repo</param-value> </context-param>
<!-- Global session listener -->
<listener> <listener-class>org.basex.http.SessionListener</listener-class> </listener>
<!-- Mapping for static resources (may be restricted to a sub path) -->
<servlet> <servlet-name>default</servlet-name> <init-param> <param-name>useFileMappedBuffer</param-name> <param-value>false</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
<!-- WebDAV Service (can be deactivated by removing this entry) -->
<servlet> <servlet-name>WebDAV</servlet-name> <servlet-class>org.basex.http.webdav.WebDAVServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>WebDAV</servlet-name> <url-pattern>/webdav/*</url-pattern> </servlet-mapping>
<!-- REST Service (can be deactivated by removing this entry) -->
<servlet> <servlet-name>REST</servlet-name> <servlet-class>org.basex.http.rest.RESTServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>REST</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping>
<!-- RESTXQ Service (can be deactivated by removing this entry) -->
<servlet> <servlet-name>RESTXQ</servlet-name> <servlet-class>org.basex.http.restxq.RestXqServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>RESTXQ</servlet-name> <url-pattern>/restxq/*</url-pattern> <load-on-startup>1</load-on-startup> </servlet-mapping>
<!-- Direct association to queries and scripts -->
<servlet> <servlet-name>Direct</servlet-name> <servlet-class>org.basex.http.direct.DirectServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Direct</servlet-name> <url-pattern>*.xq</url-pattern> <url-pattern>*.xql</url-pattern> <url-pattern>*.xqm</url-pattern> <url-pattern>*.xqu</url-pattern> <url-pattern>*.xquery</url-pattern> <url-pattern>*.bxs</url-pattern> </servlet-mapping> <security-constraint> <web-resource-collection> <web-resource-name>Private</web-resource-name> <description>Matches all pages.</description> <url-pattern>/some-non-restxq-dir/*</url-pattern> <http-method>DELETE</http-method> <http-method>PUT</http-method> <http-method>HEAD</http-method> <http-method>OPTIONS</http-method> <http-method>TRACE</http-method> <http-method>GET</http-method> <http-method>POST</http-method> <http-method>CONNECT</http-method> </web-resource-collection> <auth-constraint> <role-name>intentionally-unauth-user</role-name> </auth-constraint> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>Exclude from Security</web-resource-name> <url-pattern>/some-non-restxq-dir/OurResource/*</url-pattern> </web-resource-collection> </security-constraint> <security-role> <role-name>intentionally-unauth-user</role-name> </security-role> </web-app>
End web.xml
Sean
On Thursday, May 2, 2013 at 12:37 PM, Christian Grün wrote:
Dear Sean,
sorry for the delay, and thanks for your report. Some hints:
– did you manage to connect to localhost with Tomcat? – the .basex configuration file won’t be parsed if BaseX is deployed as servlet container [1]. Instead, you’ll have to specify all options in the web.xml configuration file
If this doesn't help, don’t hesitate and ask again; I’ll then try to rebuild your scenario.
All the best, Christian
[1] http://docs.basex.org/wiki/Web_Application#Configuration ___________________________
On Wed, May 1, 2013 at 9:23 PM, Sean Healy sjh@seanjhealy.com wrote:
Ubuntu Server 12.10 Tomcat 7 BaseX 7.6
We are using the client module to make the following call: client:connect($app:feedback-server-host, 1984, $session-user, $session-password). Port 1984 successfully connects within a client/server application; however, when we deploy as a web application to Tomcat, either BaseX Server is not starting up or port 1984 is not available. We added <param-name>org.basex.debug</param-name> to Tomcat's web.xml. The output of …/tomcat7/logs/catalina.out follows:
... INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.war May 1, 2013 4:22:17 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8984"] May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8443"] May 1, 2013 4:22:17 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 52056 ms org.basex.http.HTTPException: No function found that matches the request. org.basex.http.HTTPErr.thrw(HTTPErr.java:56) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:26) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c
- host: ouripaddress:8984
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- accept-language: en-US,en;q=0.5
- accept-encoding: gzip, deflate
- cookie: JSESSIONID=XXXXXXX
- connection: keep-alive
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22java.net.ConnectException: Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) java.net.Socket.connect(Socket.java:529) org.basex.server.ClientSession.<init>(ClientSession.java:107) org.basex.server.ClientSession.<init>(ClientSession.java:85) org.basex.query.func.FNClient.connect(FNClient.java:81) org.basex.query.func.FNClient.item(FNClient.java:61) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.func.FNClient.value(FNClient.java:53) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.expr.Try.value(Try.java:69) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.flwor.Let$1.next(Let.java:85) org.basex.query.flwor.FLWR$1.next(FLWR.java:63) org.basex.query.expr.ParseExpr.item(ParseExpr.java:53) org.basex.query.expr.ParseExpr.value(ParseExpr.java:70) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.UserFunc.value(UserFunc.java:175) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68) org.basex.query.QueryContext.value(QueryContext.java:296) org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102) org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99) org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662) _ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@6f45959c
- host: ouripaddress:8984
- connection: keep-alive
- cache-control: max-age=0
- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
- dnt: 1
- accept-encoding: gzip,deflate,sdch
- accept-language: en-US,en;q=0.8
- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
_ RESPONSE ________________________________ org.apache.catalina.connector.ResponseFacade@63721e22_ REQUEST _________________________________ org.apache.catalina.connector.RequestFacade@ac0b3d1
- host: ouripaddress:8984
- connection: keep-alive
- accept: */*
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
- dnt: 1
- referer: http://ouripaddress:8984/bxApp/restxq/etc
- accept-encoding: gzip,deflate,sdch
- accept-language: en-US,en;q=0.8
- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
- cookie: JSESSIONID=XXXXXXXXX
_ RESPONSE ________________________________ …
I ran netstat -an | grep "LISTEN ". Port 1984 was not listed. Thinking that 1984 was closed, I ran iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 1984 -j ACCEPT. However after running netstat -lnp | grep 1984 -- still nothing.
The file .basex is at the root of our webapp and looks like this:
... # Client/Server Architecture HOST = ouripaddress PORT = 1984 SERVERPORT = 1984 EVENTPORT = 1985 USER = user PASSWORD = userpassword SERVERHOST = ouripaddress PROXYHOST = PROXYPORT = 80 NONPROXYHOSTS = TIMEOUT = 30 KEEPALIVE = 600 PARALLEL = 8 LOG = true LOGMSGMAXLEN = 1000 ...
Any help as to why we are not able to connect would be much appreciated!
-Sean
On Wednesday, May 1, 2013 at 11:57 AM, France Baril wrote:
On Tue, Apr 30, 2013 at 3:55 AM, Christian Grün christian.gruen@gmail.com wrote:
Dear France,
Works perfectly well on my Mac. Returns a BXCL0001 when used on the Linux production server.
could you additionally tell us what error message is attached to the error code?
The only reason I can find is that the production server is deployed through a servlet. Could this affect the behaviour?
Could the fact that the production server is using TomCat have an impact on the client:connect function?
As your code seems to work on your Mac, I indeed assume it has to do with the servlet configuration. You could try to add the following snippet to the web.xml configuration file:
<context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param>
This way, some additional debugging information such as Java stack traces will be output to STDERR, which you could send us as well (this information may e. g. end up on command line or in logs/catalina.out, depending on your Tomcat configuration).
Hope this helps? Christian
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com (514) 572-0341
basex-talk@mailman.uni-konstanz.de