• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI Access Exceptions

 
Ranch Hand
Posts: 99
Postgres Database Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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:

Server Object:



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!

Best,
Al
 
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your client is getting exceptions, then focus on the client.

You should always start with a policy.all file for both the server and client, such as:


Once you get past the security problem, then you can narrow the policy permissions down a bit.

 
Al Johnston
Ranch Hand
Posts: 99
Postgres Database Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


Server Code:



I start the server with the following:



That all starts up fine.

Then I go to the client:

Client Policy File:


Client Code:



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).

Thanks,
Al
 
Al Johnston
Ranch Hand
Posts: 99
Postgres Database Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Best,
Al
 
Al Johnston
Ranch Hand
Posts: 99
Postgres Database Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Best,
Al
 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic