Client on different Machine - No route to host
Hi,
I'm pretty much frustrated right now. I try to get the following running for more than days now, hopefully someone can help me, since it seems to be a quite simple problem:
I have a Client/Server RMI Application, to make my first steps with RMI.
First I defined the Interface Server.java:
import java.rmi.*;
public interface Server extends Remote
int getValue() throws RemoteException;
then I implented the Server (ServerImpl.java):
import java.util.*;
import java.rmi.server.*;
import java.rmi.RemoteException;
public class ServerImpl extends UnicastRemoteObject implements Server
private int value;
public ServerImpl() throws RemoteException
this.value = 3;
public int getValue() throws RemoteException
return this.value;
and a process which uses it (ServerProc.java):
import java.rmi.*;
import java.rmi.registry.*;
import java.rmi.server.UnicastRemoteObject;
class ServerProc
public static void main (String args [])
if(System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
try {
ServerImpl obj = new ServerImpl();
Naming.rebind("rmi://localhost/Server",obj);
}catch (Exception e){
System.out.println(e);
My Client is as follows (Client.java):
import java.rmi.*;
class Client
public static void main(String args [])
Server server;
try {
server = (Server)Naming.lookup("rmi://192.168.0.1/Server");
System.out.println(server.getValue());
}catch(Exception e){
System.out.println(e);
The Server is on the machine with IP 192.168.0.1 and the Client on the Machine 192.168.0.15. (both XP SP2)
I compiled the sercer code with "javac ServerProc.java" und afterwards did "rmic ServerImpl"
then I run the rmiregistry with "start rmiregistry" und the server with "java -Djava.security.policy=java.policy ServerProc"
The policy file is the following:
grant{
permission java.security.AllPermission;
Then I compiled the Clientcode on the client to which I first copied the "Server.class" and "ServerImpl_Stub.class" Files and then did "javac Client.java"
And run the Client with "java Client".
THen the following exception appears:
java.rmi.ConnectIOException: Exception creating connection to: 192.168.120.254;
nested exception is:
java.net.NoRouteToHostException: No route to host: connect
I don't know where this IP adress comes from, but when I run the same client on the server machine It works without problems. I have no clue what to do.
Can someone help me please. That would be great.
Thanks in advance
Ben
i feel your pain same happen to me all i can advise
is to lose the " System.setSecurityManager(new
RMISecurityManager());
if you don't call it it will revert to the default
one.No it doesn't, it reverts to no security manager, and absence of stubs wouldn't cause NoRouteToHost either.
Your problem seem to be either a DNS problem where the server host doesn't know its own IP address or else it has > 1 NIC and an inconvenient choice is being made between them. In case 1, fix the DNS; in case 2, set -Djava.rmi.server.hostname to the desired IP address in the server JVM.
Similar Messages
-
Oracle 10g EE Windows Client on different machine than Pracle 10g EE server
I downloaded the Oracle 10g EE Windows Client and installed it on a WinXP (SP3) machine that had no Oracle components installed. The idea was to use it to connect to an Oracle 10g EE database running on another machine on the network.
After installing the software, what I find in the start menu is:
Oracle Client 10g Express Edition
- Go To Online Forum
- Read Documentation
- Register For Online Forum
- Run SQL Command Line
When I "Read Documentation" and go to the "Getting Started" link it talks about other menu options which I can't find ("Go To Database Home Page").
Clearly something isn't working here, but what?
PeteThis option is available on server. Not on client.
Use following link instead:
http://<server_ip_address>:8080/apex/ -
How to run client from other machine in ejb
Please help me this problem .
When i run on local . Every thing is ok .
But when i run from different machine , it not work .
Although , i hava changed jnp://localhost:1099 to jnp:/xxx.xxx.xxx:1099 , xxx... this is my ipaddress .
I am using : net bean 6.9 , j2ee 1.4 , jboss application server 4.2.3GA
Thanks allThanks jverd and gimbal2 helped me .
I hava just write the small programme "Hello word "
This is my code .
I create EJB module : invokes : hello.java , helloRemote.java , helloRemoteHome.java .
hello.java*
package demo;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
+public class hello implements SessionBean {+
private SessionContext context;
+public void setSessionContext(SessionContext aContext) {+
context = aContext;
+}+
+public void ejbActivate() {+
+}+
+public void ejbPassivate() {+
+}+
+public void ejbRemove() {+
+}+
+public void ejbCreate() {+
+}+
+public String getMessage() {+
return "hello word";
+}+
+}+
helloRemote.java*
package demo;
import java.rmi.RemoteException;
import javax.ejb.EJBObject;
+public interface helloRemote extends EJBObject {+
String getMessage() throws RemoteException;
+}+
helloRemoteHome.java*
package demo;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
+public interface helloRemoteHome extends EJBHome {+
demo.helloRemote create() throws CreateException, RemoteException;
+}+
ejb-jar.xml*
+<?xml version="1.0" encoding="UTF-8"?>+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">+
+<display-name>helloword</display-name>+
+<enterprise-beans>+
+<session>+
+<display-name>helloSB</display-name>+
+<ejb-name>hello</ejb-name>+
+<home>demo.helloRemoteHome</home>+
+<remote>demo.helloRemote</remote>+
+<ejb-class>demo.hello</ejb-class>+
+<session-type>Stateless</session-type>+
+<transaction-type>Container</transaction-type>+
+</session>+
+</enterprise-beans>+
+<assembly-descriptor>+
+<container-transaction>+
+<method>+
+<ejb-name>hello</ejb-name>+
+<method-name>*</method-name>+
+</method>+
+<trans-attribute>Required</trans-attribute>+
+</container-transaction>+
+</assembly-descriptor>+
+</ejb-jar>+
And now , from diffrent machine . I created the web application . I have added "hello.jar" into web application .
After , i create one servlet to call getMessage method .
This is the code :
test.java*
package demo;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.naming.Context;
import javax.naming.InitialContext;
+public class test extends HttpServlet {+
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+throws ServletException, IOException {+
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
+try {+
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
System.setProperty(Context.PROVIDER_URL,"localhost:1099");//i hava changed localhost to my ipaddress . xxx.xxx.xxx:1099
InitialContext cxt=new InitialContext();
Object obj=cxt.lookup("hello");
helloRemoteHome home=(helloRemoteHome)obj;
helloRemote helloObj=home.create();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet test</title>");
out.println("</head>");
out.println("<body>");
out.println("Servlet test at " helloObj.getMessage());+
out.println("</body>");
out.println("</html>");
+}+
catch(Exception ex)
+{+
+}+
+finally {+
out.close();
+}+
+}+
protected void doGet(HttpServletRequest request, HttpServletResponse response)
+throws ServletException, IOException {+
processRequest(request, response);
+}+
protected void doPost(HttpServletRequest request, HttpServletResponse response)
+throws ServletException, IOException {+
processRequest(request, response);
+}+
+public String getServletInfo() {+
return "Short description";
+}// </editor-fold>+
+}+
The result when i run on local : hello word
But when i run the client from different machine , the result is : nothing appear . -
VPN Client can't reach router or hosts, but can reach other connected sites.
We have a VPN client configuration on a 2901 router. The client passes authentication and connects fine. When connected, cannot reach the 2901 or any devices directly behind it, BUT can reach routers and hosts that are connected to the same 2901 through site to site connections.
Few notes:
I have added some lines excluding NAT in a few different ways, but does not resolve.
I have switched the RAP rool from 10.96.20.x to 172.21.20.x and can then connect to the local host. Appears to be a routing issue to the 10.x network, but I can't seem to find the solution.
Any help would be greatly appreciated. Here is the config:
boot-start-marker
boot system flash
boot system flash:c2900-universalk9-mz.SPA.153-2.T.bin
no ip domain lookup
ip inspect log drop-pkt
ip inspect name FIREWALL tcp
ip inspect name FIREWALL udp
ip inspect name FIREWALL ftp
ip inspect name FIREWALL fragment maximum 256 timeout 1
ip inspect name FIREWALL ntp
ip inspect name FIREWALL pptp
ip inspect name FIREWALL dns
ip inspect name FIREWALL l2tp
ip inspect name FIREWALL pop3
ip inspect name FIREWALL icmp router-traffic
no ipv6 cef
crypto isakmp policy 1
encr aes
authentication pre-share
group 2
crypto isakmp policy 5
encr 3des
authentication pre-share
group 2
crypto isakmp policy 10
encr 3des
hash md5
authentication pre-share
group 2
crypto isakmp policy 95
authentication pre-share
group 2
crypto isakmp policy 99
hash md5
authentication pre-share
group 2
crypto isakmp policy 110
hash md5
authentication pre-share
crypto isakmp client configuration group VPN-RAS
key *********
dns 10.96.17.2 10.1.200.50
wins 10.96.17.2 10.1.200.50
domain mine.com
pool RAPOOL
acl SPLIT
save-password
split-dns mind.com
netmask 255.255.255.0
crypto isakmp profile USERS
match identity group VPN-RAS
client authentication list DOMAIN
isakmp authorization list VPN-RAS
client configuration address respond
keepalive 300 retry 5
crypto ipsec transform-set AES128 esp-aes esp-sha-hmac
mode tunnel
crypto ipsec transform-set 3DES esp-3des esp-sha-hmac
mode tunnel
crypto ipsec transform-set DES esp-des esp-md5-hmac
mode tunnel
crypto ipsec transform-set 3DES-MD5 esp-3des esp-md5-hmac
mode tunnel
crypto ipsec transform-set DES-SHA esp-des esp-sha-hmac
mode tunnel
crypto ipsec transform-set myset esp-3des esp-sha-hmac
mode tunnel
crypto dynamic-map dynmap 1
set transform-set AES128
set isakmp-profile USERS
crypto map COMPANY_VPN 10 ipsec-isakmp
set peer *******
set transform-set 3DES-MD5
match address PA-VPN
qos pre-classify
crypto map COMPANY_VPN 50 ipsec-isakmp
set peer ******
set transform-set AES128
match address VPN
qos pre-classify
crypto map COMPANY_VPN 999 ipsec-isakmp dynamic dynmap
interface Embedded-Service-Engine0/0
no ip address
shutdown
interface GigabitEthernet0/0
ip address 37.222.111.224 255.255.255.248
ip access-group INBOUND in
no ip redirects
no ip unreachables
no ip proxy-arp
ip verify unicast reverse-path
ip flow ingress
ip flow egress
ip nat outside
ip inspect FIREWALL out
ip virtual-reassembly in
duplex auto
speed auto
no cdp enable
no mop enabled
crypto map COMPANY_VPN
interface GigabitEthernet0/1
no ip address
ip flow ingress
duplex auto
speed auto
interface GigabitEthernet0/1.17
description LAN
encapsulation dot1Q 17
ip address 10.96.17.253 255.255.255.0
ip access-group OUTBOUND in
ip flow ingress
ip flow egress
ip nat inside
ip virtual-reassembly in
standby 0 ip 10.96.17.254
standby 0 priority 110
standby 0 preempt
standby 0 track 1 decrement 20
interface GigabitEthernet0/1.27
description VOICE
encapsulation dot1Q 27
ip address 192.168.17.254 255.255.255.0
ip access-group OUTBOUND in
ip helper-address 10.96.17.2
ip flow ingress
ip nat inside
ip virtual-reassembly in
h323-gateway voip bind srcaddr 192.168.17.254
ip local pool RAPOOL 10.96.20.50 10.96.20.150
ip forward-protocol nd
ip nat inside source route-map NAT-POOL interface GigabitEthernet0/0 overload
ip route 0.0.0.0 0.0.0.0 37.222.111.223
ip route 10.96.16.0 255.255.255.0 10.96.17.250
ip route 172.22.1.0 255.255.255.0 10.96.17.250
ip route 172.22.2.0 255.255.255.0 10.96.17.250
ip route 172.22.3.0 255.255.255.0 10.96.17.250
ip route 192.168.16.0 255.255.255.0 10.96.17.250
ip access-list extended DMZ
deny ip any 10.0.0.0 0.255.255.255
deny ip any 192.168.0.0 0.0.255.255
permit ip any any
ip access-list extended GUEST
deny ip any 10.0.0.0 0.255.255.255
deny ip any 192.168.0.0 0.0.255.255
permit ip any any
ip access-list extended INBOUND
deny ip 80.25.124.0 0.0.0.255 any
deny ip 10.0.0.0 0.255.255.255 any
deny ip 172.16.0.0 0.15.255.255 any
permit udp host 173.239.147.114 any eq isakmp
permit esp host 173.239.147.114 any
deny ip 192.168.0.0 0.0.255.255 any
permit udp any host 37.222.111.224 eq isakmp
permit udp any host 37.222.111.224 eq non500-isakmp
permit esp any host 37.222.111.224
ip access-list extended NAT
deny ip 10.96.20.0 0.0.0.255 any
deny ip any 10.96.20.0 0.0.0.255
permit ip 192.168.0.0 0.0.255.255 any
permit ip 10.0.0.0 0.255.255.255 any
ip access-list extended NONAT
permit ip any 192.168.0.0 0.0.255.255
permit ip any 10.0.0.0 0.255.255.255
ip access-list extended OUTBOUND
deny udp any host 22.55.77.106 eq isakmp
deny udp any host 22.55.77.106 eq non500-isakmp
deny esp any host 22.55.77.106
permit ip any any
ip access-list extended PA-VPN
permit ip 10.0.0.0 0.255.255.255 10.96.18.0 0.0.0.255
permit ip 10.0.0.0 0.255.255.255 192.168.18.0 0.0.0.255
permit ip 192.168.0.0 0.0.255.255 10.96.18.0 0.0.0.255
permit ip 192.168.0.0 0.0.255.255 192.168.18.0 0.0.0.255
ip access-list extended SPLIT
permit ip 10.0.0.0 0.255.255.255 any
permit ip 192.168.0.0 0.0.255.255 any
ip access-list extended VPN
permit ip 10.96.16.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 10.96.17.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 10.96.18.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 10.96.0.0 0.0.255.255 192.168.0.0 0.0.255.255
permit ip 10.96.0.0 0.0.255.255 10.0.0.0 0.255.255.255
permit ip 192.168.16.0 0.0.0.255 192.168.0.0 0.0.255.255
permit ip 192.168.17.0 0.0.0.255 192.168.0.0 0.0.255.255
permit ip 192.168.18.0 0.0.0.255 192.168.0.0 0.0.255.255
permit ip 192.168.17.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 192.168.18.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 172.22.0.0 0.0.255.255 10.0.0.0 0.255.255.255
permit ip 172.22.0.0 0.0.255.255 192.168.0.0 0.0.255.255
route-map NAT-POOL deny 5
match ip address NONAT
route-map NAT-POOL permit 10
match ip address NATWe have a VPN client configuration on a 2901 router. The client passes authentication and connects fine. When connected, cannot reach the 2901 or any devices directly behind it, BUT can reach routers and hosts that are connected to the same 2901 through site to site connections.
Few notes:
I have added some lines excluding NAT in a few different ways, but does not resolve.
I have switched the RAP rool from 10.96.20.x to 172.21.20.x and can then connect to the local host. Appears to be a routing issue to the 10.x network, but I can't seem to find the solution.
Any help would be greatly appreciated. Here is the config:
boot-start-marker
boot system flash
boot system flash:c2900-universalk9-mz.SPA.153-2.T.bin
no ip domain lookup
ip inspect log drop-pkt
ip inspect name FIREWALL tcp
ip inspect name FIREWALL udp
ip inspect name FIREWALL ftp
ip inspect name FIREWALL fragment maximum 256 timeout 1
ip inspect name FIREWALL ntp
ip inspect name FIREWALL pptp
ip inspect name FIREWALL dns
ip inspect name FIREWALL l2tp
ip inspect name FIREWALL pop3
ip inspect name FIREWALL icmp router-traffic
no ipv6 cef
crypto isakmp policy 1
encr aes
authentication pre-share
group 2
crypto isakmp policy 5
encr 3des
authentication pre-share
group 2
crypto isakmp policy 10
encr 3des
hash md5
authentication pre-share
group 2
crypto isakmp policy 95
authentication pre-share
group 2
crypto isakmp policy 99
hash md5
authentication pre-share
group 2
crypto isakmp policy 110
hash md5
authentication pre-share
crypto isakmp client configuration group VPN-RAS
key *********
dns 10.96.17.2 10.1.200.50
wins 10.96.17.2 10.1.200.50
domain mine.com
pool RAPOOL
acl SPLIT
save-password
split-dns mind.com
netmask 255.255.255.0
crypto isakmp profile USERS
match identity group VPN-RAS
client authentication list DOMAIN
isakmp authorization list VPN-RAS
client configuration address respond
keepalive 300 retry 5
crypto ipsec transform-set AES128 esp-aes esp-sha-hmac
mode tunnel
crypto ipsec transform-set 3DES esp-3des esp-sha-hmac
mode tunnel
crypto ipsec transform-set DES esp-des esp-md5-hmac
mode tunnel
crypto ipsec transform-set 3DES-MD5 esp-3des esp-md5-hmac
mode tunnel
crypto ipsec transform-set DES-SHA esp-des esp-sha-hmac
mode tunnel
crypto ipsec transform-set myset esp-3des esp-sha-hmac
mode tunnel
crypto dynamic-map dynmap 1
set transform-set AES128
set isakmp-profile USERS
crypto map COMPANY_VPN 10 ipsec-isakmp
set peer *******
set transform-set 3DES-MD5
match address PA-VPN
qos pre-classify
crypto map COMPANY_VPN 50 ipsec-isakmp
set peer ******
set transform-set AES128
match address VPN
qos pre-classify
crypto map COMPANY_VPN 999 ipsec-isakmp dynamic dynmap
interface Embedded-Service-Engine0/0
no ip address
shutdown
interface GigabitEthernet0/0
ip address 37.222.111.224 255.255.255.248
ip access-group INBOUND in
no ip redirects
no ip unreachables
no ip proxy-arp
ip verify unicast reverse-path
ip flow ingress
ip flow egress
ip nat outside
ip inspect FIREWALL out
ip virtual-reassembly in
duplex auto
speed auto
no cdp enable
no mop enabled
crypto map COMPANY_VPN
interface GigabitEthernet0/1
no ip address
ip flow ingress
duplex auto
speed auto
interface GigabitEthernet0/1.17
description LAN
encapsulation dot1Q 17
ip address 10.96.17.253 255.255.255.0
ip access-group OUTBOUND in
ip flow ingress
ip flow egress
ip nat inside
ip virtual-reassembly in
standby 0 ip 10.96.17.254
standby 0 priority 110
standby 0 preempt
standby 0 track 1 decrement 20
interface GigabitEthernet0/1.27
description VOICE
encapsulation dot1Q 27
ip address 192.168.17.254 255.255.255.0
ip access-group OUTBOUND in
ip helper-address 10.96.17.2
ip flow ingress
ip nat inside
ip virtual-reassembly in
h323-gateway voip bind srcaddr 192.168.17.254
ip local pool RAPOOL 10.96.20.50 10.96.20.150
ip forward-protocol nd
ip nat inside source route-map NAT-POOL interface GigabitEthernet0/0 overload
ip route 0.0.0.0 0.0.0.0 37.222.111.223
ip route 10.96.16.0 255.255.255.0 10.96.17.250
ip route 172.22.1.0 255.255.255.0 10.96.17.250
ip route 172.22.2.0 255.255.255.0 10.96.17.250
ip route 172.22.3.0 255.255.255.0 10.96.17.250
ip route 192.168.16.0 255.255.255.0 10.96.17.250
ip access-list extended DMZ
deny ip any 10.0.0.0 0.255.255.255
deny ip any 192.168.0.0 0.0.255.255
permit ip any any
ip access-list extended GUEST
deny ip any 10.0.0.0 0.255.255.255
deny ip any 192.168.0.0 0.0.255.255
permit ip any any
ip access-list extended INBOUND
deny ip 80.25.124.0 0.0.0.255 any
deny ip 10.0.0.0 0.255.255.255 any
deny ip 172.16.0.0 0.15.255.255 any
permit udp host 173.239.147.114 any eq isakmp
permit esp host 173.239.147.114 any
deny ip 192.168.0.0 0.0.255.255 any
permit udp any host 37.222.111.224 eq isakmp
permit udp any host 37.222.111.224 eq non500-isakmp
permit esp any host 37.222.111.224
ip access-list extended NAT
deny ip 10.96.20.0 0.0.0.255 any
deny ip any 10.96.20.0 0.0.0.255
permit ip 192.168.0.0 0.0.255.255 any
permit ip 10.0.0.0 0.255.255.255 any
ip access-list extended NONAT
permit ip any 192.168.0.0 0.0.255.255
permit ip any 10.0.0.0 0.255.255.255
ip access-list extended OUTBOUND
deny udp any host 22.55.77.106 eq isakmp
deny udp any host 22.55.77.106 eq non500-isakmp
deny esp any host 22.55.77.106
permit ip any any
ip access-list extended PA-VPN
permit ip 10.0.0.0 0.255.255.255 10.96.18.0 0.0.0.255
permit ip 10.0.0.0 0.255.255.255 192.168.18.0 0.0.0.255
permit ip 192.168.0.0 0.0.255.255 10.96.18.0 0.0.0.255
permit ip 192.168.0.0 0.0.255.255 192.168.18.0 0.0.0.255
ip access-list extended SPLIT
permit ip 10.0.0.0 0.255.255.255 any
permit ip 192.168.0.0 0.0.255.255 any
ip access-list extended VPN
permit ip 10.96.16.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 10.96.17.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 10.96.18.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 10.96.0.0 0.0.255.255 192.168.0.0 0.0.255.255
permit ip 10.96.0.0 0.0.255.255 10.0.0.0 0.255.255.255
permit ip 192.168.16.0 0.0.0.255 192.168.0.0 0.0.255.255
permit ip 192.168.17.0 0.0.0.255 192.168.0.0 0.0.255.255
permit ip 192.168.18.0 0.0.0.255 192.168.0.0 0.0.255.255
permit ip 192.168.17.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 192.168.18.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 172.22.0.0 0.0.255.255 10.0.0.0 0.255.255.255
permit ip 172.22.0.0 0.0.255.255 192.168.0.0 0.0.255.255
route-map NAT-POOL deny 5
match ip address NONAT
route-map NAT-POOL permit 10
match ip address NAT -
RMI client running from different machine giving error
HI all
I am trying to run the sample application getStart hello world.
I am able to run the java applet from the same machine ....
but i am get error when i am trying run client applet from the different machine .
(HelloApplet exception: access denied (java.net.SocketPermission)
client applet on machine1 and server and registory on machine2 in same lan .
i copied the Helloapplet.class and Helloclient.html to machine1.
appletviewer Helloclient.html
but the java version is different in both machines.......
can any one give some idea ....
the errror i am geting is :
HelloApplet exception: access denied (java.net.SocketPermission Neind-ws-003 res
olve)
java.security.AccessControlException: access denied (java.net.SocketPermission N
eind-ws-003 resolve)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1042)
at java.net.InetAddress.getAllByName0(InetAddress.java:559)
at java.net.InetAddress.getAllByName0(InetAddress.java:540)
at java.net.InetAddress.getByName(InetAddress.java:449)
at java.net.Socket.<init>(Socket.java:100)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:25)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:120)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at examples.hello.HelloApplet.init(HelloApplet.java:23)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
The helloapplet.java code is :
package examples.hello;
import java.applet.Applet;
import java.awt.Graphics;
import java.rmi.Naming;
import java.rmi.RemoteException;
public class HelloApplet extends Applet {
String message = "blank";
// "obj" is the identifier that we'll use to refer
// to the remote object that implements the "Hello"
// interface
Hello obj = null;
public void init() {
try {
System.out.println("Path looking: " +getCodeBase().getHost());
//obj = (Hello)Naming.lookup("//" +
// getCodeBase().getHost() + "/HelloServer");
obj = (Hello)Naming.lookup("//Neind-ws-003/HelloServer");
message = obj.sayHello();
} catch (Exception e) {
System.out.println("HelloApplet exception: " +
e.getMessage());
e.printStackTrace();
public void paint(Graphics g) {
g.drawString(message, 25, 50);
The helloclient.html code:
<HTML>
<title>Hello World</title>
<center> <h1>Hello World</h1> </center>
The message from the HelloServer is:
<p>
<applet
code="examples.hello.HelloApplet"
width=500 height=120>
</applet>
</HTML>Your problem is at the following line.
obj = (Hello)Naming.lookup("//Neind-ws-003/HelloServer");
The line you had commented beforehand is
//obj = (Hello)Naming.lookup("//" +
// getCodeBase().getHost() + "/HelloServer");
This worked because the applet was being retreived from the same server where the RMI server exists.
Remember, applets can only connect themselfs to the same host they are stored in and retreived from. This is because of VM, the sandbox does not allow you to connect to other machines other than the server where it resides on. If you use a applet viewer it might work if you loosen the security features. On a browser i do not belive it can be done. Maybe if you modify your security options for the VM you are able to achieve something, but personally i'm going for the "It cannot be done " answer because of what I said before.
Hope this helps
If any trouble then reply and I'll answer later.
Rui P. -
Installation of different versions of GUI clients on same machine
Hi All,
Is there any document about how to install different versions of MDM GUI clients on same Machine.
we have different version of MDM server in Sandbox and Developement environment. I know we can install different versions of GUI Clients by specifying different locations. But i am looking for some standard document / SAP note. Please if anyone has this information, it will be very helpful.
Thanks and Regards,
ShivHi Shiv,
You can find this information regarding different Version of GUI Clients on same machine from Standard SAP Installation Guide on Page 51
5.1 Maintaining Multiple Versions of MDM it tells that you can install multiple versions of MDM 5.5 on one host and switch between the versions.This may be useful, for example, when updating the patch level.
Please refer to SAP Installtion guide,
https://websmp201.sap-ag.de/~sapidb/011000358700001119842007E
Also Check SAP Note: 1283687
Best Regards,
Mandeep Saini -
Access application hosted on a different machine.
Hi,
I've written a simple web application to select an excel file through a jsp and write it's contents to text file. I select the execl file by browsing through the folders in my system. when i submit the form giving the location of the text file to which this excel file contents have to be written i'm getting the expected result. This application is hosted in Tomcat in my system. But when i tried accessing the application from another system my application is unable to find the excel file path selected in that machine. So i'm getting FileNotFoundException. Please suggest a solution.
Thanks,
SudhaHi,
I know that an application is hosted on a particular system. That application's job is to take the excel file selected by me and create a text file out of that. But as that application is hosted in a different machine it is unable to find the path i select. My doubt is like is it possible to have an application like this with actual source code and server on one system and user accessing from a different system and still able to find the path of the excel file the user is selecting?
Thanks,
Sudha -
How can i look up a EJB residing in different machine from client side?
hai ,
How can i look up a EJB residing in different machine from client side?
this is my code...........i don't know what should i use as Initial Context Factory...................i am using a sun appserver 8............
package com.parx.lms.lmsdelegate;
import com.parx.lms.exception.LMSException;
import javax.naming.Context;
import javax .ejb.CreateException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
import java.rmi.RemoteException;
import com.parx.lms.controller.*;
import com.parx.lms.vo.UserVo;
import com.parx.lms.exception.BusinessException;
import java.util.Hashtable;
import java.lang.*;
public class LmsDelegate{
private final static String JNDI_NAME="LmsBean";
private static String url="http://localhost:4848";
public static Lms lms = null;
public void getController() throws CreateException,
NamingException,RemoteException{
if(lms == null){
Hashtable h=new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY," ********what should i use here???????*************************");
h.put(Context.PROVIDER_URL,url);
System.out.println("Before Loading Context in Delegate");
Context ctx=new InitialContext(h);
System.out.println("Loaded Context in Delegate");
Object obj=ctx.lookup(JNDI_NAME);
System.out.println("Loaded Object in Delegate");
System.out.println("Before Loading Home in Delegate");
LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
System.out.println("Loaded Home in Delegate");
lms = home.create();
System.out.println("Loaded remote in Delegate");
public void addUserDelegate(UserVo vo) throws BusinessException{
try{
getController();
System.out.println("Before calling the addUser of Session");
lms.addUser(vo);
}catch(CreateException e){
System.out.println("Create Exception in Delegate due to--->"+e);
e.printStackTrace();
throw new BusinessException(e);
}catch(NamingException e){
System.out.println("Naming Exception in Delegate due to--->"+e);
e.printStackTrace();
throw new BusinessException(e);
catch(RemoteException e){
System.out.println("Remote Exception in Delegate due to--->"+e);
e.printStackTrace();
throw new BusinessException(e);
}catch(LMSException e){
System.out.println("duplicate user name--->"+e);
e.printStackTrace();
throw new BusinessException(e);
pls help me..........h.put(Context.INITIAL_CONTEXT_FACTORY," ********what should i use here???????*************************")
Each app server provides their own jndi factory class. For ex for weblogic it is weblogic.jndi.WLInitialContextFactory. SInce you are using sun app server, check if there are any examples to find out or the docs.
private static String url="http://localhost:4848
Since the client is in a different machine the localhost is not going to work here. provide the url or the machine name of the system in which ur sunapp server is running. In addition u will need to have the stubs of the remote interfaces in ur client machine. -
Client in a different machine..
Hi,
I ve a problem with JMS. I am developing a JMS Application with WebSphere and MQ Series.
The application runs fine if i have the both the publisher and subscriber in the same machine.
Now i want to move the client to a different machine say X. To do that should the machine 'x' need to have WebSphere environment because i'm using WebSphere for JNDI.
If the machine doesnot have the WebSphere environment is it possible to achieve.
If yes how to do that..
Thanks
MeenaOI think the jndi service can be accessed froma remote m/c, you can initialize the context with the appropriate paramters, so the lookups on the topic and connection factories and continue with your work.
-
RMIRegistry and Server on different Machines
Is it possible to run rmiregistry on one machine and then bind an object from a different machine to this registry. I can't find any documentation to say that you can't.
If i try to, i get a hostname is a non-local host Exception.What im actually doing is this :
I have a client program that wishes to transport some C code to a server for execution on that server. This would be simple enough but the client should not be concerned with where the server is, but only needs to know a name server that holds all object and server names so as they can then query this one registry for a server name and then connect to this server.
I was hoping that you could run rmiregistry on one machine, a server on another, bind that server object to the registry and then connect to the server from the client via the registry.
I have written my own registry object that implements this fine but i wanted to know whether this was a long winded way. Surely RMI is a java developers alternative to CORBA (according to sun web site !), in which this would be possible with the ORB running on a remote machine to client and server? -
RMI connection Error: No route to host
hi all,
We are using RMI in our project and We are using different computers on LAN for
server and Client Component,
Both the computers use j2sdk1.4.2_03
But when the client runs it gives the following error:
:java.rmi.ConnectIOException: Exception creating connection to: gridlab26;
nested exception is:
java.net.NoRouteToHostException: No route to host: connect
In this scenario we are just retrieving a String from the server. this
works well on One PC using localhost.
we found that you have encountered such problem earlier and might have
resolved it.
if you have any idea how to correct this problem please help us.
thanks
[email protected]hi,
yes both the PCs are pinging each other and we are able to share our things as well (with sharing n securiry facility in winXP)
if u hav any other suggestion plz convey me
tnx
Deep -
Office 2013 RMS Client Configuration - Your Machine is not setup for IRM
Hi All,
I have successfully setup a test AD RMS farm but stuck at trying to configure Office 2013 to work with this. The farm configuration is as below
DC: Windows 2003
AD RMS Server: Windows 2008/ SQL Server 2008 R2
Client: Windows 7 64 bit with Office 2013 32 bit, Domain Joined
Client is domain joined and SCP has been successfully registered ( I can see the SCP in AD RMS properties).
When I open word and select Protect Document -> Restrict Access, the only option is to Connect to RMS Server and get template, which eventually gives an error
Your Machine isn't setup for Information Rights Management (IRM). To set up IRM, sign in to office, open an existing IRM protected message or document, or contact your help desk.
Surprisingly, when I open a document protected by IRM (from a different machine), IRM is automatically configured for the user and starts working from that point. However any new domain user login into this client faces the same issue.
Can anyone help identify the required registry keys that need to be present for getting this working on the client.
Thanks for your help
AnujHi Manoj,
To install Microsoft Deployment Agent, you must be a member of the Windows
Administrators security group on the computer where you will install it. You must also be a member of the
Release Manager role in Release Management.
From the log, the user you‘re using seems not in the local administrator group. Please make sure the corresponding users has the needed permissions to install the deployment agent. Please check this
page for more information about installation of deployment agent. If you have any other issues, please elaborate more details about your scenario.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
External services moved, but SOA suite still gives "no route to host"
We have a SOA Suite integrating towards external services. The external service provider moved the services to a different server, and updated dns entries to reflect this move. But our SOA Suite gave "no route to host" errors when this move was performed, clearly not reloading the changes done in DNS, but still using the old address.
How and where can the SOA Suite be configured to actually time out domain name resolutions, when external services are moved this way. Can we ask it to use hostname instead of ip address.
Bouncing the servers is of course working, but there must be a configuraiton way around this.
bouncing production servers is the final resort.
Details of error message
<MSG_TEXT>BusinessEvent diapatch failed for {ESBDomain.Service.publish} with error An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: No route to host: connectalso check for firewalls on the server - a good test would be to an attempt to telnet into webservice hostname and portnumber from the SOA Server.
Regards,
Shanmu. -
My hard drive crashed and I am using a different machine. How do I retrieve my personalized Pages 5.2 templates from my backup drive? I have searched at length and can't seem to find them.
login_directory = /Users/yourname
If the Library folder is not shown in your login directory, then open a Finder window, and press command+J. This will open a Finder View Options panel. On it, there is a selectable entry to Show Library Folder. Once this is selected, the Library folder will appear. Now, follow the instructions in my May 6 post. You will have to right-click on com.apple.iWork.Pages and choose Show Package Contents, before continuing.
Correction: login_directory/Library/Containers/com.apple.iWork.Pages/Data/Library/Applicatio n Support/User Templates/
The host software persists in changing the correct Application Support text above to Applicatio n Support, which does not exist. -
I have an application where I need to send data via TCP/IP from two separate machines to a third machine. The machines are on a local area network connected through a network switch. The data are generated independently through data acquisition by the two independent machines before are sent to the client on third machine. Each machine has one network card. Thanks.
Solved!
Go to Solution.If you have three separate machines, you don't need to use separate ports. They will have three IP addresses.
Remember this rule: TCP connections are EXACTLY like telephone connections.
Have your client open two connections: same port on two different IP addresses.
Each client listens for connections.
After connections are established, you get to decide the protocol: maybe the client should explicitly ask for data, maybe the servers just dump it without being asked. It's up to you.
Read this:
TCP tips and tricks
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Maybe you are looking for
-
How to pass Security Header from the Physical Service in ODSI
We have to call a secured Web service using ODSI. We are trying to build a physical service in ODSI using a WSDL which has username token with password text policy inside it. The requests to that web service are bound by the security policy. But ODSI
-
Can I use IF-RIO with LabVIEW 8.20
I am going to upgrade my LabVIEW to 8.20 but I am not sure whether the driver of IF-RIO can work with it properly. Does anybody know this?
-
Hi! please help me.... i have installed SAP NW 2004s ABAP Trial SP11 completely without any error,, but my Dispatcher(disp+work.exe) is not starting ,, only Message server is starting initially it gives me a error message ' Running but message server
-
Syncing iPhone4S videos to an iPhone4
I have just upgraded my iPhone4 to a 4S. My wife now has my iPhone4. How can I get videos taken on my 4S onto the 4? The videos are in iPhoto albums, and show up fine on my 4S - but they don't sync at all onto the 4. I see no reason why they won't sy
-
Sampling sine wave and saving the samples in an array.
helo.. I am new to Labview and i need some help regarding sampling the sine wave. I have generated the sinewave in labview and now i want to sample it.(do i need an ADC for sampling?) and the samples should be saved in an array. I dont know how to do