Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Problem in connecting leshan client to bootstrap server

Hi,

Trying to connect the Client to Bootstrap server with data.json file with DTLS connection(PSK)
java -jar leshan-client-demo.jar -lh ip3 -lp 5684 -u ip1 -b -i "identity0" -p "746F7073656372657430"


Showing error:

2017-01-18 05:15:04,568 INFO RegistrationEngine - Bootstrap started
2017-01-18 05:15:04,638 ERROR ServersInfoExtractor - Invalid URI coaps://[ip]:5684/
java.net.URISyntaxException: Malformed IPv6 address at index 9: coaps://[ip]:5684/
at java.net.URI$Parser.fail(URI.java:2829)
at java.net.URI$Parser.parseIPv6Reference(URI.java:3450)
at java.net.URI$Parser.parseServer(URI.java:3200)
at java.net.URI$Parser.parseAuthority(URI.java:3136)
at java.net.URI$Parser.parseHierarchical(URI.java:3078)
at java.net.URI$Parser.parse(URI.java:3034)
at java.net.URI.<init>(URI.java:595)
at org.eclipse.leshan.client.servers.ServersInfoExtractor.getInfo(ServersInfoExtractor.java:68)
at org.eclipse.leshan.client.servers.RegistrationEngine.bootstrap(RegistrationEngine.java:120)
at org.eclipse.leshan.client.servers.RegistrationEngine.access$300(RegistrationEngine.java:52)
at org.eclipse.leshan.client.servers.RegistrationEngine$RegistrationTask.run(RegistrationEngine.java:283)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

data.json file:
{
    "servers": {
        "1": {
            "shortId": "1"
        }
    },
    "security": {
        "0": {
            "uri": "coaps://[ip1]:5684/",
            "bootstrapServer": true,
            "securityMode": "PSK",
            "serverPublicKeyOrId": [105, 100, 101, 110, 116, 105, 116, 121, 48],
            "publicKeyOrId": [105, 100, 101, 110, 116, 105, 116, 121, 48],
            "secretKey": [116, 111, 112, 115, 101, 99, 114, 101, 116, 48],
            "serverId": "0"
        },
        "1": {
            "uri": "coaps://[ip2]:5684/",
            "securityMode": "PSK",            
            "serverPublicKeyOrId": [105, 100, 101, 110, 116, 105, 116, 121],
            "publicKeyOrId": [105, 100, 101, 110, 116, 105, 116, 121],
            "secretKey": [116, 111, 112, 115, 101, 99, 114, 101, 116],
            "serverId": "1"
        }
    }
}


Thanks,
Waris Khan


On 18 January 2017 at 12:35, Waris Khan <wariskhan4119@xxxxxxxxx> wrote:
Hi Joakim,

Thanks for the help.

Thanks,
Waris

On 18 January 2017 at 10:42, Waris Khan <wariskhan4119@xxxxxxxxx> wrote:

Hi Team,

 

I started the bootstrap server, LWM2M server and Lesahn client in 3 different machines:

LWM2M server---- 10.37.2.24

leshan client--- 10.37.3.24

bootstrap server-10.37.14.24

I am able to connect the client with LWM2M server and passing the data.json file to configure bootstrap server but it failes to connect with below details:

 

root@UE-10-37-3-24:~/sw/leshan_client# java -jar leshan-client-demo.jar -lh 10.37.3.24 -lp 5683 -u 10.37.14.24

Jan 17, 2017 7:44:58 AM org.eclipse.californium.core.network.config.NetworkConfig createStandardWithFile

INFO: Loading standard properties from file Californium.properties

2017-01-17 07:44:58,277 INFO LeshanClientDemo - Press 'w','a','s','d' to change reported Location (57.0,29.0).

2017-01-17 07:44:58,277 INFO LeshanClient - Starting Leshan client ...

Jan 17, 2017 7:44:58 AM org.eclipse.californium.core.CoapServer start

INFO: Starting server

Jan 17, 2017 7:44:58 AM org.eclipse.californium.core.network.CoapEndpoint start

INFO: Starting endpoint at 0.0.0.0/0.0.0.0:0

Jan 17, 2017 7:44:58 AM org.eclipse.californium.scandium.DTLSConnector start

INFO: DTLS connector listening on [0.0.0.0/0.0.0.0:57008] with MTU [1,280] using (inbound) datagram buffer size [16,474 bytes]

Jan 17, 2017 7:44:58 AM org.eclipse.californium.core.network.CoapEndpoint start

INFO: Starting endpoint at /10.37.3.24:5683

2017-01-17 07:44:58,294 INFO LeshanClient - Leshan client started.

2017-01-17 07:44:58,308 INFO RegistrationEngine - Trying to register to coap://10.37.14.24:5683 ...

 

Output console as:

 

 

Jan 17, 2017 7:45:07 AM org.eclipse.californium.core.server.ServerMessageDeliverer deliverRequest

INFO: Did not find resource [rd] requested by /10.37.3.24:5,683

 

Please help me out in this.

 

 

Thanks & Regards,

 Waris Khan





Back to the top