Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » HTTP Error 404 when running om2m on Ubuntu 12.04
HTTP Error 404 when running om2m on Ubuntu 12.04 [message #1729195] Tue, 12 April 2016 05:17 Go to next message
Wenyuan Hu is currently offline Wenyuan HuFriend
Messages: 2
Registered: April 2016
Junior Member
Hello,

I'm new to om2m. I did clone om2m and build successfully on Ubuntu 12.04. But when I tried to run in-cse, I got error "HTTP Error 404". The detailed log is like this:

[2016-04-11 03:30:58,517 INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
Starting Data Mapper
[2016-04-11 03:30:58,520 INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
Registering XML Mapper Service..
[2016-04-11 03:31:00,287 INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
XML Mapper service registered.
[2016-04-11 03:31:00,289 INFO] - org.eclipse.om2m.binding.http.Activator
Register HTTP RestClientService..
[2016-04-11 03:31:00,295 INFO] - org.eclipse.om2m.binding.http.Activator
HTTP RestClientService is registered.
[2016-04-11 03:31:00,297 INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Starting Persistence JPA plugin...
[2016-04-11 03:31:00,303 INFO] - org.eclipse.om2m.persistence.eclipselink.internal.DBServiceJPAImpl
Initializing Database...
[2016-04-11 03:31:00,304 INFO] - org.eclipse.om2m.persistence.eclipselink.internal.DBServiceJPAImpl
Creating new EntityManagerFactory...
[2016-04-11 03:31:02,342 INFO] - org.eclipse.om2m.persistence.eclipselink.internal.DBServiceJPAImpl
DataBase initialized.
[2016-04-11 03:31:02,364 INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Registering Database (JPA-EL) Service
[2016-04-11 03:31:02,366 INFO] - org.eclipse.om2m.binding.http.Activator
HttpService discovered
[2016-04-11 03:31:02,366 INFO] - org.eclipse.om2m.binding.http.Activator
Register / context
[2016-04-11 03:31:02,424 INFO] - org.eclipse.om2m.core.Activator
Starting CSE...
[2016-04-11 03:31:02,424 INFO] - org.eclipse.om2m.core.Activator
DataMapper Service discovered
[2016-04-11 03:31:02,424 INFO] - org.eclipse.om2m.core.Activator
Add Data Mapper Service: application/xml
[2016-04-11 03:31:02,429 INFO] - org.eclipse.om2m.core.Activator
DataBase persistence service discovered
[2016-04-11 03:31:02,430 INFO] - org.eclipse.om2m.core.Activator
Rest client service discovered
[2016-04-11 03:31:02,431 INFO] - org.eclipse.om2m.core.CSEInitializer
Waiting for the database service
[2016-04-11 03:31:02,432 INFO] - org.eclipse.om2m.core.CSEInitializer
Create AccessControlPolicy resource
[2016-04-11 03:31:02,596 INFO] - org.eclipse.om2m.core.CSEInitializer
Create CSEBase resource
[2016-04-11 03:31:02,630 INFO] - org.eclipse.om2m.core.Activator
Registering CseService...
[2016-04-11 03:31:02,637 INFO] - org.eclipse.om2m.binding.http.Activator
CseService discovered
[2016-04-11 03:31:02,637 INFO] - org.eclipse.om2m.core.Activator
CSE Started
[2016-04-11 03:31:02,639 INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
HttpService discovered
[2016-04-11 03:31:02,639 INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
Register /webpage http context
[2016-04-11 03:31:02,648 INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
HttpService removed
[2016-04-11 03:31:02,649 INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
Unregister /webpage http context
[2016-04-11 03:31:02,649 INFO] - org.eclipse.om2m.binding.http.Activator
HttpService removed
[2016-04-11 03:31:02,650 INFO] - org.eclipse.om2m.binding.http.Activator
Unregister / http context
[2016-04-11 03:31:02,668 INFO] - org.eclipse.om2m.core.Activator
Stopping CSE
[2016-04-11 03:31:02,669 INFO] - org.eclipse.om2m.core.CSEInitializer
Sending unregistration request
[2016-04-11 03:31:02,669 INFO] - org.eclipse.om2m.core.comm.RestClient
the requestIndication RC: RequestPrimitive [operation=4,
to=http://127.0.0.1:8080/api//in-cse/in-cse,
from=admin:admin,
resultContent=0,
]
[2016-04-11 03:31:02,670 INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Sending request: RequestPrimitive [operation=4,
to=http://127.0.0.1:8080/api//in-cse/in-cse,
from=admin:admin,
resultContent=0,
]
[2016-04-11 03:31:03,813 INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Query string generated: ?rc=0
[2016-04-11 03:31:03,817 INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Request to be send: DELETE http://127.0.0.1:8080/api//in-cse/in-cse?rc=0 HTTP/1.1
[2016-04-11 03:31:03,817 INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Headers:
Accept:
X-M2M-Origin: admin:admin
Content-Type:

[2016-04-11 03:31:04,251 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>




















</body>
</html>
,
to=admin:admin,
from=/in-cse,
]
[2016-04-11 03:31:04,256 INFO] - org.eclipse.om2m.core.comm.RestClient
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>




















</body>
</html>
,
to=admin:admin,
from=/in-cse,
]
[2016-04-11 03:31:04,259 INFO] - org.eclipse.om2m.core.CSEInitializer
Unregistration 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>




















</body>
</html>
,
to=admin:admin,
from=/in-cse,
]
[2016-04-11 03:31:04,260 INFO] - org.eclipse.om2m.binding.http.Activator
CseService removed
[2016-04-11 03:31:04,269 INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Stopping Persistence JPA plugin
[2016-04-11 03:31:04,272 INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Persistence JPA plugin stopped
[2016-04-11 22:03:21,595 INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
Starting Data Mapper
[2016-04-11 22:03:21,596 INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
Registering XML Mapper Service..
[2016-04-11 22:04:10,137 INFO] - org.eclipse.om2m.datamapping.jaxb.Activator
XML Mapper service registered.
[2016-04-11 22:04:10,195 INFO] - org.eclipse.om2m.binding.http.Activator
Register HTTP RestClientService..
[2016-04-11 22:04:10,673 INFO] - org.eclipse.om2m.binding.http.Activator
HTTP RestClientService is registered.
[2016-04-11 22:04:10,678 INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Starting Persistence JPA plugin...
[2016-04-11 22:04:10,719 INFO] - org.eclipse.om2m.persistence.eclipselink.internal.DBServiceJPAImpl
Initializing Database...
[2016-04-11 22:04:10,720 INFO] - org.eclipse.om2m.persistence.eclipselink.internal.DBServiceJPAImpl
Creating new EntityManagerFactory...
[2016-04-11 22:04:43,252 INFO] - org.eclipse.om2m.persistence.eclipselink.internal.DBServiceJPAImpl
DataBase initialized.
[2016-04-11 22:04:43,362 INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Registering Database (JPA-EL) Service
[2016-04-11 22:04:43,369 INFO] - org.eclipse.om2m.binding.http.Activator
HttpService discovered
[2016-04-11 22:04:43,427 INFO] - org.eclipse.om2m.binding.http.Activator
Register / context
[2016-04-11 22:04:43,972 INFO] - org.eclipse.om2m.core.Activator
Starting CSE...
[2016-04-11 22:04:43,977 INFO] - org.eclipse.om2m.core.Activator
DataMapper Service discovered
[2016-04-11 22:04:43,977 INFO] - org.eclipse.om2m.core.Activator
Add Data Mapper Service: application/xml
[2016-04-11 22:04:43,979 INFO] - org.eclipse.om2m.core.Activator
DataBase persistence service discovered
[2016-04-11 22:04:43,983 INFO] - org.eclipse.om2m.core.Activator
Rest client service discovered
[2016-04-11 22:04:43,996 INFO] - org.eclipse.om2m.core.CSEInitializer
Waiting for the database service
[2016-04-11 22:04:44,025 INFO] - org.eclipse.om2m.core.CSEInitializer
Create AccessControlPolicy resource
[2016-04-11 22:04:44,238 INFO] - org.eclipse.om2m.core.CSEInitializer
Create CSEBase resource
[2016-04-11 22:04:44,391 INFO] - org.eclipse.om2m.core.Activator
Registering CseService...
[2016-04-11 22:04:44,568 INFO] - org.eclipse.om2m.binding.http.Activator
CseService discovered
[2016-04-11 22:04:44,584 INFO] - org.eclipse.om2m.core.Activator
CSE Started
[2016-04-11 22:04:44,658 INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
HttpService discovered
[2016-04-11 22:04:44,659 INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
Register /webpage http context
[2016-04-11 22:04:44,697 INFO] - org.eclipse.om2m.binding.http.Activator
HttpService removed
[2016-04-11 22:04:44,699 INFO] - org.eclipse.om2m.binding.http.Activator
Unregister / http context
[2016-04-11 22:04:44,705 INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
HttpService removed
[2016-04-11 22:04:44,709 INFO] - org.eclipse.om2m.webapp.resourcesbrowser.xml.Activator
Unregister /webpage http context
[2016-04-11 22:04:44,776 INFO] - org.eclipse.om2m.core.Activator
Stopping CSE
[2016-04-11 22:04:44,781 INFO] - org.eclipse.om2m.core.CSEInitializer
Sending unregistration request
[2016-04-11 22:04:44,782 INFO] - org.eclipse.om2m.core.comm.RestClient
the requestIndication RC: RequestPrimitive [operation=4,
to=http://127.0.0.1:8080/api//in-cse/in-cse,
from=admin:admin,
resultContent=0,
]
[2016-04-11 22:04:44,784 INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Sending request: RequestPrimitive [operation=4,
to=http://127.0.0.1:8080/api//in-cse/in-cse,
from=admin:admin,
resultContent=0,
]
[2016-04-11 22:04:46,129 INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Query string generated: ?rc=0
[2016-04-11 22:04:46,172 INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Request to be send: DELETE http://127.0.0.1:8080/api//in-cse/in-cse?rc=0 HTTP/1.1
[2016-04-11 22:04:46,174 INFO] - org.eclipse.om2m.binding.http.RestHttpClient
Headers:
Accept:
X-M2M-Origin: admin:admin
Content-Type:

[2016-04-11 22:04:47,220 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>




















</body>
</html>
,
to=admin:admin,
from=/in-cse,
]
[2016-04-11 22:04:47,246 INFO] - org.eclipse.om2m.core.comm.RestClient
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>




















</body>
</html>
,
to=admin:admin,
from=/in-cse,
]
[2016-04-11 22:04:47,361 INFO] - org.eclipse.om2m.core.CSEInitializer
Unregistration 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>




















</body>
</html>
,
to=admin:admin,
from=/in-cse,
]
[2016-04-11 22:04:47,407 INFO] - org.eclipse.om2m.binding.http.Activator
CseService removed
[2016-04-11 22:04:47,410 INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Stopping Persistence JPA plugin
[2016-04-11 22:04:47,410 INFO] - org.eclipse.om2m.persistence.eclipselink.Activator
Persistence JPA plugin stopped

Btw, I'm running Ubuntu on VMWare virtual machine. Thanks for your answer in advance.
Re: HTTP Error 404 when running om2m on Ubuntu 12.04 [message #1729810 is a reply to message #1729195] Tue, 19 April 2016 09:14 Go to previous messageGo to next message
Francois AissaouiFriend
Messages: 38
Registered: April 2015
Member
Hi

I can see in the log that the CSE is correctly started but after that, a set of plugins are getting stopped (and mainly the http server).
Did you stop manually those plugins through the OSGi command line interface ?

Moreover, you are requesting http://127.0.0.1:8080/api and you do not have to add the "/api" at the end. If you are looking for the web page, go to http://127.0.0.1:8080/webpage
If you are still struggling, take a look at this tutorial http://wiki.eclipse.org/OM2M/one/Starting.
Re: HTTP Error 404 when running om2m on Ubuntu 12.04 [message #1730197 is a reply to message #1729810] Fri, 22 April 2016 09:25 Go to previous messageGo to next message
Wenyuan Hu is currently offline Wenyuan HuFriend
Messages: 2
Registered: April 2016
Junior Member
Hi Francois,

Thank you so much!
Actually I found the reason. It's because I didn't clone and build from scratch on Ubuntu, instead I copied a clone and build version from Windows machine to Ubuntu and did a "mvn clean install".

If I clone and build from scratch on Ubuntu, it runs perfectly.
Re: HTTP Error 404 when running om2m on Ubuntu 12.04 [message #1735854 is a reply to message #1730197] Thu, 23 June 2016 10:20 Go to previous messageGo to next message
Nithyananth Sivasubramanian is currently offline Nithyananth SivasubramanianFriend
Messages: 5
Registered: May 2016
Junior Member
Hi Wenyuan Hu ,

I am getting the same error as you mentioned in the last post. I am using raspberry pi3 model B board. When i tried to clone the entities using "mvn clean install " i am getting below error.

root@raspberrypi:/home/org.eclipse.om2m# mvn clan install
bash: mvn: command not found

Could you please help me to resolve the issue.

Regards
Nithyananth
Re: HTTP Error 404 when running om2m on Ubuntu 12.04 [message #1737175 is a reply to message #1735854] Wed, 06 July 2016 08:47 Go to previous messageGo to next message
Francois AissaouiFriend
Messages: 38
Registered: April 2015
Member
Hi Nithyananth,

Maven is not installed on your raspberry pi.
Install it with the following command: sudo apt-get install maven

Regards,
François
Re: HTTP Error 404 when running om2m on Ubuntu 12.04 [message #1737208 is a reply to message #1737175] Wed, 06 July 2016 12:41 Go to previous message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Dear Nithyananth,

You are not obliged to build the project using raspberry pi since OM2M is based on pure JAVA /OSGi which can run in any JVM.
You can build the project on your machine then simply copy/past the binaries on your raspberry pi and run it.

Regards,
Mahdi
Previous Topic:Building Java Application using OM2M
Next Topic:How to send sensor value to actuator plug-in
Goto Forum:
  


Current Time: Thu Oct 10 23:48:34 GMT 2024

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

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

Back to the top