Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Getting "Gateway Timeout" and "Internal server error" for java callout with RMI Code

Not applicable

Hello,

I am using a java callout with "No-Target" API proxy which calls the RMI code from the java class,and gets the response from RMI server.That response is then returned to the client.

Code snippet ::

System.setProperty("java.security.policy",
                   "file://192.168.xx.xx/C:/Apigee-RMI-Client/security.policy");
System.setProperty("java.rmi.server.codebase",
                   "file://192.168.xx.xx/C:/Apigee-RMI-Server/target/classes/");
System.setSecurityManager(new SecurityManager());
Directory directory = (Directory) Naming
    .lookup("rmi://192.168.xx.xx/ABC");
String[] information = directory.getAdress();           
String response = information[0] + "\n" + information[1];
return response;

when i run this code locally it works. But when i deployed the proxy and tried to invoke the class i get

"Gateway Timeout" then after few hits i was getting "Internal server error" and recently i am getting SERVICE_UNAVAILABLE.

so if java code hit my ip from the apigee environment will it work or not ?

Can anyone suggest some pointers.

Solved Solved
0 3 656
1 ACCEPTED SOLUTION

The code will not work when run in an Edge cloud instance, because the RMI Server is local to your system, and is reachable via a private IP address.

Your Java code on Edge cloud cannot reach your RMI Server.

View solution in original post

3 REPLIES 3