You are not logged in.

#1 2012-06-01 00:15:39

Super-Nathan
Member
Registered: 2012-05-19
Posts: 23
Website

[SOLVED] java socket permission error when outside of LAN

I am kinda a newer server admin, running my own in-home server/media center.

I am trying to use Cambozola to stream a webcam and put it in a webpage. I am using Motion for the webcam server. Motion is up and running fine.

I was searching through Motion's documentation and found this:
http://www.lavrsen.dk/foswiki/bin/view/ … bcamServer
which talks about a Java applet.

I know nothing of Java but I followed the directions here:
http://www.charliemouse.com/code/cambozola/
I installed "ant" and "openjdk-6-jdk" along with all of their dependancies.

I build this SUPER simple website using code from the links

<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>

<applet code=com.charliemouse.cambozola.Viewer
    archive=cambozola.jar width="640" height="480" style="border-width:1; border-color:gr$
    <param name=url value="http://192.168.0.101:8081">
</applet>


</body></html>

Motion works fine on port 8081 from anywhere. So i can go to http://external.ip.address:8081 and I have no problems.

The Cambozola applet works great when i am inside my home network where the server is located. When i am outside my own network (or simulating it using anonymouse.org) I get the following inside the box that would be the webcam.

Security.AccessControlException: access denied (java.net.SocketPermission 192.168.0.101:8081 connect

and the rest of the message was cut off by the box.

I am running behind a generic wireless router and i have all relevant ports forwarded to the server. I thought that it might be a port issue so i forwarded ports 1-10,000 to the server temporarrily to try and nail that down. At the same time i disabled my GUFW firewall.

Still no joy.

Anyhelp?

Last edited by Super-Nathan (2012-06-05 02:33:18)

Offline

#2 2012-06-01 06:35:34

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [SOLVED] java socket permission error when outside of LAN

It's basically just a permission issue on the applet level. Have a look here for some more information (and how you can fix it).


Burninate!

Offline

#3 2012-06-01 09:40:17

Super-Nathan
Member
Registered: 2012-05-19
Posts: 23
Website

Re: [SOLVED] java socket permission error when outside of LAN

If it is permission in the applet how come it works great inside my network?

Offline

#4 2012-06-05 02:32:31

Super-Nathan
Member
Registered: 2012-05-19
Posts: 23
Website

Re: [SOLVED] java socket permission error when outside of LAN

Gcool wrote:

It's basically just a permission issue on the applet level. Have a look here for some more information (and how you can fix it).


AWESOME!

never using Java before i had no idea about permissions. This solved it!

 nano java.net.SocketPermission

in the java security folder. Then

grant {
  permission java.net.SocketPermission
        "localhost:port", 
	"connect, resolve";
};

Offline

Board footer

Powered by FluxBB