I've spent the last two days trying to make this work but am not getting anywhere. I am trying to deploy some RMI objects for testing so that we can move forward with other tasks we want to use RMI for. The problem is that I keep getting java.security.AccessControlException: access denied (java.net.SocketPermission [external_ip:1099] connect,resolve) exceptions. Here is what I've done:
We put a policy file on the server to allow all access. The server starts fine but nothing can get through to it.
Here is the client object which is running on another machine. Incidentally, the server is a test server with nothing more than an IP address for addressing:
RemoteServer and RemoteClient are on two different machines. When I run RemoteClient, I get
My client policy file looks like this:
Can someone please help me figure this out? Thanks so much!
Thanks so much for the help. I tried to set a policy file for my client as policy.all. I have now tested on two different servers. The test server is new so I tried it on the production server hoping that maybe something would go right there that is not happening for me on the test server. On the test server, I was able to get timeout errors. On the production server, I no longer get a connect access error, but I get a resolve access error.
Here are my latest files:
Server Policy File
I start the server with the following:
That all starts up fine.
Then I go to the client:
Client Policy File:
When I run the client, I get:
The difference being that now instead of a "connect, resolve", I'm just getting a resolve error. Either way, setting my policy to all permissions has not solved my problem. Incidentally, I've tried changing the name of the server from the URL to the actual IP and still have the same problem (although sometimes that gives me a "connect, resolve" error). I also get back the internal address of the server in my error list depending on which server I'm calling. For instance, on the test server, I asked for the resource at 64.68.... and got back a could not connect to 192.168... (the internal address of the server I was calling).
I still have the same problem. I have verified that all ports are open. When I set the server name value with the -Djava flag to our web domain address and set the name of my client as the same and run the client, I am getting a resolve error. When I change both to the IP address of the server, I get a connect resolve error. Has anyone else ever had this issue? Thanks for any help you can give.
I'm not going to mark this as resolved because it's not. But, I think I've figured out the problem if I can get my network guys to do what they need to do. I changed the client to name = "localHost" and ran it on the same server as the RMI server. I got some errors, but confirmed that it's working. I'll start a new thread for the errors as I think that's a problem with my design that will probably be easier to answer. Thanks to any who read this and pondered it and for the responses I got.
What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
a bit of art, as a gift, the permaculture playing cards