-
Nov 1st, 2009, 05:39 PM
#1
Grails runs local, not on CloudFoundry stack?
Hey Cloud Foundry,
Looking for any tips on my problem. I have a simple Grails web app that calls a secure soap web service. All works fine on my local dev environment running tomcat/mysql. However when I deploy to the simple Cloud Foundry stack (apache/tomcat/mysql), my soap service does not function and I get the below stack in my tomcat log. I'm not sure how to troubleshoot - tips?
Is there a way to eliminate apache from the stack? Or how can I replicate the apache setup that Cloud Foundry is using when deploying to ec2?
thanks,
chad.
ws.WSClient Could not invoke method.
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at org.apache.cxf.binding.soap.interceptor.ReadHeader sInterceptor.handleMessage(ReadHeadersInterceptor. java:196)
at org.apache.cxf.binding.soap.interceptor.ReadHeader sInterceptor.handleMessage(ReadHeadersInterceptor. java:58)
at org.apache.cxf.phase.PhaseInterceptorChain.doInter cept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.onMessage(Clien tImpl.java:658)
at org.apache.cxf.transport.http.HTTPConduit$WrappedO utputStream.handleResponseInternal(HTTPConduit.jav a:2139)
at org.apache.cxf.transport.http.HTTPConduit$WrappedO utputStream.handleResponse(HTTPConduit.java:2022)
at org.apache.cxf.transport.http.HTTPConduit$WrappedO utputStream.close(HTTPConduit.java:1947)
.......
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyo teHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(Handler Request.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnecti on(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnectio n.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(S treamScanner.java:686)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicS treamReader.java:2134)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(B asicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStream Reader.java:1069)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStr eamReader.java:1095)
at org.apache.cxf.binding.soap.interceptor.ReadHeader sInterceptor.handleMessage(ReadHeadersInterceptor. java:93)
... 225 more
-
Nov 5th, 2009, 07:27 PM
#2
Chad,
Not sure what is going on here.
You could open the firewall to allow 8080 and see what happens when you access Tomcat/tc Server directly.
The apache setup is pretty straightforward mod_proxy/mod_proxy_ajp/mod_balance.
Chris
-
Nov 5th, 2009, 07:28 PM
#3
I just read you message more closely. So you Grails application is not handling WS requests. It is calling out to a WS? "I have a simple Grails web app that calls a secure soap web service." Could this be a problem with certificates not being installed?
-
Nov 6th, 2009, 10:36 AM
#4
Hey Chris,
Thanks a bunch for responding. The secure soap service I'm hitting has a trusted ca (VeriSign). VeriSign root would be in the mix - cacerts I would think. And I would get a log message indicating such problem I think. Hitting the test environment WS they were self-signed cert, but I worked through that here:
http://forum.springsource.org/showthread.php?t=79538
Yest, good call on hitting Tomcat/tc directly. I tried opening up 8080 on Elasticfox, but my request timed out? I setup
Protocol Details:
HTTP
Protocol: TCP/IP
Port: 8080
Host: selected <Get my Host address>
Then hit it with my browser for my elasticIP...
http://<my elasticIP>:8080/
Am I missing something?
thanks,
@chadsmall
-
Nov 7th, 2009, 03:25 PM
#5
Not sure why your request would timeout:
* Wrong IP address
* Tomcat not running
* Firewall between you and EC2 that is blocking port 8080
* Tomcat redirecting you to a port that is not open, e.g. ssh port
I would use "curl -v --location http://<my elasticIP>:8080/" or the equivalent to see what is going on.
-
Nov 9th, 2009, 11:22 PM
#6
Hmm, not sure how to get to tomcat directly and bypass apache on simple CloudFoundry Stack.
I opened my ec2 security 0.0.0.0/0 for http port 8080
I redeployed new application through CloudFoundry
I tried direct ec2 url...
works:
curl -v --location http://ec2-174-129-22-42.compuazonaws.com:80
no dice? :
curl -v --location http://ec2-174-129-22-42.compuazonaws.com:8080
tcServer log shows startup on 8080...
INFO: Started up JMX registry on 127.0.0.1:6969
Nov 10, 2009 12:01:33 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
thanks for any ideas,
chad.
-
Nov 10th, 2009, 12:04 AM
#7
Chad,
I just tried accessing port 8080 for one of my instances (after opening the sec group) and it worked fine.
This is very strange. When you say "no dice" - what error did the curl command display exactly?
-
Nov 10th, 2009, 08:58 AM
#8
thanks for trying yours. Yeah, it is strange. I didn't touch my new deployment. No dice - timed out ...
chad-small:~ chadsmall$ curl -v --location http://ec2-174-129-22-42.compute-1.amazonaws.com:8080
* About to connect() to ec2-174-129-22-42.compute-1.amazonaws.com port 8080 (#0)
* Trying 174.129.22.42... Operation timed out
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
Feel free to give it a shot as I opened 8080 for 0.0.0.0/0
There isn't anything specific I need to configure in Apache/Tomcat for this is there?
I also have a feeling this is related to my issue of not getting a https response for my secure soap call within my http application. However, I've also configued port 443 for https for all - 0.0.0.0/0
thanks,
chad.
-
Nov 10th, 2009, 10:50 AM
#9
If tomcat is running on that host/port then it is very strange that it can't be accessed. Have you tried restarting the tc server service?
-
Nov 10th, 2009, 11:16 AM
#10
just restarted tcServer service and still the same. Timeout at
http://ec2-174-129-22-42.compute-1.amazonaws.com:8080/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules