Results 1 to 10 of 10

Thread: Grails runs local, not on CloudFoundry stack?

  1. #1
    Join Date
    Oct 2009
    Posts
    7

    Default 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

  2. #2
    Join Date
    Jun 2005
    Posts
    102

    Default

    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

  3. #3
    Join Date
    Jun 2005
    Posts
    102

    Default

    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?

  4. #4
    Join Date
    Oct 2009
    Posts
    7

    Default

    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

  5. #5
    Join Date
    Jun 2005
    Posts
    102

    Default

    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.

  6. #6
    Join Date
    Oct 2009
    Posts
    7

    Default

    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.

  7. #7
    Join Date
    Jun 2005
    Posts
    102

    Default

    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?

  8. #8
    Join Date
    Oct 2009
    Posts
    7

    Default

    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.

  9. #9
    Join Date
    Jun 2005
    Posts
    102

    Default

    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?

  10. #10
    Join Date
    Oct 2009
    Posts
    7

    Default

    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
  •