Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » Error code 4103 and 5000 when receiving notification response
Error code 4103 and 5000 when receiving notification response [message #1741615] Fri, 26 August 2016 10:48 Go to next message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Hello all,

I have a scenarior like: MY_DEVICE AE is in in-cse and it has the poa address as http://127.0.0.1:1400/monitor. This address is a http server as described here in the tutorial: http://wiki.eclipse.org/OM2M/one/REST_API, which will listen for some notification. In mn-cse I have an AE SMART_METER.

The MY_DEVICE will subscribe to SMART_METER/DATA to receive the notification:
targetId = "/" + CSE_ID + "/" + CSE_NAME + "/" + sensorId + "/" + DATA;
			Subscription sub = new Subscription();
			sub.getNotificationURI().add("/in-cse/in-name/MY_DEVICE");
			sub.setNotificationContentType(BigInteger.valueOf(2));
			RequestSender.createSubscription(targetId,SUB,sub);


As far as I understand that if new data is written to SMART_METER/DATA, a notification will be sent to /in-cse/in-name/MY_DEVICE and based on the poa of this MY_DEVICE, the notification will be continue to redirect to the poa address which is the http monitor server http://127.0.0.1:1400/monitor.

I have tested this case but I got two errors code: 4103 when creating the SUB container in SMART_METER/DATA and 5000 when sending the notification to the monitor server

I know my post maybe similar to this previous post: https://www.eclipse.org/forums/index.php/t/1079634/ and I also tried the solution in this post by replacing the line 233 of the file: org/eclipse/om2m/core/notifier/Notifier.java
request.setFrom("/" + Constants.CSE_ID);
with:
request.setFrom(Constants.ADMIN_REQUESTING_ENTITY);
but still no success.

Can anyone help me, please?
I also attach here some images and the log files also.

IN_CSE:

https://s16.postimg.org/3osmo8axx/in_cse.png

MN_CSE:

https://s22.postimg.org/oopmv989d/mn_cse.png

Thank you in advanced!
Regards
Son
  • Attachment: log_in.out
    (Size: 44.10KB, Downloaded 74 times)
  • Attachment: log_mn.out
    (Size: 29.94KB, Downloaded 70 times)
Re: Error code 4103 and 5000 when receiving notification response [message #1741906 is a reply to message #1741615] Tue, 30 August 2016 14:28 Go to previous messageGo to next message
Francois AissaouiFriend
Messages: 38
Registered: April 2015
Member
Hi Son,

Regarding the logs, you provides as the apocPath the following characters fro your IPE: "http://127.0.0.1:1400/monitor". It means the IPE is identified in the platform as this string.
So when the notification reach the AE, OM2M is sending the request to your IPE which has an error.
[2016-08-26 12:14:03,839 ERROR] - org.eclipse.om2m.core.redirector.Redirector 
Exception caught in IPE execution
java.lang.ArrayIndexOutOfBoundsException: 3
	at org.eclipse.om2m.sample.actuator.Controller.doExecute(Controller.java:13)
	at org.eclipse.om2m.core.redirector.Redirector.retargetNotify(Redirector.java:184)
	at org.eclipse.om2m.core.router.Router.doRequest(Router.java:203)
	...


If you want your notification to be sent directly to the monitor listening on "http://127.0.0.1:1400/monitor", you have to put it as the notification URI in the subscription or change the apocPath of your IPE to something else.

Hope this can help,
Regards,
Fran├žois
Re: Error code 4103 and 5000 when receiving notification response [message #1741920 is a reply to message #1741906] Tue, 30 August 2016 14:57 Go to previous message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Thank you for your response Fran├žois Smile
Previous Topic:Error in OSGi console
Next Topic:How to connect in-cse and mn-cse which located in different network
Goto Forum:
  


Current Time: Thu Nov 15 00:08:04 GMT 2018

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

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

Back to the top