Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.0
    • Component/s: Management Server
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None
    • Environment:

      Description

      Install management server rhel 6.3.
      Set up a basic zone.

      Set enable.ec2.api=true

      Restart management server.

      1. Create a user and generate

      • Your account's API key and Secret key
        2. Generate a private key and a self-signed X.509 certificate.
        $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/private_key.pem -out /path/to/cert.pem

      3. Register the mapping from the X.509 certificate to your accounts API keys with CloudStack using cloudstack-aws-api-register script.

      $ cloudstack-aws-api-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://<cloud-stack-server>:7080/awsapi

      user registeration succeeds.

      4.Setup the necessary environment variables for the EC2 tools.

      $ export EC2_ACCESS_KEY=<CloudStack API key>
      $ export EC2_SECRET_KEY=<CloudStack Secret key>
      $ export EC2_CERT=/path/to/cert.pem
      $ export EC2_PRIVATE_KEY=/path/to/private_key.pem
      $ export EC2_URL=http://cloud-stack-hostname:7080/awsapi
      $export EC2_HOME=/path/to/EC2_installation_directory

      Now try to make any SOAP api call.
      /root/ec2tool/ec2-api-tools-1.3-62308/bin
      . ./setup.sh

      I see the following exception :

      [root@Host41-4 bin]# ./ec2-describe-images
      Unexpected error:
      org.codehaus.xfire.fault.XFireFault: Unexpected close tag </body>; expected </HR>.
      at [row,col

      {unknown-source}]: [31,187]
      at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
      at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
      at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.j ava:139)
      at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
      at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java: 26)
      at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
      at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
      at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
      at org.codehaus.xfire.client.Client.invoke(Client.java:336)
      at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
      at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
      at $Proxy12.describeImages(Unknown Source)
      at com.amazon.aes.webservices.client.Jec2.describeImages(Jec2.java:529)
      at com.amazon.aes.webservices.client.cmd.DescribeImages.invokeOnline(Describ eImages.java:157)
      at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:795)
      at com.amazon.aes.webservices.client.cmd.DescribeImages.main(DescribeImages. java:181)
      Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expe cted </HR>.
      at [row,col {unknown-source}

      ]: [31,187]
      at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:60 5)
      at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
      at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.ja va:3256)
      at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3198 )
      at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:283 0)
      at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
      at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHand ler.java:44)
      at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:13 1)
      at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
      ... 14 more

      In catalina.out , I see the following error:

      java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver
      at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516)
      at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:615)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
      at com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:102)
      at com.cloud.bridge.service.EC2MainServlet.doPost(EC2MainServlet.java:77)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2268)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:679)

        Activity

          People

          • Assignee:
            Rohit Yadav
            Reporter:
            Sangeetha Hariharan
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development