Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » OM2M builds not working on RPI Board
OM2M builds not working on RPI Board [message #1751447] Tue, 10 January 2017 13:16 Go to next message
Ashok Athukuri is currently offline Ashok AthukuriFriend
Messages: 14
Registered: November 2015
Junior Member
Hi,

I am trying to run OM2M IN and MN on RPI board, I have build binaries on windows pc and copied org.eclipse.om2m.site.in-cse folder in RPI board and tried to run using ./start.sh file

here is the Log: (I have added few debug messages)

[INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
Starting Data Mapper
[INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
Registering XML Mapper Service..
[INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
XML Mapper service registered.
[INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
Registering JSON Mapper Service..
[INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
JSON Mapper service registered.
[INFO] - org.eclipse.om2m.binding.coap.Activator
Register CoAP RestClientService..
[INFO] - org.eclipse.om2m.binding.coap.Activator
Starting CoAP server
[INFO] - org.eclipse.om2m.binding.coap.Activator
CseService opened
[INFO] - org.eclipse.om2m.binding.http.Activator
Register HTTP RestClientService..
[INFO] - org.eclipse.om2m.binding.http.Activator
HTTP RestClientService is registered.
[INFO] - org.eclipse.om2m.binding.http.Activator
------ httpServiceTracker.open() ------
[INFO] - org.eclipse.om2m.binding.http.Activator
------ cseServiceTracker.open() ------
[INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Starting Persistence JPA plugin...
[INFO] - org.eclipse.om2m.binding.http.Activator
HttpService discovered
[INFO] - org.eclipse.om2m.binding.http.Activator
---- HttpServlet Register / context
[INFO] - org.eclipse.om2m.persistence.eclipselink.internal.DBServiceJPAImpl
Initializing Database...
[INFO] - org.eclipse.om2m.persistence.eclipselink.internal.DBServiceJPAImpl
Creating new EntityManagerFactory...
[INFO] - org.eclipse.om2m.core.Activator
Starting CSE...
[INFO] - org.eclipse.om2m.core.Activator
Added Data Mapper Service: application/xml
[INFO] - org.eclipse.om2m.core.Activator
Added Data Mapper Service: application/json
[INFO] - org.eclipse.om2m.core.Activator
Rest client service discovered. Protocol: coap
[INFO] - org.eclipse.om2m.core.Activator
Rest client service discovered. Protocol: http
[INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
HttpService discovered
[INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
Register /webpage http context
osgi> [INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
HttpService removed
[INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
Unregister /webpage http context
[INFO] - org.eclipse.om2m.binding.http.Activator
HttpService removed
[INFO] - org.eclipse.om2m.binding.http.Activator
Unregister / http context
[INFO] - org.eclipse.om2m.core.Activator
Stopping CSE
[INFO] - org.eclipse.om2m.core.CSEInitializer
Sending unregistration request
[INFO] - org.eclipse.om2m.core.comm.RestClient
---- RestClient::sendRequest the requestIndication RC: RequestPrimitive [operation=4,
to=http://127.0.0.1:8080/api//in-cse/in-cse,
from=admin:admin,
resultContent=0,
]
[INFO] - org.eclipse.om2m.binding.http.RestHttpClient
******* REST HTTP CLIENT Sending request: RequestPrimitive [operation=4,
to=http://127.0.0.1:8080/api//in-cse/in-cse,
from=admin:admin,
resultContent=0,
] **********
[INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Query string generated: ?rcn=0
[INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Request to be send: DELETE http://127.0.0.1:8080/api//in-cse/in-cse?rcn=0 HTTP/1.1
[INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Headers:
Accept:
X-M2M-Origin: admin:admin
Content-Type:

[INFO] - org.eclipse.om2m.binding.http.RestHttpClient
******* Http Client response: ResponsePrimitive [responseStatusCode=4004,
content=<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 ProxyServlet: /api//in-cse/in-cse</title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /api//in-cse/in-cse. Reason:
<pre> ProxyServlet: /api//in-cse/in-cse</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>


I read the link: https://www.eclipse.org/forums/index.php/t/1026342/

Tried below suggestion:
To do this, go to the GSCL product, open the "om2m.product" file, then unchecked "the product includes native launcher" check-box.
Save the file, and build OM2M.
Now copy the GSCL product on your rasberry pi.

But that didn't worked !

OM2M is java and it is platform independent, Wonder why it is not working !?

Thanks in Advance
~Ashok
Re: OM2M builds not working on RPI Board [message #1751517 is a reply to message #1751447] Wed, 11 January 2017 05:41 Go to previous messageGo to next message
Ashok Athukuri is currently offline Ashok AthukuriFriend
Messages: 14
Registered: November 2015
Junior Member
I can see binaries available at https://wiki.eclipse.org/OM2M/Download#Get_OM2M_binaries are working fine, Do I need to change anything here when I build binaries ?
Re: OM2M builds not working on RPI Board [message #1751825 is a reply to message #1751517] Sun, 15 January 2017 11:20 Go to previous messageGo to next message
Ashok Athukuri is currently offline Ashok AthukuriFriend
Messages: 14
Registered: November 2015
Junior Member
I have added
-Dorg.osgi.service.http.port=8380 in start.sh file and now its working
here is the url who suggested this solution
https://www.eclipse.org/forums/index.php/t/198931/
Re: OM2M builds not working on RPI Board [message #1786507 is a reply to message #1751825] Fri, 04 May 2018 15:01 Go to previous messageGo to next message
Arnaud Moncade is currently offline Arnaud MoncadeFriend
Messages: 4
Registered: May 2018
Junior Member
Hi,

I ran into the exact same problem, also while trying to run IN or MN CSEs on a Raspberry Pi.

The solution of adding the argument worked, but more surprisingly it also worked to just add a whitespace at the end of the command line in start.sh.

The compiled files available here work. I identified that the start.sh I generate ends with CR+LF (0x0A0D) and the one I download on OM2M website ends with with CR (0x000A). I tried to build either from my PC or from my Raspberry with the same results. Modifying start.sh manually makes it work.

I would need to be able to deploy CSEs easily without modifying start.sh and I would appreciate if anyone knows why I do not generate the right start.sh file.

Thank you
Re: OM2M builds not working on RPI Board [message #1786573 is a reply to message #1786507] Mon, 07 May 2018 15:13 Go to previous message
Arnaud Moncade is currently offline Arnaud MoncadeFriend
Messages: 4
Registered: May 2018
Junior Member
I figured out that git was converting LF to CR+LF when I was cloning the OM2M repo. I followed this link and used the command
git config --global core.autocrlf false
to disable the conversion. Then I cloned the repo again and everything works fine.
Previous Topic:MN-CSE registered in other MN-CSE
Next Topic:Connection between multiple servers or gateways.
Goto Forum:
  


Current Time: Wed Sep 19 04:48:19 GMT 2018

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

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

Back to the top