blob: 96816228a05c6de272ac1fe1108ea5d1ad749949 [file] [log] [blame]
maximesson4ad68382019-06-05 17:51:29 +02001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3
4Troubleshooting
5===============
Vijay VKf9e43442019-05-22 22:10:29 +01006
maximessone707b222019-05-09 14:27:34 +00007In order to find the origin of an error, we suggest to use the logs resulting from tracing, which needs to be activated.
8
maximessone0a42852019-08-16 08:43:37 +00009Using the DFC REST API
10""""""""""""""""""""""
11The DFC supports a REST API which includes features to facilitate troubleshooting.
maximessone707b222019-05-09 14:27:34 +000012
maximessone0a42852019-08-16 08:43:37 +000013One REST primitive, **status**, returns statistics and status information for the DFC processing.
14Here follows an example on how to use (here curl is used, but a web-browser can also be used. If you are
15logged in to a container, wget can probably be used):
maximessone707b222019-05-09 14:27:34 +000016
maximessone0a42852019-08-16 08:43:37 +000017``curl http://127.0.0.1:8100/status -i -X GET``
18
19The following features are implemented by enabling so called 'actuators' in the Springboot framework used:
20
21**loggers** - is used to control the logging level on different loggers (so you can enabled debug tracing on a certain
maximessone707b222019-05-09 14:27:34 +000022logger.
23
maximessone0a42852019-08-16 08:43:37 +000024**logfile** - get logged information.
maximessone707b222019-05-09 14:27:34 +000025
maximessone0a42852019-08-16 08:43:37 +000026**health** - get health check info, there is currently no info here. But the endpoint is enabled.
maximessone707b222019-05-09 14:27:34 +000027
maximessone0a42852019-08-16 08:43:37 +000028**metrics** - read metrics from the Java execution environment; such as memory consumption, number of threads, open file
maximessone707b222019-05-09 14:27:34 +000029descriptors etc.
30
maximessone0a42852019-08-16 08:43:37 +000031Here follow some examples:
maximessone707b222019-05-09 14:27:34 +000032Activate debug tracing on all classes in the DFC:
maximesson4ad68382019-06-05 17:51:29 +020033
maximessone0a42852019-08-16 08:43:37 +000034 ``curl http://127.0.0.1:8100/actuator/loggers/org.onap.dcaegen2.collectors.datafile -i -X POST -H 'Content-Type:
maximesson4ad68382019-06-05 17:51:29 +020035 application/json' -d '{"configuredLevel":"debug"}'``
maximessone707b222019-05-09 14:27:34 +000036
37Read the log file:
maximesson4ad68382019-06-05 17:51:29 +020038
maximessone0a42852019-08-16 08:43:37 +000039 ``curl http://127.0.0.1:8100/actuator/logfile -i -X GET``
maximessone707b222019-05-09 14:27:34 +000040
41Get build information:
maximesson4ad68382019-06-05 17:51:29 +020042
43 ``curl http://127.0.0.1:8100/actuator/info``
maximessone707b222019-05-09 14:27:34 +000044
45Get metric from the JVM. This lists the metrics that are available:
46
maximessone0a42852019-08-16 08:43:37 +000047 ``curl http://127.0.0.1:8100/actuator/metrics -i -X GET``
maximessone707b222019-05-09 14:27:34 +000048
49To see the value of a particular metric, just add \/[nameOfTheMetric] in the end of address, for example:
50
maximessone0a42852019-08-16 08:43:37 +000051 ``curl http://127.0.0.1:8100/actuator/metrics/process.cpu.usage -i -X GET``
maximessone707b222019-05-09 14:27:34 +000052
53
54Certificate failure
55"""""""""""""""""""
56
57If there is an error linked to the certificate, it is possible to get information about it. A possible cause for the
58error can be that the expiry date of the certificate is past.
59
maximesson4ad68382019-06-05 17:51:29 +020060 ``keytool -list -v -keystore dfc.jks``
maximessone707b222019-05-09 14:27:34 +000061
62The command to encode the b64 jks file to local execution is (the \*.jks.b64 is in the repo and the Dockerfile is
63encoding it into .jks. So when you pull from nexus, this won't be needed, only when git-checkout and java/mvn run):
64
maximesson4ad68382019-06-05 17:51:29 +020065 ``base64 -d dfc.jks.b64 > dfc.jks``
maximessone707b222019-05-09 14:27:34 +000066
67
68Common logs due to configuration errors
69"""""""""""""""""""""""""""""""""""""""
70
71**Do not rely on exact log messages or their presence, as they are often subject to change.**
72
73
74
maximesson4ad68382019-06-05 17:51:29 +020075.. **Missing configuration on Consul**
maximessone707b222019-05-09 14:27:34 +000076
maximesson4ad68382019-06-05 17:51:29 +020077.. "Exception during getting configuration from CONSUL/CONFIG_BINDING_SERVICE"
maximessone707b222019-05-09 14:27:34 +000078
79
maximessone0a42852019-08-16 08:43:37 +000080DFC uses a number of configuration parameters. You can find below the kind of reply you get if any parameter is not valid:
maximessone707b222019-05-09 14:27:34 +000081
82
maximesson4ad68382019-06-05 17:51:29 +020083-Wrong trustedCaPassword:
84
85.. code-block:: json
86
87 org.onap.dcaegen2.collectors.datafile.tasks.FileCollector |2019-04-24T14:05:54.494Z |WARN |Failed to download file: PNF0 A20000626.2315+0200-2330+0200_PNF0-0-1MB.tar.gz, reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.IOException: Keystore was tampered with, or password was incorrect |RequestID=A20000626.2315+0200-2330+0200_PNF0-0-1MB.tar.gz | | |FileCollectorWorker-2 |
88 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.IOException: Keystore was tampered with, or password was incorrect ...
89 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.IOException: Keystore was tampered with, or password was incorrect ...
90 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.IOException: Keystore was tampered with, or password was incorrect ...
91 org.onap.dcaegen2.collectors.datafile.tasks.ScheduledTasks |2019-04-24T14:06:40.609Z |ERROR |File fetching failed, fileData
maximessone707b222019-05-09 14:27:34 +000092
93
maximesson4ad68382019-06-05 17:51:29 +020094-Wrong trustedCa:
maximessone707b222019-05-09 14:27:34 +000095
maximesson4ad68382019-06-05 17:51:29 +020096.. code-block:: json
maximessone707b222019-05-09 14:27:34 +000097
maximesson4ad68382019-06-05 17:51:29 +020098 org.onap.dcaegen2.collectors.datafile.tasks.FileCollector |2019-04-24T14:11:22.584Z |WARN |Failed to download file: PNF0 A20000626.2315+0200-2330+0200_PNF0-0-1MB.tar.gz, reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.FileNotFoundException: **WRONGconfig/ftp.jks** |RequestID=A20000626.2315+0200-2330+0200_PNF0-0-1MB.tar.gz | | |FileCollectorWorker-2 |
99 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.FileNotFoundException: WRONGconfig/ftp.jks ...
100 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.FileNotFoundException: WRONGconfig/ftp.jks ...
101 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.FileNotFoundException: WRONGconfig/ftp.jks ...
102 org.onap.dcaegen2.collectors.datafile.tasks.ScheduledTasks |2019-04-24T14:11:58.963Z |ERROR |File fetching failed, fileData
maximessone707b222019-05-09 14:27:34 +0000103
maximesson4ad68382019-06-05 17:51:29 +0200104-Wrong keyPassword:
maximessone707b222019-05-09 14:27:34 +0000105
maximesson4ad68382019-06-05 17:51:29 +0200106.. code-block:: json
maximessone707b222019-05-09 14:27:34 +0000107
maximesson4ad68382019-06-05 17:51:29 +0200108 org.onap.dcaegen2.collectors.datafile.tasks.FileCollector |2019-04-24T14:15:40.694Z |WARN |Failed to download file: PNF0 A20000626.2315+0200-2330+0200_PNF0-0-1MB.tar.gz, reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.IOException: Keystore was tampered with, or password was incorrect |RequestID=A20000626.2315+0200-2330+0200_PNF0-0-1MB.tar.gz | | |FileCollectorWorker-2 |
109 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.IOException: Keystore was tampered with, or password was incorrect ...
110 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.IOException: Keystore was tampered with, or password was incorrect ...
111 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.IOException: Keystore was tampered with, or password was incorrect ...
112 org.onap.dcaegen2.collectors.datafile.tasks.ScheduledTasks |2019-04-24T14:16:08.292Z |ERROR |File fetching failed, fileData
maximessone707b222019-05-09 14:27:34 +0000113
maximesson4ad68382019-06-05 17:51:29 +0200114-Wrong keyCert:
115
116.. code-block:: json
117
118 org.onap.dcaegen2.collectors.datafile.tasks.FileCollector |2019-04-24T14:20:46.308Z |WARN |Failed to download file: PNF0 A20000626.2315+0200-2330+0200_PNF0-0-1MB.tar.gz, reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.FileNotFoundException: **WRONGconfig/dfc.jks (No such file or directory)** |RequestID=A20000626.2315+0200-2330+0200_PNF0-0-1MB.tar.gz | | |FileCollectorWorker-2 |
119 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.FileNotFoundException: WRONGconfig/dfc.jks (No such file or directory) ...
120 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.FileNotFoundException: WRONGconfig/dfc.jks (No such file or directory) ...
121 \... |WARN |Failed to download file: ..., reason: org.onap.dcaegen2.collectors.datafile.exceptions.DatafileTaskException: Could not open connection: java.io.FileNotFoundException: WRONGconfig/dfc.jks (No such file or directory) ...
122 org.onap.dcaegen2.collectors.datafile.tasks.ScheduledTasks |2019-04-24T14:21:16.447Z |ERROR |File fetching failed, fileData
123
124-Wrong consumer dmaapHostName:
125
126.. code-block:: json
127
128 org.onap.dcaegen2.collectors.datafile.tasks.ScheduledTasks |2019-04-24T14:27:06.578Z |ERROR |Polling for file ready message failed, exception: java.net.UnknownHostException: **WRONGlocalhost**: Try again, config: DmaapConsumerConfiguration{consumerId=C12, consumerGroup=OpenDcae-c12, timeoutMs=-1, messageLimit=1, **dmaapHostName=WRONGlocalhost**, dmaapPortNumber=2222, dmaapTopicName=/events/unauthenticated.VES_NOTIFICATION_OUTPUT, dmaapProtocol=http, dmaapUserName=, dmaapUserPassword=, dmaapContentType=application/json, trustStorePath=change it, trustStorePasswordPath=change it, keyStorePath=change it, keyStorePasswordPath=change it, enableDmaapCertAuth=false} |RequestID=90fe7450-0bc2-4bf6-a2f0-2aeef6f196ae | | |reactor-http-epoll-3 |
129 \... |ERROR |Polling for file ready message failed, exception: java.net.UnknownHostException: *WRONGlocalhost*, config: DmaapConsumerConfiguration{..., dmaapHostName=*WRONGlocalhost*, ...} ...
130 \... |ERROR |Polling for file ready message failed, exception: java.net.UnknownHostException: *WRONGlocalhost*: Try again, config: DmaapConsumerConfiguration{..., dmaapHostName=*WRONGlocalhost*, ...} ...
131 \... |ERROR |Polling for file ready message failed, exception: java.net.UnknownHostException: *WRONGlocalhost*: Try again, config: DmaapConsumerConfiguration{..., dmaapHostName=*WRONGlocalhost*, ...} ...
132 \... |ERROR |Polling for file ready message failed, exception: java.net.UnknownHostException: *WRONGlocalhost*: Try again, config: DmaapConsumerConfiguration{..., dmaapHostName=*WRONGlocalhost*, ...} ...
133 \... |ERROR |Polling for file ready message failed, exception: java.net.UnknownHostException: *WRONGlocalhost*: Try again, config: DmaapConsumerConfiguration{..., dmaapHostName=*WRONGlocalhost*, ...} ...
134
135-Wrong consumer dmaapPortNumber:
136
137.. code-block:: json
138
139 org.onap.dcaegen2.collectors.datafile.tasks.ScheduledTasks |2019-04-24T14:33:35.286Z |ERROR |Polling for file ready message failed, exception: io.netty.channel.AbstractChannel$AnnotatedConnectException: syscall:getsockopt(..) failed: Connection refused: localhost/127.0.0.1:**WRONGport**, config: DmaapConsumerConfiguration{consumerId=C12, consumerGroup=OpenDcae-c12, timeoutMs=-1, messageLimit=1, dmaapHostName=localhost, **dmaapPortNumber=WRONGport**, dmaapTopicName=/events/unauthenticated.VES_NOTIFICATION_OUTPUT, dmaapProtocol=http, dmaapUserName=, dmaapUserPassword=, dmaapContentType=application/json, trustStorePath=change it, trustStorePasswordPath=change it, keyStorePath=change it, keyStorePasswordPath=change it, enableDmaapCertAuth=false} |RequestID=b57c68fe-84bf-442f-accd-ea821a5a321f | | |reactor-http-epoll-3 |
140 \... |ERROR |Polling for file ready message failed, exception: io.netty.channel.AbstractChannel$AnnotatedConnectException: syscall:getsockopt(..) failed: Connection refused: localhost/127.0.0.1:*WRONGport*, config: DmaapConsumerConfiguration{..., dmaapPortNumber=*WRONGport*, ...} ...
141 \... |ERROR |Polling for file ready message failed, exception: io.netty.channel.AbstractChannel$AnnotatedConnectException: syscall:getsockopt(..) failed: Connection refused: localhost/127.0.0.1:*WRONGport*, config: DmaapConsumerConfiguration{..., dmaapPortNumber=*WRONGport*, ...} ...
142 \... |ERROR |Polling for file ready message failed, exception: io.netty.channel.AbstractChannel$AnnotatedConnectException: syscall:getsockopt(..) failed: Connection refused: localhost/127.0.0.1:*WRONGport*, config: DmaapConsumerConfiguration{..., dmaapPortNumber=*WRONGport*, ...} ...
143 \... |ERROR |Polling for file ready message failed, exception: io.netty.channel.AbstractChannel$AnnotatedConnectException: syscall:getsockopt(..) failed: Connection refused: localhost/127.0.0.1:*WRONGport*, config: DmaapConsumerConfiguration{..., dmaapPortNumber=*WRONGport*, ...} ...
144 \... |ERROR |Polling for file ready message failed, exception: io.netty.channel.AbstractChannel$AnnotatedConnectException: syscall:getsockopt(..) failed: Connection refused: localhost/127.0.0.1:*WRONGport*, config: DmaapConsumerConfiguration{..., dmaapPortNumber=*WRONGport*, ...} ...
145
146-Wrong consumer dmaapTopicName:
147
148.. code-block:: json
149
150 org.onap.dcaegen2.collectors.datafile.tasks.ScheduledTasks |2019-04-24T14:38:07.097Z |ERROR |Polling for file ready message failed, exception: java.lang.RuntimeException: DmaaPConsumer HTTP 404 NOT_FOUND, config: DmaapConsumerConfiguration{consumerId=C12, consumerGroup=OpenDcae-c12, timeoutMs=-1, messageLimit=1, dmaapHostName=localhost, dmaapPortNumber=2222, **dmaapTopicName=/events/unauthenticated.VES_NOTIFICATION_OUTPUTWRONG**, dmaapProtocol=http, dmaapUserName=, dmaapUserPassword=, dmaapContentType=application/json, trustStorePath=change it, trustStorePasswordPath=change it, keyStorePath=change it, keyStorePasswordPath=change it, enableDmaapCertAuth=false} |RequestID=8bd71bac-68af-494b-9518-3ab4478371cf | | |reactor-http-epoll-4 |
151 \... |ERROR |Polling for file ready message failed, exception: java.lang.RuntimeException: DmaaPConsumer HTTP 404 NOT_FOUND, config: DmaapConsumerConfiguration{..., dmaapTopicName=*/events/unauthenticated.VES_NOTIFICATION_OUTPUTWRONG*, ...} ...
152 \... |ERROR |Polling for file ready message failed, exception: java.lang.RuntimeException: DmaaPConsumer HTTP 404 NOT_FOUND, config: DmaapConsumerConfiguration{..., dmaapTopicName=*/events/unauthenticated.VES_NOTIFICATION_OUTPUTWRONG*, ...} ...
153 \... |ERROR |Polling for file ready message failed, exception: java.lang.RuntimeException: DmaaPConsumer HTTP 404 NOT_FOUND, config: DmaapConsumerConfiguration{..., dmaapTopicName=*/events/unauthenticated.VES_NOTIFICATION_OUTPUTWRONG*, ...} ...
154 \... |ERROR |Polling for file ready message failed, exception: java.lang.RuntimeException: DmaaPConsumer HTTP 404 NOT_FOUND, config: DmaapConsumerConfiguration{..., dmaapTopicName=*/events/unauthenticated.VES_NOTIFICATION_OUTPUTWRONG*, ...} ...
155 \... |ERROR |Polling for file ready message failed, exception: java.lang.RuntimeException: DmaaPConsumer HTTP 404 NOT_FOUND, config: DmaapConsumerConfiguration{..., dmaapTopicName=*/events/unauthenticated.VES_NOTIFICATION_OUTPUTWRONG*, ...} ...
156
157-Consumer dmaapProtocol:
maximessone707b222019-05-09 14:27:34 +0000158Not configurable.
Tomasz Wrobel7ecee492020-07-24 10:02:06 +0200159
160Missing known_hosts file
161""""""""""""""""""""""""
162When StrictHostKeyChecking is enabled and DFC cannot find a known_hosts file, the warning information shown below is visible in the logfile. In this case, DFC acts like StrictHostKeyChecking is disabled.
163
164.. code-block:: bash
165
166 org.onap.dcaegen2.collectors.datafile.ftp.SftpClient |2020-07-24T06:32:56.010Z
167 |WARN |StrictHostKeyChecking is enabled but environment variable KNOWN_HOSTS_FILE_PATH is not set or points to not existing file [/home/datafile/.ssh/known_hosts] --> falling back to StrictHostKeyChecking='no'.
168
Krzysztof Gajewski93a98ef2020-12-18 09:06:45 +0100169To resolve this warning, provide a known_hosts file or disable StrictHostKeyChecking, see DFC config page - :ref:`strict_host_checking_config`.