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.

When I set up a bootstrap server in aws ECS frontend by NLB, or Ec2, and run client locally, I get an error below,

See original GitHub issue
11:27:44.002 [UDP-Sender-localhost/127.0.0.1:0[0]] DEBUG org.eclipse.californium.elements.UDPConnector - UDPConnector (Thread[UDP-Sender-localhost/127.0.0.1:0[0],5,Californium/Elements]) sent 120 bytes to ztd-coap-nlb-f9adbad5e5c4bbcd.elb.us-west-1.amazonaws.com/54.176.11.0:5684
11:27:44.002 [CoapServer(main)#1] DEBUG org.eclipse.californium.core.network.Exchange - local Exchange[L1, complete] completed CON-POST   MID=58500, Token=F8CCB2FEC737AF83, OptionSet={"Uri-Path":"bs", "Uri-Query":["pct=112","ep=localhost","deviceId=ODkwMTE3MDMyNzgyODg3Nzc1NjE6MzU0NzYyMTE0MDc5ODQwMQ%3D%3D","ip=72.163.220.9"]}, canceled <empty data>!
11:27:44.001 [RegistrationEngine#0] WARN org.eclipse.leshan.client.engine.DefaultRegistrationEngine - Unable to send Bootstrap request
org.eclipse.leshan.core.request.exception.SendFailedException: Request CON-POST   MID=58500, Token=F8CCB2FEC737AF83, OptionSet={"Uri-Path":"bs", "Uri-Query":["pct=112","ep=localhost","deviceId=ODkwMTE3MDMyNzgyODg3Nzc1NjE6MzU0NzYyMTE0MDc5ODQwMQ%3D%3D","ip=72.163.220.9"]}, Can't assign requested address <empty data> cannot be sent
	at org.eclipse.leshan.core.californium.CoapSyncRequestObserver.onSendError(CoapSyncRequestObserver.java:106)
	at org.eclipse.californium.core.coap.Message.setSendError(Message.java:1026)
	at org.eclipse.californium.core.coap.Request.setSendError(Request.java:1046)
	at org.eclipse.californium.core.network.CoapEndpoint$SendingCallback.onError(CoapEndpoint.java:1246)
	at org.eclipse.californium.elements.RawData.onError(RawData.java:314)
	at org.eclipse.californium.elements.UDPConnector$Sender.work(UDPConnector.java:518)
	at org.eclipse.californium.elements.UDPConnector$NetworkStageThread.run(UDPConnector.java:434)
Caused by: java.io.IOException: Can't assign requested address
	at java.base/java.net.PlainDatagramSocketImpl.send(Native Method)
	at java.base/java.net.DatagramSocket.send(DatagramSocket.java:695)
	at org.eclipse.californium.elements.UDPConnector$Sender.work(UDPConnector.java:515)
	... 1 common frames omitted

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sesikanthrcommented, Feb 23, 2022

I realised the mistake. I have this code modified .

builder.setLocalAddress(cli.main.localAddress, cli.main.localPort);

to

builder.setLocalAddress(“localhost”, 5684);. (Mistake I did). The datagram socket gets opened for 127.0.0.1, which is why it works locally.

I had to bind this to any IP with 0.0.0.0

Thank you for your support @boaks / @sbernard31

0reactions
sbernard31commented, Feb 23, 2022

You’re welcome.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot why your ECS or EC2 instance can't join the ...
You get this error when the ECS agent can't register the EC2 container instance with the ECS cluster because the EC2 instance is...
Read more >
Access container applications privately on Amazon ECS by ...
Open the Amazon EC2 console and choose the AWS Region that contains your VPC. · Under Load balancing, choose Load balancers, and choose...
Read more >
Troubleshoot an unresponsive website on an EC2 instance
Websites running on an EC2 instance might become unreachable for multiple reasons. To resolve this issue, confirm that the configuration ...
Read more >
Fix client connection to an ELB load balancer - Amazon AWS
1. Connect to your Amazon EC2 instance (see steps for Linux instances or Windows instances). · 2. Verify that either netcat (nc) or...
Read more >
Set up to use Amazon ECS - Amazon Elastic Container Service
Complete the following tasks to get set up for Amazon ECS. ... from a computer running macOS or Linux, specify the .pem file...
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