Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Californium (Cf) CoAP Framework » californum.tools command line client unable to access coaps://vs0.inf.ethz.ch:5684/(When running the californium.tools command line client on Windows to access the coaps://vs0.inf.ethz.ch:5684/ test server, a java.lang.NullPointerException is generated and wireshark suggests that the)
californum.tools command line client unable to access coaps://vs0.inf.ethz.ch:5684/ [message #1498388] Thu, 04 December 2014 11:19
Richard Dwan is currently offline Richard DwanFriend
Messages: 2
Registered: December 2014
Junior Member
Note: I cannot post links so spaces have been added within them to fool the forum software:

Hello,

I have been trying to experiment with Californium against the Californium (Cf) Interop Server at h t t p : / / vs0.inf.ethz.ch/
I am using the californium.tools client running on java h t t p : //vs0.inf.ethz.ch/ 1.7.0_51 on wndows

I have been able to get the coap server to work and can see in wireshark the data transfer ocurring:
C:\CoAP\californium.tools-master\run>java -jar cf-client-1.0.0-SNAPSHOT.jar GET coap://vs0.inf.ethz.ch:5683/la
rge
==[ CoAP Response ]============================================
MID    : 39329
Token  : 64057302
Type   : ACK
Status : 2.05
Options: {"Content-Format":"text/plain", "Block2":306}
Payload: 1280 Bytes
---------------------------------------------------------------
/-------------------------------------------------------------\
|                 RESOURCE BLOCK NO. 1 OF 5                   |
|               [each line contains 64 bytes]                 |
\-------------------------------------------------------------/
/-------------------------------------------------------------\
|                 RESOURCE BLOCK NO. 2 OF 5                   |
|               [each line contains 64 bytes]                 |
\-------------------------------------------------------------/
/-------------------------------------------------------------\
|                 RESOURCE BLOCK NO. 3 OF 5                   |
|               [each line contains 64 bytes]                 |
\-------------------------------------------------------------/
/-------------------------------------------------------------\
|                 RESOURCE BLOCK NO. 4 OF 5                   |
|               [each line contains 64 bytes]                 |
\-------------------------------------------------------------/
/-------------------------------------------------------------\
|                 RESOURCE BLOCK NO. 5 OF 5                   |
|               [each line contains 64 bytes]                 |
\-------------------------------------------------------------/

===============================================================
Time elapsed (ms): 0


If I naively attempt to use the DTLS server without client authorisation, wireshark shows that the DTLS handshake fails and the client displays exceptions:
C:\CoAP\californium.tools-master\run>java -jar cf-client-1.0.0-SNAPSHOT.jar GET coaps://vs0.inf.ethz.ch:5684/l
arge
 1 INFO [DTLSConnector]: DLTS connector listening on 0.0.0.0/0.0.0.0:0 - (org.eclipse.californium.scandium.DTL
SConnector.java:169) start() in thread main at (2014-12-04 10:39:20)
Dec 04, 2014 10:39:20 AM org.eclipse.californium.elements.ConnectorBase$Worker run
INFO: Start DTLS-Receiver0.0.0.0/0.0.0.0:0, (running = true)
Dec 04, 2014 10:39:20 AM org.eclipse.californium.elements.ConnectorBase$Worker run
INFO: Start DTLS-Sender0.0.0.0/0.0.0.0:0, (running = true)
12 FINE [DTLSConnector]: Sending message to vs0.inf.ethz.ch/129.132.15.80:5684 - (org.eclipse.californium.scan
dium.DTLSConnector.java:417) sendNext() in thread DTLS-Sender0.0.0.0/0.0.0.0:0 at (2014-12-04 10:39:20)
13 FINE [ClientHandshaker]: DTLS Message processed (vs0.inf.ethz.ch/129.132.15.80:5684):
==[ DTLS Message  ]============================================
Content Type: Handshake (22)
Version: 254, 253
Epoch: 0
Sequence Number: 0
Length: 47
        Handshake Protocol
        Type: Hello Verify Request (3)
        Message Sequence: 0
        Fragment Offset: 0
        Fragment Length: 35
        Length: 35
                Server Version: 254, 253
                Cookie Length: 32
                Cookie: 41 AB 63 7B 0B 45 7D B1 D8 CE 19 90 47 F8 55 55 BE E4 F4 1A 98 12 E4 32 B9 D3 C7 BD 43
 F5 42 25
