NetworkError: 500 Internal Server Error - http://localhost:8080/helloworld

872 views
Skip to first unread message

cherish...@gmail.com

unread,
Feb 20, 2015, 7:28:58 AM2/20/15
to kur...@googlegroups.com
Deal all,

I am trying to run HelloWorld program on kurento server, but stuck on this error , Please take a look of server log and attached file (Error in browser ).

17:24:35.727 [HelloWorldApp.main()] INFO  - o.k.tutorial.helloworld.HelloWorldApp    - Starting HelloWorldApp on kurento with PID 10044 (/home/kms/Documents/kurento-tutorial-java/kurento-hello-world/target/classes started by kms in /home/kms/Documents/kurento-tutorial-java/kurento-hello-world)
17:24:35.730 [HelloWorldApp.main()] DEBUG - o.k.tutorial.helloworld.HelloWorldApp    - Running with Spring Boot v1.2.0.RELEASE, Spring v4.1.3.RELEASE
17:24:36.523 [HelloWorldApp.main()] INFO  - o.h.validator.internal.util.Version      - HV000001: Hibernate Validator 5.1.3.Final
17:24:37.933 [HelloWorldApp.main()] DEBUG - org.kurento.client.KurentoClient         - Connecting to kms in uri ws://localhost:9091/kurento
17:24:38.332 [HelloWorldApp.main()] INFO  - o.k.tutorial.helloworld.HelloWorldApp    - Started HelloWorldApp in 2.78 seconds (JVM running for 6.923)
17:25:34.254 [http-nio-8080-exec-8] ERROR - o.a.c.c.C.[.[.[/].[dispatcherServlet]    - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.kurento.commons.exception.KurentoException: Exception connecting to WebSocket server] with root cause
org.eclipse.jetty.websocket.api.UpgradeException: Didn't switch protocols
    at org.eclipse.jetty.websocket.client.io.UpgradeConnection.validateResponse(UpgradeConnection.java:277) ~[websocket-client-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.websocket.client.io.UpgradeConnection.read(UpgradeConnection.java:205) ~[websocket-client-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.websocket.client.io.UpgradeConnection.onFillable(UpgradeConnection.java:150) ~[websocket-client-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) ~[jetty-io-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:620) ~[jetty-util-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:540) ~[jetty-util-9.2.5.v20141112.jar:9.2.5.v20141112]
    at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]

Thank you
2015-02-20-174311_1366x768_scrot.png

Ivan Gracia

unread,
Feb 24, 2015, 5:28:49 AM2/24/15
to Kurento Public
Which version of the tutorials are you running? I take it you client, Java app and KMS all live in the same machine, is that correct?

Ivan Gracia



--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Santosh Shingare

unread,
Feb 24, 2015, 7:30:24 AM2/24/15
to kur...@googlegroups.com
Hello Ivan,

I am executing this commands
git clone https://github.com/Kurento/kurento-tutorial-java.git
cd kurento-tutorial-java/kurento-hello-world
mvn compile exec:java
My Java app and KMS all runing in the same machine, I got error, when I check in firebug console "POST http://localhost:8080/helloworld".  I try to execute this url POST http://localhost:8080/helloworld in browser so got 

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Feb 24 12:49:22 IST 2015
There was an unexpected error (type=Method Not Allowed, status=405).
Request method 'GET' not supported

Can you tell me whats going wrong

Thank you

Ivan Gracia

unread,
Feb 24, 2015, 8:39:09 AM2/24/15
to Kurento Public
Ok, I see now. That version of the tutorials points to an invalid adapter.js location, which changed a while ago. Please execute this command

git checkout origin/develop

in the kurento-tutorial-java folder, so you have the latest code, where this has been fixed. After that, you can just cd to the appropriate folder, and mvn compile exec:java 

Cheers,

Ivan Gracia



--

Santosh Shingare

unread,
Feb 25, 2015, 12:52:02 AM2/25/15
to kur...@googlegroups.com
Hello Ivan,

Thank you for your help and support, I execute command  this command
git checkout origin/develop and then compile and execute source mvn compile exec:java

I got same error, in browser. console log is

kms@kurento:~/Documents/kurento-tutorial-java/kurento-hello-world$ mvn compile exec:java
[INFO] Scanning for projects...
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building Kurento Java Tutorial 1 - Hello World 5.1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.3.2:exec (default) @ kurento-hello-world ---
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ kurento-hello-world ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 240 resources
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ kurento-hello-world ---
[INFO] Compiling 1 source file to /home/kms/Documents/kurento-tutorial-java/kurento-hello-world/target/classes
[INFO]
[INFO] --- exec-maven-plugin:1.3.2:java (default-cli) @ kurento-hello-world ---
[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.

   .------------------------------------.
   |                                    |
   |   | |/ /  _ _ _ ___ _ _| |_ ___    |
   |   | ' < || | '_/ -_) ' \  _/ _ \   |
   |   |_|\_\_,_|_| \___|_||_\__\___/   |
   |                                    |
   '------------------------------------'
       Kurento Java Tutorial 1 - Hello World
       Version 5.1.1-SNAPSHOT

10:56:50.316 [HelloWorldApp.main()] INFO  - o.k.tutorial.helloworld.HelloWorldApp    - Starting HelloWorldApp on kurento with PID 7082 (/home/kms/Documents/kurento-tutorial-java/kurento-hello-world/target/classes started by kms in /home/kms/Documents/kurento-tutorial-java/kurento-hello-world)
10:56:50.318 [HelloWorldApp.main()] DEBUG - o.k.tutorial.helloworld.HelloWorldApp    - Running with Spring Boot v1.2.0.RELEASE, Spring v4.1.3.RELEASE
10:56:51.212 [HelloWorldApp.main()] INFO  - o.h.validator.internal.util.Version      - HV000001: Hibernate Validator 5.1.3.Final
10:56:52.702 [HelloWorldApp.main()] DEBUG - org.kurento.client.KurentoClient         - Connecting to kms in uri ws://localhost:8888/kurento
10:56:53.110 [HelloWorldApp.main()] INFO  - o.k.tutorial.helloworld.HelloWorldApp    - Started HelloWorldApp in 2.986 seconds (JVM running for 7.765)
10:57:11.246 [http-nio-8080-exec-4] ERROR - o.a.c.c.C.[.[.[/].[dispatcherServlet]    - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.kurento.commons.exception.KurentoException: Exception connecting to WebSocket server] with root cause
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_55]
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_55]
    at org.eclipse.jetty.io.SelectorManager.finishConnect(SelectorManager.java:340) ~[jetty-io-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.io.SelectorManager$ManagedSelector.processConnect(SelectorManager.java:671) ~[jetty-io-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.io.SelectorManager$ManagedSelector.processKey(SelectorManager.java:640) ~[jetty-io-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:607) ~[jetty-io-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:545) ~[jetty-io-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.util.thread.NonBlockingThread.run(NonBlockingThread.java:52) ~[jetty-util-9.2.5.v20141112.jar:9.2.5.v20141112]

    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:620) ~[jetty-util-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:540) ~[jetty-util-9.2.5.v20141112.jar:9.2.5.v20141112]
    at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]

Not working, Can you tell me what is problem.


Thank you




On Friday, February 20, 2015 at 5:58:58 PM UTC+5:30, Santosh Shingare wrote:

Santosh Shingare

unread,
Feb 25, 2015, 3:56:56 AM2/25/15
to kur...@googlegroups.com
Can you tell me, Why he give error  org.eclipse.jetty.websocket.api.UpgradeException: Didn't switch protocols

14:19:20.791 [HelloWorldApp.main()] INFO  - o.k.tutorial.helloworld.
HelloWorldApp    - Starting HelloWorldApp on kurento with PID 7886 (/home/kms/Documents/kurento-tutorial-java/kurento-hello-world/target/classes started by kms in /home/kms/Documents/kurento-tutorial-java/kurento-hello-world)
14:19:20.793 [HelloWorldApp.main()] DEBUG - o.k.tutorial.helloworld.HelloWorldApp    - Running with Spring Boot v1.2.0.RELEASE, Spring v4.1.3.RELEASE
14:19:21.654 [HelloWorldApp.main()] INFO  - o.h.validator.internal.util.Version      - HV000001: Hibernate Validator 5.1.3.Final
14:19:23.098 [HelloWorldApp.main()] DEBUG - org.kurento.client.KurentoClient         - Connecting to kms in uri ws://localhost:9091/kurento
14:19:23.484 [HelloWorldApp.main()] INFO  - o.k.tutorial.helloworld.HelloWorldApp    - Started HelloWorldApp in 2.873 seconds (JVM running for 7.438)
14:19:38.266 [http-nio-8080-exec-2] ERROR - o.a.c.c.C.[.[.[/].[dispatcherServlet]    - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.kurento.commons.exception.KurentoException: Exception connecting to WebSocket server] with root cause

org.eclipse.jetty.websocket.api.UpgradeException: Didn't switch protocols
    at org.eclipse.jetty.websocket.client.io.UpgradeConnection.validateResponse(UpgradeConnection.java:277) ~[websocket-client-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.websocket.client.io.UpgradeConnection.read(UpgradeConnection.java:205) ~[websocket-client-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.websocket.client.io.UpgradeConnection.onFillable(UpgradeConnection.java:150) ~[websocket-client-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) ~[jetty-io-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:620) ~[jetty-util-9.2.5.v20141112.jar:9.2.5.v20141112]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:540) ~[jetty-util-9.2.5.v20141112.jar:9.2.5.v20141112]
    at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]







On Friday, February 20, 2015 at 5:58:58 PM UTC+5:30, Santosh Shingare wrote:

Ivan Gracia

unread,
Feb 26, 2015, 4:45:28 AM2/26/15
to Kurento Public
Do you see any error in the client?

Ivan Gracia



--

Santosh Shingare

unread,
Feb 26, 2015, 5:11:15 AM2/26/15
to kur...@googlegroups.com
Yes , My local stream (Webrtc) capturing my video, but dint get any stream from KMS.
I checked in firebug, I got following error.
NetworkError: 500 Internal Server Error - http://localhost:8080/helloworld


On Friday, February 20, 2015 at 5:58:58 PM UTC+5:30, Santosh Shingare wrote:

Ivan Gracia

unread,
Mar 1, 2015, 5:05:15 PM3/1/15
to Kurento Public
I see in your logs that you are trying to connect to a KMS in ws://localhost:9091/kurento. Have you changed the settings from the default installation? By default, KMS deploys in ws://localhost:8888/kurento. Here is the giveaway line in your log.

14:19:23.098 [HelloWorldApp.main()] DEBUG - org.kurento.client.KurentoClient         - Connecting to kms in uri ws://localhost:9091/kurento

Ivan Gracia



--

Santosh Shingare

unread,
Mar 2, 2015, 12:45:40 AM3/2/15
to kur...@googlegroups.com
No, I dint change any setting from default setting. By default kurento run on 9090 | 9091 in my system. Please check following attached file it indicate that where KMS run.



On Friday, February 20, 2015 at 5:58:58 PM UTC+5:30, Santosh Shingare wrote:
2015-03-02-103139_1366x768_scrot.png
2015-03-02-111154_1366x768_scrot.png

Ivan Gracia

unread,
Mar 2, 2015, 2:50:50 AM3/2/15
to Kurento Public
If that's your configuration file, it seems to me like you are using a really old version of Kurento. At that time, we were using Thrift as transport, so no wonder you can't connect with a websocket to that port ;-) Please update your KMS instance to the latest version. Also, bear in mind that major versions of libraries and KMS must match (i.e kurento-tutorials v5 expects a KMS with v5), and that compatibility between different major version numbers is not assured.

Updating your KMS to v5 should make that work. Don't forget to change the connection port in your client to 8888.

Ivan Gracia



--

Santosh Shingare

unread,
Mar 2, 2015, 12:21:03 PM3/2/15
to kur...@googlegroups.com
Ivan,
Thank for support, and support,
Yes !! Its running now :D 



On Friday, February 20, 2015 at 5:58:58 PM UTC+5:30, Santosh Shingare wrote:
Reply all
Reply to author
Forward
0 new messages