rajendrajaiswal | fdd14ec | 2019-02-18 17:20:26 +0000 | [diff] [blame^] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. http://creativecommons.org/licenses/by/4.0 |
| 3 | |
| 4 | .. _troubleshooting: |
| 5 | |
| 6 | Troubleshooting |
| 7 | =============== |
| 8 | |
| 9 | **NOTE** |
| 10 | |
| 11 | According to **ONAP** logging policy, **PM Mapper** logs contain all required markers as well as service and client specific Mapped Diagnostic Context (later referred as MDC) |
| 12 | |
| 13 | Default console log pattern: |
| 14 | |
| 15 | :: |
| 16 | |
| 17 | | %date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}\t| %thread\t| %highlight(%-5level)\t| %msg\t| %marker\t| %rootException\t| %mdc\t| %thread |
| 18 | |
| 19 | A sample, fully qualified message implementing this pattern: |
| 20 | |
| 21 | :: |
| 22 | |
| 23 | | 2018-12-18T13:12:44.369Z | p.dcae | DEBUG | Client connection request received | ENTRY | | RequestID=d7762b18-854c-4b8c-84aa-95762c6f8e62, InstanceID=9b9799ca-33a5-4f61-ba33-5c7bf7e72d07, InvocationID=b13d34ba-e1cd-4816-acda-706415308107, PartnerName=C=PL, ST=DL, L=Wroclaw, O=Nokia, OU=MANO, CN=dcaegen2-hvves-client, StatusCode=INPROGRESS, ClientIPAddress=192.168.0.9, ServerFQDN=a4ca8f96c7e5 | reactor-tcp-nio-2 |
| 24 | |
| 25 | |
| 26 | For simplicity, all log messages in this section are shortened to contain only: |
| 27 | * logger name |
| 28 | * log level |
| 29 | * message |
| 30 | |
| 31 | Error and warning logs contain also: |
| 32 | * exception message |
| 33 | * stack trace |
| 34 | |
| 35 | **Do not rely on exact log messages or their presence, as they are often subject to change.** |
| 36 | |
| 37 | Configuration errors |
| 38 | -------------------- |
| 39 | |
| 40 | **Config binding service not responding** |
| 41 | |
| 42 | :: |
| 43 | |
| 44 | |
| 45 | 2019-02-19T17:25:17.499Z main INFO org.onap.dcaegen2.services.pmmapper.config.ConfigHandler Fetching pm-mapper configuration from Configbinding Service ENTRY |
| 46 | 2019-02-19T17:25:17.502Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender ee5ff670-accd-4c30-8689-0a1d12491b51 INVOKE [ SYNCHRONOUS ] |
| 47 | 2019-02-19T17:25:17.509Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender Sending:\n{X-ONAP-PartnerName=[pm-mapper], X-ONAP-InvocationID=[ee5ff670-accd-4c30-8689-0a1d12491b51], X-ONAP-RequestID=[2778e346-590a-4ade-8f45-358d1adf048b]} |
| 48 | 2019-02-19T17:25:18.515Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender Sending:\n{X-ONAP-PartnerName=[pm-mapper], X-ONAP-InvocationID=[ee5ff670-accd-4c30-8689-0a1d12491b51], X-ONAP-RequestID=[2778e346-590a-4ade-8f45-358d1adf048b]} |
| 49 | 2019-02-19T17:25:19.516Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender Sending:\n{X-ONAP-PartnerName=[pm-mapper], X-ONAP-InvocationID=[ee5ff670-accd-4c30-8689-0a1d12491b51], X-ONAP-RequestID=[2778e346-590a-4ade-8f45-358d1adf048b]} |
| 50 | 2019-02-19T17:25:20.518Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender Sending:\n{X-ONAP-PartnerName=[pm-mapper], X-ONAP-InvocationID=[ee5ff670-accd-4c30-8689-0a1d12491b51], X-ONAP-RequestID=[2778e346-590a-4ade-8f45-358d1adf048b]} |
| 51 | 2019-02-19T17:25:21.519Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender Sending:\n{X-ONAP-PartnerName=[pm-mapper], X-ONAP-InvocationID=[ee5ff670-accd-4c30-8689-0a1d12491b51], X-ONAP-RequestID=[2778e346-590a-4ade-8f45-358d1adf048b]} |
| 52 | 2019-02-19T17:25:21.520Z main INFO org.onap.dcaegen2.services.pmmapper.config.ConfigHandler Received pm-mapper configuration from ConfigBinding Service:\n EXIT |
| 53 | Exception in thread "main" org.onap.dcaegen2.services.pmmapper.exceptions.CBSServerError: Error connecting to Configbinding Service: |
| 54 | at org.onap.dcaegen2.services.pmmapper.config.ConfigHandler.getMapperConfig(ConfigHandler.java:78) |
| 55 | at org.onap.dcaegen2.services.pmmapper.App.main(App.java:58) |
| 56 | caused by: java.net.ConnectException: Connection refused (Connection refused) |
| 57 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) |
| 58 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) |
| 59 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) |
| 60 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423) |
| 61 | at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1944) |
| 62 | at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939) |
| 63 | at java.security.AccessController.doPrivileged(Native Method) |
| 64 | at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938) |
| 65 | at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508) |
| 66 | at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) |
| 67 | at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) |
| 68 | at java.net.HttpURLConnection.getResponseMessage(HttpURLConnection.java:546) |
| 69 | at org.onap.dcaegen2.services.pmmapper.utils.RequestSender.send(RequestSender.java:80) |
| 70 | at org.onap.dcaegen2.services.pmmapper.config.ConfigHandler.getMapperConfig(ConfigHandler.java:76) |
| 71 | ... 1 more |
| 72 | Caused by: java.net.ConnectException: Connection refused (Connection refused) |
| 73 | at java.net.PlainSocketImpl.socketConnect(Native Method) |
| 74 | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) |
| 75 | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) |
| 76 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) |
| 77 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) |
| 78 | at java.net.Socket.connect(Socket.java:589) |
| 79 | t java.net.Socket.connect(Socket.java:538) |
| 80 | at sun.net.NetworkClient.doConnect(NetworkClient.java:180) |
| 81 | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| 82 | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| 83 | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| 84 | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| 85 | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| 86 | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220) |
| 87 | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) |
| 88 | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) |
| 89 | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984) |
| 90 | at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564) |
| 91 | at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) |
| 92 | at org.onap.dcaegen2.services.pmmapper.utils.RequestSender.send(RequestSender.java:66) |
| 93 | |
| 94 | |
| 95 | Make sure Config Binding Service is up and running and the **ip + port** combination is correct. |
| 96 | |
| 97 | ==== |
| 98 | |
| 99 | **Missing configuration on Consul** |
| 100 | |
| 101 | :: |
| 102 | |
| 103 | |
| 104 | 2019-02-19T17:36:32.664Z main INFO org.onap.dcaegen2.services.pmmapper.config.ConfigHandler Fetching pm-mapper configuration from Configbinding Service ENTRY |
| 105 | 2019-02-19T17:36:32.666Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender 9fa1b84f-05ce-4e27-bba9-4ea477c1baa7 INVOKE [ SYNCHRONOUS ] |
| 106 | 2019-02-19T17:36:32.671Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender Sending:\n{X-ONAP-PartnerName=[pm-mapper], X-ONAP-InvocationID=[9fa1b84f-05ce-4e27-bba9-4ea477c1baa7], X-ONAP-RequestID=[6e861d17-3f4b-4a2e-9ea8-a31bb9dbb7e8]} |
| 107 | 2019-02-19T17:36:32.696Z main INFO org.onap.dcaegen2.services.pmmapper.utils.RequestSender Received:\n{"pm-mapper-filter": "{ \"filters\":[]}", "3GPP.schema.file": "{\"3GPP_Schema\":\"./etc/3GPP_relaxed_schema.xsd\"}", "streams_subscribes": {"dmaap_subscriber": {"type": "data_router", "aaf_username": null, "aaf_password": null, "dmaap_infooooo": {"location": "csit-pmmapper", "delivery_url": "3gpppmmapper", "username": "username", "password": "password", "subscriber_id": "subsriber_id"}}}, "streams_publishes": {"pm_mapper_handle_out": {"type": "message_router", "aaf_password": null, "dmaap_info": {"topic_url": "https://message-router:3904/events/org.onap.dmaap.onapCSIT.pm_mapper", "client_role": "org.onap.dmaap.client.pub", "location": "csit-pmmapper", "client_id": null}, "aaf_username": null}}, "buscontroller_feed_subscription_endpoint": "http://dmaap-bc:8080/webapi/dr_subs", "services_calls": {}} |
| 108 | 2019-02-19T17:36:32.696Z main INFO org.onap.dcaegen2.services.pmmapper.config.ConfigHandler Received pm-mapper configuration from ConfigBinding Service:\n{"pm-mapper-filter": "{ \"filters\":[]}", "3GPP.schema.file": "{\"3GPP_Schema\":\"./etc/3GPP_relaxed_schema.xsd\"}", "streams_subscribes": {"dmaap_subscriber": {"type": "data_router", "aaf_username": null, "aaf_password": null, "dmaap_infooooo": {"location": "csit-pmmapper", "delivery_url": "3gpppmmapper", "username": "username", "password": "password", "subscriber_id": "subsriber_id"}}}, "streams_publishes": {"pm_mapper_handle_out": {"type": "message_router", "aaf_password": null, "dmaap_info": {"topic_url": "https://message-router:3904/events/org.onap.dmaap.onapCSIT.pm_mapper", "client_role": "org.onap.dmaap.client.pub", "location": "csit-pmmapper", "client_id": null}, "aaf_username": null}}, "buscontroller_feed_subscription_endpoint": "http://dmaap-bc:8080/webapi/dr_subs", "services_calls": {}} EXIT |
| 109 | Exception in thread "main" org.onap.dcaegen2.services.pmmapper.exceptions.MapperConfigException: Error parsing mapper configuration: |
| 110 | {}{"pm-mapper-filter": "{ \"filters\":[]}", "3GPP.schema.file": "{\"3GPP_Schema\":\"./etc/3GPP_relaxed_schema.xsd\"}", "streams_subscribes": {"dmaap_subscriber": {"type": "data_router", "aaf_username": null, "aaf_password": null, "dmaap_infooooo": {"location": "csit-pmmapper", "delivery_url": "3gpppmmapper", "username": "username", "password": "password", "subscriber_id": "subsriber_id"}}}, "streams_publishes": {"pm_mapper_handle_out": {"type": "message_router", "aaf_password": null, "dmaap_info": {"topic_url": "https://message-router:3904/events/org.onap.dmaap.onapCSIT.pm_mapper", "client_role": "org.onap.dmaap.client.pub", "location": "csit-pmmapper", "client_id": null}, "aaf_username": null}}, "buscontroller_feed_subscription_endpoint": "http://dmaap-bc:8080/webapi/dr_subs", "services_calls": {}} |
| 111 | at org.onap.dcaegen2.services.pmmapper.config.ConfigHandler.convertMapperConfigToObject(ConfigHandler.java:94) |
| 112 | at org.onap.dcaegen2.services.pmmapper.config.ConfigHandler.getMapperConfig(ConfigHandler.java:83) |
| 113 | at org.onap.dcaegen2.services.pmmapper.App.main(App.java:58) |
| 114 | Caused by: com.google.gson.JsonParseException: Failed to check fields. |
| 115 | at org.onap.dcaegen2.services.pmmapper.utils.RequiredFieldDeserializer.deserialize(RequiredFieldDeserializer.java:49) |
| 116 | at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) |
| 117 | at com.google.gson.Gson.fromJson(Gson.java:927) |
| 118 | at com.google.gson.Gson.fromJson(Gson.java:892) |
| 119 | at com.google.gson.Gson.fromJson(Gson.java:841) |
| 120 | at com.google.gson.Gson.fromJson(Gson.java:813) |
| 121 | at org.onap.dcaegen2.services.pmmapper.config.ConfigHandler.convertMapperConfigToObject(ConfigHandler.java:92) |
| 122 | ... 2 more |
| 123 | Caused by: com.google.gson.JsonParseException: Field: 'busControllerFeedId', is required but not found. |
| 124 | at org.onap.dcaegen2.services.pmmapper.utils.RequiredFieldDeserializer.deserialize(RequiredFieldDeserializer.java:46) |
| 125 | |
| 126 | |
| 127 | |
| 128 | **PM Mapper** logs this information when connected to Consul, but cannot find a valid JSON configuration. |
| 129 | |
| 130 | ==== |
| 131 | |
| 132 | **Unable to Subscriber to Data Router Feed** |
| 133 | |
| 134 | :: |
| 135 | |
| 136 | 2019-02-11T16:44:37.012Z main DEBUG org.onap.dcaegen2.services.pmmapper.config.ConfigHandler Mapper configuration:\nMapperConfig(messageRouterTopicName=unauthenticated.PM_VES_OUTPUT, busControllerConfig=BusControllerConfig(dcaeLocation=dcaeLocation, deliveryURL=deliveryURL, feedId=2, lastMod=lastMod, username=username, password=password, dataRouterSubscribeEndpoint=null), streamsSubscribes=MapperConfig.StreamsSubscribes(dmaapSubscriber=MapperConfig.DmaapSubscriber(dmaapInfo=MapperConfig.DmaapInfo(location=location, username=username, password=password, deliveryUrl=delivery_url, subscriberId=subsriber_id)))) |
| 137 | 2019-02-11T16:44:37.013Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber Starting subscription to DataRouter ENTRY |
| 138 | 2019-02-11T16:44:37.013Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber e04d9fb4-5bc3-405b-89ea-6b824de8f137 INVOKE [ SYNCHRONOUS ] |
| 139 | 2019-02-11T16:44:37.061Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber Request to bus controller executed with Response Code: '404' and Response Event: 'Not Found'. |
| 140 | 2019-02-11T16:44:39.062Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber d4982d98-574d-42e4-9922-640610ffa34d INVOKE [ SYNCHRONOUS ] |
| 141 | 2019-02-11T16:44:39.071Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber Request to bus controller executed with Response Code: '404' and Response Event: 'Not Found'. |
| 142 | 2019-02-11T16:44:43.079Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber 05c73228-d04c-47c2-b897-8e936de5c8fd INVOKE [ SYNCHRONOUS ] |
| 143 | 2019-02-11T16:44:43.089Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber Request to bus controller executed with Response Code: '404' and Response Event: 'Not Found'. |
| 144 | 2019-02-11T16:44:51.129Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber c898b5c7-a347-496a-af3b-aeac661d4f1b INVOKE [ SYNCHRONOUS ] |
| 145 | 2019-02-11T16:44:51.138Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber Request to bus controller executed with Response Code: '404' and Response Event: 'Not Found'. |
| 146 | 2019-02-11T16:45:07.220Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber b190fbc1-ab91-44da-b393-727810925374 INVOKE [ SYNCHRONOUS ] |
| 147 | 2019-02-11T16:45:07.234Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber Request to bus controller executed with Response Code: '404' and Response Event: 'Not Found'. |
| 148 | 2019-02-11T16:45:07.235Z main INFO org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber EXIT |
| 149 | Exception in thread "main" org.onap.dcaegen2.services.pmmapper.exceptions.TooManyTriesException: Failed to subscribe within appropriate amount of attempts |
| 150 | at org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber.subscribe(DataRouterSubscriber.java:152) |
| 151 | at org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber.subscribe(DataRouterSubscriber.java:150) |
| 152 | at org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber.subscribe(DataRouterSubscriber.java:150) |
| 153 | at org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber.subscribe(DataRouterSubscriber.java:150) |
| 154 | at org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber.subscribe(DataRouterSubscriber.java:150) |
| 155 | at org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber.start(DataRouterSubscriber.java:97) |
| 156 | at org.onap.dcaegen2.services.pmmapper.App.main(App.java:53) |
| 157 | |
| 158 | This log is printed when pm mapper couldn't subscribe to the data router. |
| 159 | |