cancel
Showing results for 
Search instead for 
Did you mean: 

IoT rest gateway certification error

Former Member

I'm trying to set up a gateway on a raspberry pi for the IoT service cockpit, but Im getting errors when starting the gateway.

07Oct 13:07:27,667 [Start Level: Equinox Container: db8eeb92-da10-4a50-9626-7f3f833f9de0] ERROR (GatewayCertificateUtils:274) - GetCaCertificates error in configuration for Platform Tenant XXXXXXXXXXXXXXX and Application Tenant XXXXXXXX, API Call ->https://XXXXXXXXXXXXXXXXXX:443/XXXXXXXXXXXXXX/iot/core/api/v1/tenants/XXXXXXXX/trustedCACertificates- check your configuration: javax.net.ssl.SSLHandshakeException: No X509TrustManager implementation available

Gateway config file looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="cnfTransform.xsl"?>
<cnf:configuration xsi:schemaLocation="http://sap.com/iotservices/xsd/config"
                   xmlns:cnf="http://sap.com/iotservices/xsd/config"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <cnf:amq>
        <cnf:connectors>
            <cnf:client>
                <cnf:connectionString>failover:(nio+ssl://<hostname>:61616?daemon=true&soTimeout=60000&verifyHostName=true)?initialReconnectDelay=5000</cnf:connectionString>
                <!-- <cnf:connectionString>failover:(nio://127.0.0.1:61619?daemon=true&soTimeout=60000)?initialReconnectDelay=5000</cnf:connectionString> -->
                <cnf:streamTTL>5000</cnf:streamTTL>
                <cnf:TTL>200000</cnf:TTL>
                <cnf:soap_over_jms_tmo>60000</cnf:soap_over_jms_tmo>
                <cnf:concurrentProducers>5</cnf:concurrentProducers>
                <cnf:concurrentConsumers>5</cnf:concurrentConsumers>
                <cnf:ackMode>1</cnf:ackMode><!-- AUTO_ACKNOWLEDGE = 1 / SESSION_TRANSACTED= 0 -->
                <cnf:nonPersistent/>
                <cnf:maxConnections>8</cnf:maxConnections>
            </cnf:client>
        </cnf:connectors>
    </cnf:amq>
    <cnf:coreConnection>
        <cnf:address>https://<hostname>/<instancenname>/iot/core/api/v1/tenant/<tenantname></cnf:address>
        <cnf:timeout>60000</cnf:timeout>
        <cnf:authentication>BASIC_AUTH</cnf:authentication>
        <cnf:mutual>false</cnf:mutual>
    </cnf:coreConnection>
    <cnf:gatewayBundle gatewayver="REST">
        <cnf:endpoints>
            <cnf:cxf lan="true">
                <cnf:address dev="gateway">127.0.0.1</cnf:address>
                <cnf:soapPort client_rx_tmo="60000" client_conn_tmo="60000">8170</cnf:soapPort>
            </cnf:cxf>
        </cnf:endpoints>
        <cnf:amq>
            <cnf:brokerName>mqtt-bus</cnf:brokerName>
            <cnf:connectors>
                <cnf:server>
                    <cnf:transportConnectors>
                        <cnf:transportConnector name="mqtt-bus-connector"
                                                uri="mqtt+nio+ssl://127.0.0.1:61688?needClientAuth=true&transport.soTimeout=60000"/>
                    </cnf:transportConnectors>
                    <cnf:defaultTTL>30000</cnf:defaultTTL>
                    <cnf:expireMessagePeriod>200000</cnf:expireMessagePeriod> <!-- 200 seconds -->
                    <cnf:pendingMessageLimit>200000</cnf:pendingMessageLimit> <!-- After this, start checking TTL -->
                    <cnf:stream_expireMessagePeriod>5000</cnf:stream_expireMessagePeriod> <!-- 5 seconds -->
                    <cnf:stream_pendingMessageLimit>200000</cnf:stream_pendingMessageLimit> <!-- After this, start checking TTL -->
                    <cnf:offlineDurableSubscriberTimeout>3600000</cnf:offlineDurableSubscriberTimeout> <!-- 1 hour -->
                    <cnf:offlineDurableSubscriberTaskSchedule>120000
                    </cnf:offlineDurableSubscriberTaskSchedule> <!-- 2 minutes -->
                    <cnf:memoryUsage memory="64" store="50000" temp="10000"/>  <!-- in mBytes -->
                    <cnf:destinationPolicies></cnf:destinationPolicies>
                </cnf:server>
 </cnf:connectors>
        </cnf:amq>
        <cnf:gateway gatewayAlternateId="EDGERESTGATEWAYONRPI">
            <cnf:technology>rest</cnf:technology>
            <cnf:vendor>generic</cnf:vendor>
            <cnf:gateway_comm>
                <cnf:media>API</cnf:media>
                <cnf:useAsServer>true</cnf:useAsServer>
                <cnf:jmsConnectionString>failover:(vm://mqtt-bus?waitForStart=30000&create=false)</cnf:jmsConnectionString>
                <cnf:socket_host>https://server_host/</cnf:socket_host>
                <cnf:socket_port>80</cnf:socket_port>
                <cnf:apiUsername>username</cnf:apiUsername>
                <cnf:apiPassword>password</cnf:apiPassword>
                <cnf:disableGatewayContentSent>true</cnf:disableGatewayContentSent>
            </cnf:gateway_comm>
            <cnf:trigger_comm>
                <cnf:media>Command</cnf:media>
            </cnf:trigger_comm>
            <cnf:startSinkAsCoord>true</cnf:startSinkAsCoord>
            <cnf:persistTopology>true</cnf:persistTopology>
            <cnf:waitBeforeNextWrite>0</cnf:waitBeforeNextWrite>
            <cnf:simulData>false</cnf:simulData>
            <cnf:defaultRFDWakeUp>7500</cnf:defaultRFDWakeUp>
            <cnf:defaultFFDLoadShedding>7500</cnf:defaultFFDLoadShedding>
            <cnf:minRouterBufSize>100</cnf:minRouterBufSize>
            <cnf:waitBeforeParentRemove>1800</cnf:waitBeforeParentRemove><!-- 30mins:30*60sec -->
            <cnf:periodicalDataReports>

    <cnf:periodicalAlternateId>11:22:33:44:55:66:77:88</cnf:periodicalAlternateId>
            </cnf:periodicalDataReports>
            <cnf:nodePositions>
                <cnf:nodePosition>
                    <!--coord -->
                    <cnf:posAlternateId>00:0c:29:bb:fe:53:00:00</cnf:posAlternateId>
                    <cnf:posX>230</cnf:posX>
                    <cnf:posY>120</cnf:posY>
                    <cnf:posZ>0</cnf:posZ>
                </cnf:nodePosition>
            </cnf:nodePositions>
        </cnf:gateway>
        <cnf:wsnLifecycle>
            <cnf:generatePingReq>false</cnf:generatePingReq>
            <!--<cnf:strokingTime></cnf:strokingTime> -->
            <cnf:rfdVitalityOn>true</cnf:rfdVitalityOn>
            <cnf:defaultRfdTolerance>0.50</cnf:defaultRfdTolerance>
            <cnf:missingAfterMiss>5</cnf:missingAfterMiss>
            <cnf:useRfdStdDeviation>false</cnf:useRfdStdDeviation>
            <cnf:samplingTimeout>2000</cnf:samplingTimeout>
            <cnf:burstDelta>5000</cnf:burstDelta>
            <cnf:reportingTime>120000</cnf:reportingTime>
            <cnf:policyType>DATA_TRAINING</cnf:policyType>
        </cnf:wsnLifecycle>
        <cnf:buffering active="true">
            <cnf:queueMaxElement>100000</cnf:queueMaxElement>    <!-- max number of element in PriorityBlockingQueue -->
            <cnf:bufferTrigger>80</cnf:bufferTrigger>            <!-- percentage of the maximum heap size that triggers Gateway buffering -->
<cnf:maxFileDimension>100</cnf:maxFileDimension>    <!-- max file dimension * 1000 (2 -> 2KB) -->
            <cnf:maxDisk>4096000000</cnf:maxDisk>                <!-- space dedicated to buffering file -->
            <cnf:saturation>70</cnf:saturation>                    <!-- percentage of hd use -->
            <cnf:checkMemory>false</cnf:checkMemory>            <!-- true if you want to flush the buffer once memory is critical -->
        </cnf:buffering>
        <cnf:propertyMap>key10=Value10
            nodeAcceptedByDef=true
        </cnf:propertyMap>
    </cnf:gatewayBundle>
    <cnf:keepAlive>
        <cnf:stopSystemOnFault>false</cnf:stopSystemOnFault>
    </cnf:keepAlive>
    <cnf:security>
        <cnf:active>true</cnf:active>
        <cnf:useLANendpoints>false</cnf:useLANendpoints>
    </cnf:security>
</cnf:configuration>

Any help is greatly appreciated

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Fixed this by changing the JRE version as the error message (GetCaCertificates) suggests that there is a problem with CA certificates in the Java environment. By downgrading to openjdk version 1.8.0.212, the gateway works

If you are using a different one, you may want to change it temporarily. This JRE version has a Root Certificate that is used for accessing the BTP.

Answers (0)