"Grid \"null\" does not exist." error when executing request in Atrium Orchestrator REST API

Version 1
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Atrium Orchestrator Platform


    COMPONENT:

    BMC Atrium Orchestrator Platform


    APPLIES TO:

    BMC Atrium Orchestrator Platform 7.8.00 BMC Atrium Orchestrator Platform 7.8.01 BMC Atrium Orchestrator Platform 7.9.01



    PROBLEM:

    When I send a request to the BMC Atrium Orchestrator REST API, it responds with one of the following errors:
    [{
    "name": "java.lang.IllegalArgumentException",
    "errorMessage": "Grid \"null\" does not exist.",
    "stackTrace": "java.lang.IllegalArgumentException: Grid \"null\" does not exist.\r\n\tat com.bmc.rba.common.util.Verify.notNull(Verify.java:114)\r\n\tat com.bmc.ao.common.service.CommonServiceUtility.executeProcess(CommonServiceUtility.java:513)\r\n\tat com.bmc.ao.rest.components.ProcessComponent.executeProcess(ProcessComponent.java:188)\r\n\tat com.bmc.ao.rest.controller.RestServiceImpl.executeProcess(RestServiceImpl.java:355)\r\n\tat sun.reflect.GeneratedMethodAccessor424.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\r\n\tat java.lang.reflect.Method.invoke(Unknown Source)\r\n\tat org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)\r\n\tat org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)\r\n\tat com.bmc.ao.rest.util.CustomAnnotationMethodHandlerAdapter.invokeHandlerMethod(CustomAnnotationMethodHandlerAdapter.java:38)\r\n\tat org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)\r\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)\r\n\tat org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:646)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:727)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\r\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\r\n\tat com.bmc.atrium.sso.agents.web.jee.JEEFilter.doFilter(Unknown Source)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\r\n\tat org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)\r\n\tat org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)\r\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\r\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\r\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)\r\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)\r\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)\r\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)\r\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)\r\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)\r\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)\r\n\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)\r\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)\r\n\tat org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n\tat java.lang.Thread.run(Unknown Source)\r\n"
    }]


    [{
    "name": "com.realops.api.IllegalOperationException",
    "errorMessage": "Message[summary=Not authorized. As a result of the authorization policy in effect, an authenticated principal is not authorized to perform the action \"access-environment\" on the resource identified by \"[Path relativeScope=null, scope=ENVIRONMENT, elements=[BAO Environment-2015-09-21T113830Z]]\"., detail=]"
    }]


    The later error includes HTTP code 420. I can log in and get an authentication token, but no subsequent request works.


    CAUSE:

    The peer can fail to find its grid name if it searches for it while performing another action, like starting up. It then caches this "null" result, but fails to find a "null" grid and rejects operations that invoke the grid name.


    SOLUTION:

     

       
    1. Contact BMC Customer Support for a hotfix file.
    2.  
    3. Stop the BMC Atrium Orchestrator Configuration Distribution Peer service
    4.  
    5. Go to the following folder, take a backup of RestServiceImpl.class, and replace it with the hotfix class file    
           
      • $AO_HOME\tomcat\webapps\baocdp\WEB-INF\classes\com\bmc\ao\rest\controller\
      •   
    6.  
    7. Go to the following folder, take a backup of APIManager.class, and replace it with the hotfix class file    
           
      • $AO_HOME\tomcat\webapps\baocdp\WEB-INF\classes\com\bmc\ao\common\service
      •   
    8.  
    9. Start the Configuration Distribution Peer service.
    10.  
    11. Test your REST request. If it fails, add the header GRID_NAME to your request, this your grid name as the header's value and run the request again.
    Note: If you faced this issue only on BAO 7.9.01, you only need to follow step 4 to implement the fix. 

    This patch does three things:  
       
    1. If the peer receives a REST request during startup, it will respond with a relevant warning instead of the "Grid null does not exist" error.
    2.  
    3. The peer accepts a "GRID_NAME" header. You can pass this header to tell the peer what grid to use. The peer will only fetch the grid name if you provide no parameter.
    4.  
    5. The peer has additional debug-level logging statements to capture the grid name.

     


    Article Number:

    000101616


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles