maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [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 | =============== |
Vijay VK | f9e4344 | 2019-05-22 22:10:29 +0100 | [diff] [blame] | 6 | |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 7 | In order to find the origin of an error, we suggest to use the logs resulting from tracing, which needs to be activated. |
| 8 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 9 | Using the DFC REST API |
| 10 | """""""""""""""""""""" |
| 11 | The DFC supports a REST API which includes features to facilitate troubleshooting. |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 12 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 13 | One REST primitive, **status**, returns statistics and status information for the DFC processing. |
| 14 | Here follows an example on how to use (here curl is used, but a web-browser can also be used. If you are |
| 15 | logged in to a container, wget can probably be used): |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 16 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 17 | ``curl http://127.0.0.1:8100/status -i -X GET`` |
| 18 | |
| 19 | The 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 |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 22 | logger. |
| 23 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 24 | **logfile** - get logged information. |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 25 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 26 | **health** - get health check info, there is currently no info here. But the endpoint is enabled. |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 27 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 28 | **metrics** - read metrics from the Java execution environment; such as memory consumption, number of threads, open file |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 29 | descriptors etc. |
| 30 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 31 | Here follow some examples: |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 32 | Activate debug tracing on all classes in the DFC: |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 33 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 34 | ``curl http://127.0.0.1:8100/actuator/loggers/org.onap.dcaegen2.collectors.datafile -i -X POST -H 'Content-Type: |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 35 | application/json' -d '{"configuredLevel":"debug"}'`` |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 36 | |
| 37 | Read the log file: |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 38 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 39 | ``curl http://127.0.0.1:8100/actuator/logfile -i -X GET`` |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 40 | |
| 41 | Get build information: |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 42 | |
| 43 | ``curl http://127.0.0.1:8100/actuator/info`` |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 44 | |
| 45 | Get metric from the JVM. This lists the metrics that are available: |
| 46 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 47 | ``curl http://127.0.0.1:8100/actuator/metrics -i -X GET`` |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 48 | |
| 49 | To see the value of a particular metric, just add \/[nameOfTheMetric] in the end of address, for example: |
| 50 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 51 | ``curl http://127.0.0.1:8100/actuator/metrics/process.cpu.usage -i -X GET`` |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 52 | |
| 53 | |
| 54 | Certificate failure |
| 55 | """"""""""""""""""" |
| 56 | |
| 57 | If there is an error linked to the certificate, it is possible to get information about it. A possible cause for the |
| 58 | error can be that the expiry date of the certificate is past. |
| 59 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 60 | ``keytool -list -v -keystore dfc.jks`` |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 61 | |
| 62 | The command to encode the b64 jks file to local execution is (the \*.jks.b64 is in the repo and the Dockerfile is |
| 63 | encoding it into .jks. So when you pull from nexus, this won't be needed, only when git-checkout and java/mvn run): |
| 64 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 65 | ``base64 -d dfc.jks.b64 > dfc.jks`` |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 66 | |
| 67 | |
| 68 | Common 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 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 75 | .. **Missing configuration on Consul** |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 76 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 77 | .. "Exception during getting configuration from CONSUL/CONFIG_BINDING_SERVICE" |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 78 | |
| 79 | |
maximesson | e0a4285 | 2019-08-16 08:43:37 +0000 | [diff] [blame] | 80 | DFC uses a number of configuration parameters. You can find below the kind of reply you get if any parameter is not valid: |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 81 | |
| 82 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 83 | -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 |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 92 | |
| 93 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 94 | -Wrong trustedCa: |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 95 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 96 | .. code-block:: json |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 97 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 98 | 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 |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 103 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 104 | -Wrong keyPassword: |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 105 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 106 | .. code-block:: json |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 107 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 108 | 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 |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 113 | |
maximesson | 4ad6838 | 2019-06-05 17:51:29 +0200 | [diff] [blame] | 114 | -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: |
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame] | 158 | Not configurable. |
Tomasz Wrobel | 7ecee49 | 2020-07-24 10:02:06 +0200 | [diff] [blame] | 159 | |
| 160 | Missing known_hosts file |
| 161 | """""""""""""""""""""""" |
| 162 | When 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 Gajewski | 93a98ef | 2020-12-18 09:06:45 +0100 | [diff] [blame^] | 169 | To resolve this warning, provide a known_hosts file or disable StrictHostKeyChecking, see DFC config page - :ref:`strict_host_checking_config`. |