Hi Vidya, With regards to #2, 3 ways:
1. go to the $POLICY_HOME/config/logback.xml and change the log levels there (no restart necessary) 2. with telemetry shell: policy@dev-policy-drools-0:/tmp/policy-install$ telemetry Version: 0.11.2 https://localhost:9696/policy/pdp/engine> ls controllers environment features inputs properties switches tools topics https://localhost:9696/policy/pdp/engine> cd tools https://localhost:9696/policy/pdp/engine/tools> ls loggers uuid https://localhost:9696/policy/pdp/engine/tools> cd loggers https://localhost:9696/policy/pdp/engine/tools/loggers> ls {logger} https://localhost:9696/policy/pdp/engine/tools/loggers> get HTTP/1.1 200 OK Content-Type: application/json Date: Tue, 30 Oct 2018 18:03:35 GMT Server: Jetty(9.4.12.v20180830) Transfer-Encoding: chunked [ "ROOT", "Sisu", "com", "com.att", "com.att.nsa", "com.att.nsa.apiClient", "com.att.nsa.apiClient.http", "com.att.nsa.apiClient.http.HostSelector", "com.att.nsa.apiClient.http.HttpClient", "com.att.nsa.cambria", "com.att.nsa.cambria.client", "com.att.nsa.cambria.client.CambriaClientBuilders", "com.att.nsa.cambria.client.impl", "com.att.nsa.cambria.client.impl.CambriaConsumerImpl", "com.att.nsa.cambria.client.impl.CambriaSimplerBatchPublisher", "io", "io.swagger", "io.swagger.jaxrs", "io.swagger.jaxrs.config", "io.swagger.jaxrs.config.SwaggerContextService", "io.swagger.jaxrs.config.WebXMLReader", "io.swagger.jaxrs.listing", "io.swagger.jaxrs.listing.SwaggerSerializers", "network", "org", "org.apache", "org.apache.commons", "org.apache.commons.dbcp2", "org.apache.commons.dbcp2.BasicDataSource", "org.apache.commons.dbcp2.BasicDataSourceFactory", "org.apache.commons.dbcp2.PoolableConnectionFactory", "org.apache.commons.dbcp2.PoolingDataSource", "org.apache.http", "org.apache.http.client", "org.apache.http.client.protocol", "org.apache.http.client.protocol.RequestAddCookies", "org.apache.http.client.protocol.RequestAuthCache", "org.apache.http.client.protocol.RequestClientConnControl", https://localhost:9696/policy/pdp/engine/tools/loggers> cd ROOT https://localhost:9696/policy/pdp/engine/tools/loggers/ROOT> get HTTP/1.1 200 OK Content-Length: 4 Content-Type: text/plain Date: Tue, 30 Oct 2018 18:03:47 GMT Server: Jetty(9.4.12.v20180830) INFO https://localhost:9696/policy/pdp/engine/tools/loggers/ROOT> put DEBUG HTTP/1.1 200 OK Content-Length: 5 Content-Type: text/plain Date: Tue, 30 Oct 2018 18:03:59 GMT Server: Jetty(9.4.12.v20180830) DEBUG https://localhost:9696/policy/pdp/engine/tools/loggers/ROOT> 3. Directly with curl: curl –k -u "${ENGINE_MANAGEMENT_USER}:${ENGINE_MANAGEMENT_PASSWORD}" https://localhost:9696/policy/pdp/engine/tools/loggers/network curl –k -u "${ENGINE_MANAGEMENT_USER}:${ENGINE_MANAGEMENT_PASSWORD}" -X PUT https://localhost:9696/policy/pdp/engine/tools/loggers/network/WARN -Jorge From: [email protected] [mailto:[email protected]] On Behalf Of Vidyashree Rama Sent: Tuesday, October 30, 2018 4:29 AM To: HERNANDEZ-HERRERO, JORGE <[email protected]> Cc: [email protected]; [email protected]; Gaurav agrawal <[email protected]>; Rama SubbaReddy <[email protected]> Subject: Re: [onap-discuss][policy] please help to resolve this issue - No JSON object could be decoded Hi Jorge, Thanks for the response. it worked. I am facing another issue. Kindly help to proceed. When I post dmaap events, EVENT.CLEANUP is executed which means policy is not avaliable. 1. How to check whether policy is loaded in casablanca? 2. How to set the log level to debug? I am sending following request to push policy policy@drools:/tmp/basex-controlloop$ policy@drools:/tmp/basex-controlloop$ curl -k --silent --user [email protected]:demo123456<mailto:[email protected]:demo123456>! -X PUT --header 'Content-Type: text/plain' -d '{"closedLoopControlName": "ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b","controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b%0D%0A++trigger_policy%3A+unique-policy-id-16-Reroute%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-Reroute%0D%0A++++name%3A+Connectivity Reroute%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+Reroute%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard","policyName": "ccvpn","policyScope":"DCAE","policyVersion": "1.2.0"}' "https://localhost:9696/policy/pdp/engine/topics/sources/dmaap/unauthenticated.DCAE_CL_OUTPUT/events" ["{\"closedLoopControlName\": \"ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b\",\"controlLoopYaml\": \"controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b%0D%0A++trigger_policy%3A+unique-policy-id-16-Reroute%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-Reroute%0D%0A++++name%3A+Connectivity Reroute%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+Reroute%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard\",\"policyName\": \"ccvpn\",\"policyScope\":\"DCAE\",\"policyVersion\": \"1.2.0\"}"]policy@drools:/tmp/basex-controlloop$ policy@drools:/tmp/basex-controlloop$ Response for http://localhost:9696/policy/pdp/engine/controllers/casablanca/drools/facts/casablanca https://localhost:9696/policy/pdp/engine> get --auth [email protected]:demo1<mailto:[email protected]:demo1> 23456! http://localhost:9696/policy/pdp/engine/controllers/casablanca/drools/fac ts/casablanca HTTP/1.1 200 OK Content-Length: 967 Content-Type: application/json Date: Tue, 30 Oct 2018 08:54:15 GMT Server: Jetty(9.4.12.v20180830) { "alive": true, "controllers": [ "casablanca" ], "features": [ "org.onap.policy.drools.healthcheck.HealthCheckFeature", "org.onap.policy.drools.apps.controlloop.feature.utils.ControlLoopUtilsFeature" ], "httpServers": [ { "alive": true, "host": "0.0.0.0", "name": "SECURED-CONFIG", "port": 9696, "user": "[email protected]<mailto:[email protected]>" } ], "locked": false, "sinks": [ { "alive": true, "allowSelfSignedCerts": false, "apiKey": "", "apiSecret": "", "locked": false, "partitionKey": "96c420a9-265a-4a3f-8a1f-a12933e31c3d", "recentEvents": [], "servers": [ "mr.api.simpledemo.onap.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__mr.api.simpledemo.onap.org&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=KBxNCnvBiULMFrLf7-mWDLRIqfGifj9OdPuEw3oydrY&m=OXXxDwPi2syj5IZV6aj8ADJkIqYVvKa5Y88txSeRfMg&s=_C12CbAqkL8X0aitqFiuShPCUm0VSVH9GBuY7aAREoE&e=>" ], "topic": "PDPD-CONFIGURATION", "topicCommInfrastructure": "DMAAP", "useHttps": true } ], "sources": [ { "alive": true, "allowSelfSignedCerts": false, "apiKey": "", "apiSecret": "", "consumerGroup": "92362421-1b86-4418-b1fe-c08bb2ac5ab4", "consumerInstance": "drools", "fetchLimit": 100, "fetchTimeout": 15000, "locked": false, "recentEvents": [], "servers": [ "mr.api.simpledemo.onap.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__mr.api.simpledemo.onap.org&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=KBxNCnvBiULMFrLf7-mWDLRIqfGifj9OdPuEw3oydrY&m=OXXxDwPi2syj5IZV6aj8ADJkIqYVvKa5Y88txSeRfMg&s=_C12CbAqkL8X0aitqFiuShPCUm0VSVH9GBuY7aAREoE&e=>" ], "topic": "PDPD-CONFIGURATION", "topicCommInfrastructure": "DMAAP", "useHttps": true } ] } Beijing verison logs: policy@drools:/tmp/basex-controlloop/bin$ policy@drools:/tmp/basex-controlloop/bin$ curl --silent --user @1b3rt:31nst31n -X GET http://localhost:9696/policy/pdp/engine/controllers/beijing/drools/facts/beijing | python -m json.tool { "org.onap.policy.controlloop.params.ControlLoopParams": 2 } policy@drools:/tmp/basex-controlloop/bin$ Thanks, Vidya On Sun, Oct 28, 2018 at 8:28 AM HERNANDEZ-HERRERO, JORGE <[email protected]<mailto:[email protected]>> wrote: Hello Vidya, Switch the url to https, and correct the credentials. Check the credentials within the drools container by “echo $ENGINE_MANAGEMENT_USER” and $ENGINE_MANAGEMENT_PASSWORD” in a bash shell. Remove the last piped command (python) to see curl’s output. I also encourage you to use the telemetry shell within the drools container to get this info easier. Type “telemetry” in the drools container, “cd controllers/casablanca” and then “get”. Best regards, Jorge From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Vidyashree Rama Sent: Saturday, October 27, 2018 1:22 AM To: [email protected]<mailto:[email protected]> Cc: [email protected]<mailto:[email protected]>; Gaurav agrawal <[email protected]<mailto:[email protected]>>; Rama SubbaReddy <[email protected]<mailto:[email protected]>> Subject: [onap-discuss][policy] please help to resolve this issue - No JSON object could be decoded Hi All, Please help to resolve this issue "No JSON object could be decoded". I am getting "No JSON object could be decoded" for "http://localhost:9696/policy/pdp/engine/controllers/casablanca" request root@onap-policy:~# root@onap-policy:~# root@onap-policy:~# curl --silent --user @1b3rt:31nst31n -X GET http://localhost:9696/policy/pdp/engine/controllers/amsterdam | python -m json.tool No JSON object could be decoded root@onap-policy:~# root@onap-policy:~# root@onap-policy:~# curl --silent --user @1b3rt:31nst31n -X GET http://localhost:9696/policy/pdp/engine/controllers/casablanca | python -m json.tool No JSON object could be decoded root@onap-policy:~# root@onap-policy:~# root@onap-policy:~# root@onap-policy:~# python --version Python 2.7.6 root@onap-policy:~# root@onap-policy:~# root@onap-policy:~# docker exec -it drools bash policy@drools:/tmp/policy-install$ features status name version status ---- ------- ------ state-management 1.3.0-SNAPSHOT disabled controlloop-amsterdam 1.3.1 disabled session-persistence 1.3.0-SNAPSHOT disabled distributed-locking 1.3.0-SNAPSHOT disabled controlloop-utils 1.3.1 enabled eelf 1.3.0-SNAPSHOT disabled controlloop-casablanca 1.3.1 enabled active-standby-management 1.3.0-SNAPSHOT disabled test-transaction 1.3.0-SNAPSHOT disabled controlloop-trans 1.3.1 enabled pooling-dmaap 1.3.0-SNAPSHOT disabled healthcheck 1.3.0-SNAPSHOT enabled policy@drools:/tmp/policy-install$ Thanks, Vidya -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13414): https://lists.onap.org/g/onap-discuss/message/13414 Mute This Topic: https://lists.onap.org/mt/27747206/21656 Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
