How to Enable debug logs on management server?

Not applicable

This article provides instructions on turning on debug logs for message processor and router servers but when I try the same thing for the management server, I receive an "403 Forbidden" and this in the logs:

 2015-11-16 15:34:34,313 org: env: qtp1328246543-11784 ERROR REST - ExceptionMapper.toResponse() : Error occurred : User edahl@example.com does not have required permissions for /v1/logsessions

    com.apigee.security.providers.UserAccessController.authorize(UserAccessController.java:196)
    com.apigee.rest.framework.security.Authorizer.beforeInvocation(Authorizer.java:256)
    com.apigee.rest.framework.CustomJAXRSInvoker.beforeInvocation(CustomJAXRSInvoker.java:163)
    com.apigee.rest.framework.CustomJAXRSInvoker.performInvocation(CustomJAXRSInvoker.java:118)

My user has both the Operations Administrator and Organization Administrator roles.

I'm guessing that I need to update the logback.xml and restart. Is this a bug?

(Using OPDK 4.15.07.00)

0 4 854
4 REPLIES 4

Not applicable

See examples here: https://community.apigee.com/articles/1533/how-to-enable-debug-in-the-apigee-edge-router-and.html

You can execute similar API calls to the Management Server using port 8080

yes.. that is the same link I posted in my question. It didn't work for me but according to @Remeesh the problem is that I need to be the global admin

I have tried the same with 8080 on OPDK 4.15.04.04 and it works perfectly fine with global admin(system admin) users id, however with orgadmin it didnt work, got the exact error HTTP/1.1 403 Forbidden !!

Not applicable

I am pretty sure that you need to modify the logback xml file to get debug logs on the management service.

I havnt done this since 1407 - but at the time there were only rest calls to enable debug sessions on the router and mp, and not the management service.

You are going to have to change this:

    <root level="${log.level:-INFO}">
        <appender-ref ref="LOGFILE"/>
        <!--appender-ref ref="STDOUT"/-->
        <!--appender-ref ref="SYSLOG"/-->
    </root>

To

    <root level="${log.level:-DEBUG}">
        <appender-ref ref="LOGFILE"/>
        <!--appender-ref ref="STDOUT"/-->
        <!--appender-ref ref="SYSLOG"/-->
    </root>

**** IF IM REMEMBERING CORRECTLY