incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sumit Mohanty (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-1780) POSTing new cluster returns 500 exception
Date Wed, 03 Apr 2013 21:45:15 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sumit Mohanty updated AMBARI-1780:
----------------------------------

    Attachment: AMBARI-1780.patch
    
> POSTing new cluster returns 500 exception
> -----------------------------------------
>
>                 Key: AMBARI-1780
>                 URL: https://issues.apache.org/jira/browse/AMBARI-1780
>             Project: Ambari
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Sumit Mohanty
>            Assignee: Sumit Mohanty
>             Fix For: 1.3.0
>
>         Attachments: AMBARI-1780.patch
>
>
> Just pulled new source and when trying to install new cluster via web-installer, hit
the following dialog: 'An internal system exception occurred: Unable to set version=HDP-1.2.1
for cluster vmc'.
> Turns out the POST call for the new cluster returns a 500 exception with the message:
{noformat}{  "status" : 500,  "message" : "An internal system exception occurred: Unable to
set version=HDP-1.2.1 for cluster vmc"}{noformat}
> Exception in server log:
> {noformat}
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.http.HttpParser: filled 615/615
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.server.Server: REQUEST /api/v1/clusters/vmc
on AsyncHttpConnection@1dd1702e,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=2,l=30,c=36},r=4
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.server.handler.ContextHandler: scope
null||/api/v1/clusters/vmc @ o.e.j.s.ServletContextHandler{/,file:/media/sf_git/ambari/ambari-web/public/}
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.server.handler.ContextHandler: context=||/api/v1/clusters/vmc
@ o.e.j.s.ServletContextHandler{/,file:/media/sf_git/ambari/ambari-web/public/}
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.server.session: sessionManager=org.eclipse.jetty.server.session.HashSessionManager@5fc8ad52
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.server.session: session=null
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.servlet.ServletHandler: servlet |/api/v1|/clusters/vmc
-> com.sun.jersey.spi.container.servlet.ServletContainer-1300800391
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.servlet.ServletHandler: chain=org.apache.ambari.server.api.AmbariPersistFilter-1657158094->com.sun.jersey.spi.container.servlet.ServletContainer-1300800391
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.servlet.ServletHandler: call filter org.apache.ambari.server.api.AmbariPersistFilter-1657158094
> 2013-04-03 12:34:20,626 DEBUG org.eclipse.jetty.servlet.ServletHandler: call servlet
com.sun.jersey.spi.container.servlet.ServletContainer-1300800391
> 2013-04-03 12:34:20,627 INFO org.apache.ambari.server.api.services.Request: Handling
API Request: 'http://dev.hortonworks.com:8080/api/v1/clusters/vmc'
> 2013-04-03 12:34:20,627 DEBUG org.apache.ambari.server.controller.AmbariManagementControllerImpl:
Received a createCluster request, clusterName=vmc, request={ clusterName=vmc, clusterId=null,
hosts=[] }
> 2013-04-03 12:34:20,650 DEBUG org.apache.ambari.server.state.cluster.ClusterImpl: Changing
DesiredStackVersion of Cluster, clusterName=vmc, clusterId=6, currentDesiredStackVersion=,
newDesiredStackVersion=HDP-1.2.1
> 2013-04-03 12:34:20,667 WARN org.apache.ambari.server.state.cluster.ClusterImpl: Unable
to set version HDP-1.2.1 for cluster vmc
> 2013-04-03 12:34:20,667 ERROR org.apache.ambari.server.controller.internal.AbstractResourceProvider:
Caught AmbariException when creating a resource
> org.apache.ambari.server.AmbariException: Unable to set version=HDP-1.2.1 for cluster
vmc
> 	at org.apache.ambari.server.state.cluster.ClusterImpl.setCurrentStackVersion(ClusterImpl.java:591)
> 	at org.apache.ambari.server.state.cluster.ClustersImpl.setCurrentStackVersion(ClustersImpl.java:208)
> 	at org.apache.ambari.server.controller.AmbariManagementControllerImpl.createCluster(AmbariManagementControllerImpl.java:231)
> 	at org.apache.ambari.server.controller.internal.ClusterResourceProvider$1.invoke(ClusterResourceProvider.java:91)
> 	at org.apache.ambari.server.controller.internal.ClusterResourceProvider$1.invoke(ClusterResourceProvider.java:88)
> 	at org.apache.ambari.server.controller.internal.AbstractResourceProvider.createResources(AbstractResourceProvider.java:229)
> 	at org.apache.ambari.server.controller.internal.ClusterResourceProvider.createResources(ClusterResourceProvider.java:88)
> 	at org.apache.ambari.server.controller.internal.ClusterControllerImpl.createResources(ClusterControllerImpl.java:131)
> 	at org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl.create(PersistenceManagerImpl.java:75)
> 	at org.apache.ambari.server.api.handlers.CreateHandler.persist(CreateHandler.java:36)
> 	at org.apache.ambari.server.api.handlers.BaseManagementHandler.handleRequest(BaseManagementHandler.java:67)
> 	at org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:98)
> 	at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:73)
> 	at org.apache.ambari.server.api.services.ClusterService.createCluster(ClusterService.java:82)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
> 	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
> 	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
> 	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
> 	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
> 	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
> 	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
> 	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
> 	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
> 	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
> 	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
> 	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
> 	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
> 	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
> 	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1329)
> 	at org.apache.ambari.server.api.AmbariPersistFilter.doFilter(AmbariPersistFilter.java:48)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:359)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931)
> 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
> 	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> 	at java.lang.Thread.run(Thread.java:662)
> Caused by: javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse
Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: null value in column "current_cluster_state"
violates not-null constraint
> Error Code: 0
> Call: INSERT INTO clusterstate (current_cluster_state, current_stack_version, cluster_id)
VALUES (?, ?, ?)
> 	bind => [3 parameters bound]
> Query: InsertObjectQuery(org.apache.ambari.server.orm.entities.ClusterStateEntity@ba)
> 	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
> 	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
> 	at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:87)
> 	at org.apache.ambari.server.state.cluster.ClusterImpl.setCurrentStackVersion(ClusterImpl.java:580)
> 	... 59 more
> Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652):
org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: null value in column "current_cluster_state"
violates not-null constraint
> Error Code: 0
> Call: INSERT INTO clusterstate (current_cluster_state, current_stack_version, cluster_id)
VALUES (?, ?, ?)
> 	bind => [3 parameters bound]
> Query: InsertObjectQuery(org.apache.ambari.server.orm.entities.ClusterStateEntity@ba)
> 	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1501)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:849)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:913)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:594)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:537)
> 	at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1800)
> 	at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:286)
> 	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
> 	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
> 	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:342)
> 	at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:162)
> 	at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:177)
> 	at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:471)
> 	at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
> 	at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
> 	at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:286)
> 	at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
> 	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:852)
> 	at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:751)
> 	at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
> 	at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2875)
> 	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1602)
> 	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1584)
> 	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1535)
> 	at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:224)
> 	at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:123)
> 	at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3914)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1419)
> 	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:634)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1509)
> 	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:266)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1147)
> 	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84)
> 	... 62 more
> Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "current_cluster_state"
violates not-null constraint
> 	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
> 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
> 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
> 	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
> 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
> 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:842)
> 	... 94 more
> 2013-04-03 12:34:20,672 ERROR org.apache.ambari.server.api.handlers.BaseManagementHandler:
Caught a system exception while attempting to create a resource
> 2013-04-03 12:34:20,678 DEBUG org.eclipse.jetty.server.Server: RESPONSE /api/v1/clusters/vmc
 500 handled=true
> 2013-04-03 12:34:20,679 DEBUG org.eclipse.jetty.server.AsyncHttpConnection: Enabled read
interest SCEP@5de9c245{l(/192.168.56.1:53801)<->r(/192.168.56.101:8080),d=true,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=1r}-{AsyncHttpConnection@1dd1702e,g=HttpGenerator{s=4,h=0,b=0,c=-1},p=HttpParser{s=0,l=30,c=36},r=4}
> 2013-04-03 12:34:20,679 DEBUG org.eclipse.jetty.http.HttpParser: filled 0/0
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message