question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem of sending msg to client on Linux Platform

See original GitHub issue

i’m using the client and server demo (). in the server demo,i add this to get some info from client (https://github.com/eclipse/leshan/wiki/Getting-Started-:-Server).

public void registered(Registration registration, Registration previousReg,
            Collection<Observation> previousObsersations) {
    System.out.println("new device: " + registration.getEndpoint());
    try {
        **ReadResponse response = server.send(registration, new ReadRequest(3,0,13));**
        if (response.isSuccess()) {
            System.out.println("Device time:" + ((LwM2mResource)response.getContent()).getValue());
        }else {
            System.out.println("Failed to read:" + response.getCode() + " " + response.getErrorMessage());
        }
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}

this works fine on windows,but failed on linux(centos /ubuntu)… : (

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
djydzgkcommented, Sep 26, 2018

No, It still does not work with linux.

1reaction
sbernard31commented, Aug 2, 2018

I use leshan only on linux and the sandbox https://leshan.eclipse.org/#/clients is on linux too. I don’t think the issue is relative to linux…

Could you share your logs ?

You can activate more logs.

  1. for Leshan Server Demo, add a logback-config.xml file in your working directory
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>%d %p %C{0} - %m%n</pattern>
		</encoder>
	</appender>

	<root level="WARN">
		<appender-ref ref="STDOUT" />
	</root>
	
	<logger name="org.eclipse.leshan" level="DEBUG"/><!-- default value is INFO -->
	<logger name="org.eclipse.leshan.server.security.SecurityCheck" level="DEBUG"/>
	<logger name="org.eclipse.leshan.core.model.LwM2mModel" level="TRACE"/>

        <!-- All above is the default config, the line below is to search something in DTLS stack -->
        <logger name="org.eclipse.californium" level="DEBUG"/>
</configuration>
  1. for leshan-client-demo, add this jvm params to your command line : -Dorg.slf4j.simpleLogger.defaultLogLevel=debug
Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Linux email problems and how to fix them - Red Hat
If this error is hit by a client sending email, it's a result of SMTP authentication not being set up or set up...
Read more >
How to Send a Message to Logged Users in Linux Terminal
It allows you to send a message to another user in the terminal using tty. First check the all logged on users with...
Read more >
Sending & Receiving small TCP messages in Linux
In the Linux Desktop, I am using the TCP_NODELAY option which allows messages to be sent immediately, turning off the buffering algorithm. Good ......
Read more >
Linux Users don't receive team messages - Microsoft Q&A
The users on Linux are using Teams web clients and cant receive messages sent to them unless they switch to windows operating system....
Read more >
How to Send a Message to Logged Users in Linux Terminal?
Now to send messages to all users, use the wall command, it comes pre-installed in all Linux Distributions which will allow us to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found