Troubleshoot Gateway Issues

Use the information in this topic to resolve issues that you may have encountered while working with the gateway.

To determine the issue, look at the following location or files:
  • Gateway runtime console output: This displays the output while the gateway is running

  • $GATEWAY_HOME/data/logs/bootstrap.log:This displays the log output while bootstrapping the gateway

  • $GATEWAY_HOME/data/logs/gateway-N.N.log:This displays the log output while the gateway is running

  • $GATEWAY_HOME/data/logs/derby-N.log:This displays the log output of the Derby database that the gateway uses

The issues and their solutions:

  • Issue: Gateway does not respond.

    Description: The gateway installed on your device has stopped working.

    Solution: Connect to your gateway device using an SSH tool and review the bootstrap log or gateway log files to determine the cause of the problem. Resolve the cause of the issue, if possible, and restart the gateway.

  • Issue: Exception message: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors

    Description: An exception occurred when validating the certification path.

    Solution:
    • Review theGateway Security Conceptsand verify if you have missed out any step.

    • Run this command to verify code.truststore has system certificates: keytool -list -storetype JKS -keystore config\code.truststore. This message should be returned:

      Keystore type: JKS
      Keystore provider: SUN
      
      Your keystore contains 4 entries
      
      verisignrootca, Apr 14, 2015, trustedCertEntry, 
      Certificate fingerprint (SHA1): A1:DB:63:93:91:6F:17:E4:18:55:09:40:04:15:C7:02:40:B0:AE:6B
      verisignrootcacode, Apr 14, 2015, trustedCertEntry, 
      Certificate fingerprint (SHA1): A1:DB:63:93:91:6F:17:E4:18:55:09:40:04:15:C7:02:40:B0:AE:6B
      verisignrootcag5, Apr 14, 2015, trustedCertEntry, 
      Certificate fingerprint (SHA1): 4E:B6:D5:78:49:9B:1C:CF:5F:58:1E:AD:56:BE:3D:9B:67:44:A5:E5
       
      iot application developer, Jul 25, 2016,trustedCertEntry,
      Certificate fingerprint (SHA1): 90:38:2F:47:1D:EF:39:6E:B3:4D:B8:74:72:9D:91:28:C1:83:9A:FA

      If only iot application developer, <date>, trustedCertEntry is returned, the system certificates are corrupt or they have been deleted. Extract the config\code.truststore file from the gateway and complete Create a Self-Signed Certificate for Gateway Applications.

  • Issue: Gateway does not start.

    Description: Gateway cannot communicate with Oracle IoT Cloud Service.

    Solution:
    • Check if you can reach the IoT Cloud Service server by sending a ping.

    • Check that the provisioning file contains the correct Activation ID and Activation Secret. If the values are wrong, then download the file again or create a new device registration.

  • Issue: Failed to enroll with given Gateway ID / secret data.

    Description: The Activation ID and/or Activation Secret are incorrect in your provisioning file.

    Solution:
    • Check Oracle IoT Cloud Service to verify the Activation ID and Activation Secret are correct and create a new device registration if it's required.

    • Check that the provisioning file contains the correct Activation ID and Activation Secret. If the values are wrong, then download the file again or create a new device registration.

    • Check that the provisioning file contains the correct server host and server port. If the values are wrong, then download the file again or create a new device registration.

    • Check that the provisioning file contains the certificates for signing your application in Oracle IoT Cloud Service.

  • Issue: Permission errors.

    Description: Permission errors usually occur for the gateway bundles or the application bundles due to security issues.

    Solution:
    • All bundles that run in the gateway device must be signed with the appropriate certificates.

    • The certificates used to sign the bundle must be stored in the trusted assets store. See Gateway Security Concepts.

    • The certificate CN must be used for the BundleSignerCondition for the bundles in $GATEWAY_HOME/config/gateway.permissions when assigning a BundleSignerCondition.

  • Issue: Wiring errors.

    Description: Wiring errors usually occur when the OSGi framework tries to start a bundle and/or "connect" two bundles together.

    Solution:
    • Check $GATEWAY_HOME/config/gateway.permissions to make sure your bundle has the proper permissions.

    • Make sure the bundle is signed with the certificates in the provisioning file.

    • If one bundle is dependent on another, make sure that the bundle being depended on is exporting the correct packages and that it has the appropriate permissions, and check that the dependent bundle is importing the required packages and that it has the appropriate permissions.

  • Issue: HTTP Response Code as 200 when you run gradle deploy.

    Description: The gateway is unreachable for deployment.

    Solution:
    • Verify that in the Oracle IoT Cloud Service UI, the gateway device is running and activated.

    • Verify that if the gateway is running behind a firewall, then the proxy information is provided in the gradle. properties file.