Prachi, as you pointed out, the error was because there was a mismatch between
the version in the registration script and the WSDL version of the deployment.
After fixing that, now user registration fails with the below error,
27 Nov, 2012 11:17:00 AM com.cloud.bridge.service.EC2RestServlet setCertificate
SEVERE: SetCertificate exception
/home/likitha/incubator-cloudstack/awsapi/target/cloud-awsapi-4.1.0-SNAPSHOTWEB-INF/classes/xes.keystore
(No such file or directory)
java.io.FileNotFoundException:
/home/likitha/incubator-cloudstack/awsapi/target/cloud-awsapi-4.1.0-SNAPSHOTWEB-INF/classes/xes.keystore
(No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at java.io.FileInputStream.<init>(FileInputStream.java:96)
at
com.cloud.bridge.service.EC2RestServlet.setCertificate(EC2RestServlet.java:426)
at
com.cloud.bridge.service.EC2RestServlet.doGetOrPost(EC2RestServlet.java:271)
at
com.cloud.bridge.service.EC2RestServlet.doGet(EC2RestServlet.java:200)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at
com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:93)
at
com.cloud.bridge.service.EC2MainServlet.doGet(EC2MainServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at
org.mortbay.jetty.servlet.Dispatcher.error(Dispatcher.java:135)
at
org.mortbay.jetty.servlet.ErrorPageErrorHandler.handle(ErrorPageErrorHandler.java:129)
at org.mortbay.jetty.Response.sendError(Response.java:274)
at
com.cloud.bridge.service.EC2RestServlet.setCertificate(EC2RestServlet.java:462)
at
com.cloud.bridge.service.EC2RestServlet.doGetOrPost(EC2RestServlet.java:271)
at
com.cloud.bridge.service.EC2RestServlet.doGet(EC2RestServlet.java:200)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at
com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:93)
at
com.cloud.bridge.service.EC2MainServlet.doGet(EC2MainServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
27 Nov, 2012 11:17:00 AM com.cloud.bridge.service.EC2RestServlet doGetOrPost
SEVERE: Unexpected exception: null
java.lang.NullPointerException
at
com.cloud.bridge.service.EC2RestServlet.setCertificate(EC2RestServlet.java:464)
at
com.cloud.bridge.service.EC2RestServlet.doGetOrPost(EC2RestServlet.java:271)
at
com.cloud.bridge.service.EC2RestServlet.doGet(EC2RestServlet.java:200)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at
com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:93)
at
com.cloud.bridge.service.EC2MainServlet.doGet(EC2MainServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at
org.mortbay.jetty.servlet.Dispatcher.error(Dispatcher.java:135)
at
org.mortbay.jetty.servlet.ErrorPageErrorHandler.handle(ErrorPageErrorHandler.java:129)
at org.mortbay.jetty.Response.sendError(Response.java:274)
at
com.cloud.bridge.service.EC2RestServlet.setCertificate(EC2RestServlet.java:462)
at
com.cloud.bridge.service.EC2RestServlet.doGetOrPost(EC2RestServlet.java:271)
at
com.cloud.bridge.service.EC2RestServlet.doGet(EC2RestServlet.java:200)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at
org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at
com.cloud.bridge.service.EC2MainServlet.doGetOrPost(EC2MainServlet.java:93)
at
com.cloud.bridge.service.EC2MainServlet.doGet(EC2MainServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
I tried Query APIs (as it doesn't require registration to map the certificate
against the user keys). And the calls are successfully executed.
Thank you,
Likitha
-----Original Message-----
From: Sebastien Goasguen [mailto:[email protected]]
Sent: Tuesday, November 27, 2012 3:27 AM
To: [email protected]
Subject: Re: awsapi with new maven build
Prachi, do you have this working when running the EC2 app with maven ?
mvn -pl :cloud-awsapi jetty:run
-Sebastien
On Nov 26, 2012, at 8:02 PM, Prachi Damle
<[email protected]<mailto:[email protected]>> wrote:
> Hi Likitha,
>
> Check if the version set in the registration script matches the WSDL version
> of the deployment (in ec2-service.properties)
>
> -Prachi
>
> -----Original Message-----
> From: Likitha Shetty [mailto:[email protected]]
> Sent: Monday, November 26, 2012 12:18 AM
> To: [email protected]; [email protected]
> Subject: RE: awsapi with new maven build
>
> I got the same 401 error while trying to register a user against AWSAPI. Once
> I added 'db.awsapi.name=cloudbridge' to utils/conf/db.properties this issue
> was resolved.
>
>
>
> But now I am facing a new issue. When I try to register a user I get the
> following error, 'User registration failed with http error code: 531'.
>
> In 'cloudbridge' DB the table 'usercredentials' contains the right values for
> 'AccessKey' and 'SecretKey' (user keys are set correctly) but the
> CertUniqueId value is NULL.
>
> awapi.log is empty and Jetty logs doesn't show any error either.
>
>
>
> Any suggestions on how to resolve this ?
>
>
>
> Thank you,
>
> Likitha
>
>
>
> -----Original Message-----
> From: Sebastien Goasguen [mailto:[email protected]]
> Sent: Wednesday, November 14, 2012 9:54 PM
> To: [email protected]; [email protected]
> Subject: Re: awsapi with new maven build
>
>
>
>
>
> On Nov 14, 2012, at 4:44 PM, Prasanna Santhanam
> <[email protected]<mailto:[email protected]<mailto:[email protected]%3cmailto:[email protected]>>>
> wrote:
>
>
>
>> Is cloud-management process already running? Try stop that?
>
>>
>
>
>
> I am only running:
>
> mvn -pl :cloud-client-ui jetty:run
>
> and
>
> mvn -pl :cloud-awsapi jetty:run
>
>
>
>
>
>>
>
>> ~P.
>
>>
>
>> -----Original Message-----
>
>> From: Sebastien Goasguen <[email protected]>
>
>> Date: Wed, 14 Nov 2012 16:31:36
>
>> To:
>> <[email protected]<mailto:[email protected]>>
>
>> Reply-To:
>> [email protected]<mailto:[email protected]>
>
>> Subject: Re: awsapi with new maven build
>
>>
>
>>
>
>> On Nov 14, 2012, at 4:09 PM, Charles Moulliard
>> <[email protected]<mailto:[email protected]<mailto:[email protected]%3cmailto:[email protected]>>>
>> wrote:
>
>>
>
>>> Hi Sebastien,
>
>>>
>
>>> You should create a cloud schema + cloud user on your Mac's
>
>>> MySQLServer
>
>>>
>
>>
>
>> I do have that. a cloud mysql user with cloud as password.
>
>> cloud, cloud_usage, cloudbridge databases have been created.
>
>>
>
>>
>
>>> Regards,
>
>>>
>
>>> Charles
>
>>>
>
>>>
>
>>> On Wed, Nov 14, 2012 at 4:04 PM, Sebastien Goasguen
>>> <[email protected]<mailto:[email protected]<mailto:[email protected]%3cmailto:[email protected]>>>wrote:
>
>>>
>
>>>> Hi,
>
>>>>
>
>>>> I am testing the awsapi with the new maven build.
>
>>>> Following:
>
>>>> https://cwiki.apache.org/CLOUDSTACK/cloudstack-devcloud-environment-
>
>>>> setup.html
>
>>>>
>
>>>> I run:
>
>>>> mvn -pl :cloud-client-ui jetty:run
>
>>>> and
>
>>>> mvn -pl :cloud-awsapi jetty:run
>
>>>>
>
>>>> when I try to register a user it fails with a 401 error, and the
>
>>>> jetty logs show:
>
>>>>
>
>>>> Caused by:
>
>>>> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
>
>>>> : Could not create connection to database server. Attempted reconnect 3
>>>> times.
>
>>>> Giving up.
>
>>>> at
>
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>
>>>> Method)
>
>>>> at
>
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>
>>>> at
>
>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>
>>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>
>>>> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>
>>>> at com.mysql.jdbc.Util.getInstance(Util.java:386)
>
>>>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014)
>
>>>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
>
>>>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
>
>>>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
>
>>>> at
>
>>>> com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2299)
>
>>>> at
>
>>>> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2220)
>
>>>> at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
>
>>>> at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
>
>>>> at
>
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>
>>>> Method)
>
>>>> at
>
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>
>>>> at
>
>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>
>>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>
>>>> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>
>>>> at
>
>>>> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
>
>>>> at
>
>>>> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
>
>>>> at java.sql.DriverManager.getConnection(DriverManager.java:582)
>
>>>> at java.sql.DriverManager.getConnection(DriverManager.java:185)
>
>>>> at
>
>>>> org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
>
>>>> at
>
>>>> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
>
>>>> at
>
>>>> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
>
>>>> at
>
>>>> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
>
>>>> at
>
>>>> com.cloud.utils.db.Transaction.getConnection(Transaction.java:558)
>
>>>> at
>
>>>> com.cloud.utils.db.Transaction.prepareStatement(Transaction.java:453)
>
>>>> at
>
>>>> com.cloud.utils.db.Transaction.prepareAutoCloseStatement(Transaction.java:446)
>
>>>> at
>
>>>> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:382)
>
>>>> ... 56 more
>
>>>> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
>
>>>> Access denied for user 'cloud'@'localhost' to database 'null'
>
>>>> at
>
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>
>>>> Method)
>
>>>> at
>
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>
>>>> at
>
>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>
>>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>
>>>> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>
>>>> at com.mysql.jdbc.Util.getInstance(Util.java:386)
>
>>>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
>
>>>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
>
>>>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
>
>>>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
>
>>>> at
>
>>>> com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1694)
>
>>>> at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244)
>
>>>> at
>
>>>> com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397)
>
>>>> at
>
>>>> com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java
>
>>>> :2238)
>
>>>>
>
>>>>
>
>>>> Database was setup with:
>
>>>> mvn -P developer -pl developer,tools/devcloud -Ddeploydb
>
>>>>
>
>>>> Don't know if it's a bug or I am doing it wrong. Thoughts ?
>
>>>>
>
>>>> -Sebastien
>
>>>>
>
>>>>
>
>>>
>
>>>
>
>>> --
>
>>> Charles Moulliard
>
>>> Apache Committer / Sr. Enterprise Architect (RedHat) Twitter :
>
>>> @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>>
>
>