=============================================================== - (org.eclipse.californium.scandium.dtls.Clien
tHandshaker.java:224) processMessage() in thread DTLS-Receiver0.0.0.0/0.0.0.0:0 at (2014-12-04 10:39:20)
13 WARNING [DTLSConnector]: HANDSHAKE_FAILURE with /129.132.15.80:5684 - (org.eclipse.californium.scandium.DTL
SConnector.java:257) receiveNext() in thread DTLS-Receiver0.0.0.0/0.0.0.0:0 at (2014-12-04 10:39:21)
12 FINE [DTLSConnector]: Sending message to vs0.inf.ethz.ch/129.132.15.80:5684 - (org.eclipse.californium.scan
dium.DTLSConnector.java:417) sendNext() in thread DTLS-Sender0.0.0.0/0.0.0.0:0 at (2014-12-04 10:39:23)
12 FINE [DTLSConnector]: Sending message to vs0.inf.ethz.ch/129.132.15.80:5684 - (org.eclipse.californium.scan
dium.DTLSConnector.java:417) sendNext() in thread DTLS-Sender0.0.0.0/0.0.0.0:0 at (2014-12-04 10:39:29)
Dec 04, 2014 10:39:29 AM org.eclipse.californium.elements.ConnectorBase$Worker run
WARNING: Exception "java.lang.NullPointerException" in thread DTLS-Sender0.0.0.0/0.0.0.0:0: running=true
java.lang.NullPointerException
        at org.eclipse.californium.scandium.dtls.ClientHello.fragmentToByteArray(ClientHello.java:194)
        at org.eclipse.californium.scandium.dtls.Handshaker.wrapMessage(Handshaker.java:562)
        at org.eclipse.californium.scandium.dtls.ResumingClientHandshaker.getStartHandshakeMessage(ResumingCli
entHandshaker.java:187)
        at org.eclipse.californium.scandium.DTLSConnector.sendNext(DTLSConnector.java:463)
        at org.eclipse.californium.elements.ConnectorBase.sendNextMessageOverNetwork(ConnectorBase.java:135)
        at org.eclipse.californium.elements.ConnectorBase.access$100(ConnectorBase.java:36)
        at org.eclipse.californium.elements.ConnectorBase$1.work(ConnectorBase.java:151)
        at org.eclipse.californium.elements.ConnectorBase$Worker.run(ConnectorBase.java:214)

12 FINE [DTLSConnector]: Sending message to vs0.inf.ethz.ch/129.132.15.80:5684 - (org.eclipse.californium.scan
dium.DTLSConnector.java:417) sendNext() in thread DTLS-Sender0.0.0.0/0.0.0.0:0 at (2014-12-04 10:39:40)
Dec 04, 2014 10:39:40 AM org.eclipse.californium.elements.ConnectorBase$Worker run
WARNING: Exception "java.lang.NullPointerException" in thread DTLS-Sender0.0.0.0/0.0.0.0:0: running=true
java.lang.NullPointerException
        at org.eclipse.californium.scandium.dtls.ClientHello.fragmentToByteArray(ClientHello.java:194)
        at org.eclipse.californium.scandium.dtls.Handshaker.wrapMessage(Handshaker.java:562)
        at org.eclipse.californium.scandium.dtls.ResumingClientHandshaker.getStartHandshakeMessage(ResumingCli
entHandshaker.java:187)
        at org.eclipse.californium.scandium.DTLSConnector.sendNext(DTLSConnector.java:463)
        at org.eclipse.californium.elements.ConnectorBase.sendNextMessageOverNetwork(ConnectorBase.java:135)
        at org.eclipse.californium.elements.ConnectorBase.access$100(ConnectorBase.java:36)
        at org.eclipse.californium.elements.ConnectorBase$1.work(ConnectorBase.java:151)
        at org.eclipse.californium.elements.ConnectorBase$Worker.run(ConnectorBase.java:214)

10 FINE [DTLSConnector]: Maximum retransmissions reached. - (org.eclipse.californium.scandium.DTLSConnector.ja
va:592) handleTimeout() in thread Timer-0 at (2014-12-04 10:39:54)
12 FINE [DTLSConnector]: Sending message to vs0.inf.ethz.ch/129.132.15.80:5684 - (org.eclipse.californium.scan
dium.DTLSConnector.java:417) sendNext() in thread DTLS-Sender0.0.0.0/0.0.0.0:0 at (2014-12-04 10:40:03)
Dec 04, 2014 10:40:03 AM org.eclipse.californium.elements.ConnectorBase$Worker run
WARNING: Exception "java.lang.NullPointerException" in thread DTLS-Sender0.0.0.0/0.0.0.0:0: running=true
java.lang.NullPointerException
        at org.eclipse.californium.scandium.dtls.ClientHello.fragmentToByteArray(ClientHello.java:194)
        at org.eclipse.californium.scandium.dtls.Handshaker.wrapMessage(Handshaker.java:562)
        at org.eclipse.californium.scandium.dtls.ResumingClientHandshaker.getStartHandshakeMessage(ResumingCli
entHandshaker.java:187)
        at org.eclipse.californium.scandium.DTLSConnector.sendNext(DTLSConnector.java:463)
        at org.eclipse.californium.elements.ConnectorBase.sendNextMessageOverNetwork(ConnectorBase.java:135)
        at org.eclipse.californium.elements.ConnectorBase.access$100(ConnectorBase.java:36)
        at org.eclipse.californium.elements.ConnectorBase$1.work(ConnectorBase.java:151)
        at org.eclipse.californium.elements.ConnectorBase$Worker.run(ConnectorBase.java:214)

Request timed out


Attempting to use the DTLS server with client authentication at coaps://vs0.inf.ethz.ch:5685/ results in only Destination unreachable (Port unreachable) responses from the server

Am I doing anything wrong?
Am I missing some certificates to get DTLS to work without client authentication? (I have not added any additional certificates to the keyStore created when using "mvn clean install" compile californium.tools)
Is there something amiss with the server?

Any help that could be provided would be appreciated,
Richard
Previous Topic:Deleted
Next Topic:How to send a get request to device from handlePOST(exchange ) method
Goto Forum:
  


Current Time: Sat Apr 20 02:56:12 GMT 2024

Powered by FUDForum. Page generated in 0.03812 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top