RMI tunneling & J2SE 5 problem
Hi,
I have a problem that just appeared by changing from jRE1.4 to 1.5 on client side
My program uses RMI to load classes from a server. This server is protected by a firewall and the 80 port is not accessible.
With JRE 1.4, the program was connecting to the server "port to port" by TCP, as we can see in this capture :
10.0.0.1 TCP 30000 > 1301 [ACK] Seq=8310 Ack=4199 Win=14868 Len=0
10.0.0.1 TCP 30000 > 1301 [PSH, ACK] Seq=8310 Ack=4199 Win=14868
10.0.0.1 TCP 30000 > 1301 [ACK] Seq=8542 Ack=4199 Win=14868
82.127.XX.XXX TCP 1301 > 30000 [ACK] Seq=4199 Ack=9948 Win=65535
82.127.XX.XXX TCP 1304 > 30000 [SYN] Seq=0 Ack=0 Win=65535 Len=0
10.0.0.1 TCP 30000 > 1301 [ACK] Seq=9948 Ack=4199 Win=14868
With JRE 1.5, the program tries to connect to port 80 :
10.0.0.1 TCP http > 2180 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0
82.127.XX.XXX TCP 2180 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0
82.127.XX.XXX HTTP POST /cgi-bin/java-rmi.cgi?forward=1099 HTTP/1.1
82.127.XX.XXX TCP 2178 > 30000 [ACK] Seq=1338 Ack=526 Win=65010
10.0.0.1 TCP [TCP Out-Of-Order] 30000 > 2178 [PSH, ACK] Seq=351
82.127.XX.XXX TCP [TCP Dup ACK 129#1] 2178 > 30000 [ACK]
82.127.XX.XXX HTTP POST /cgi-bin/java-rmi.cgi?forward=1099 HTTP/1.1
10.0.0.1 TCP http > 2180 [ACK] Seq=1 Ack=389 Win=6432 Len=0
10.0.0.1 HTTP HTTP/1.1 404 Not Found (text/html)
...and receives an error, since the port is not accessible.
Error :
java.io.IOException : HTTP request failed
java.io.IOException: HTTP request failed
at sun.rmi.transport.proxy.HttpSendSocket.readNotify(Unknown Source)
at sun.rmi.transport.proxy.HttpSendInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.DataInputStream.readByte(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at com.swingws.biweb.tools.tunneling.b.<init>(Unknown Source)
at com.swingws.biweb.tools.tunneling.b.a(Unknown Source)
at com.swingws.biweb.seriallink.LsServerSelectApplet.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Do you know why the behaviour of my program changed between the 2 JREs ?
While Debugging, I found why it goes on HTTP connection :
I reused the servlet code from the servletHandler Example.
It is said that :
When an RMI client initiates contact with a remote server,
* it attempts to establish a connection using each of the following
* protocols in turn, until one succeeds:
* 1. Direct TCP connection.
* 2. Direct HTTP connection.
* 3. Proxy connection (SOCKS or HTTP).
* 4. Connection on port 80 over HTTP to a CGI script.
* 5. Proxy HTTP connection to CGI script on port 80.
So, we can think the TCP connection doesn't work, that's why it goes through HTTP.
Then my new question is :
Why the server accepts TCP connections from clients with JRE1.4 and older but not for clients with JRE1.5 ?
Similar Messages
-
Hello
I am trying to get RMI tunneling to work and am having problems. I have read the documentation and have setup my environment as recommended. Specifically -- my rmi.xml file looks like this:
<?xml version = '1.0' standalone = 'yes'?>
<!DOCTYPE rmi-server PUBLIC "Orion RMI-server" "http://xmlns.oracle.com/ias/dtds/rmi-server.dtd">
<rmi-server port="23791">
<log>
<file path="../log/rmi.log"/>
</log>
</rmi-server>
My global-web-application.xml file contains these entries:
<servlet>
<servlet-name>rmi</servlet-name>
<servlet-class>com.evermind.server.rmi.RMIHttpTunnelServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>rmi</servlet-name>
<url-pattern>/*.tunnelrmi</url-pattern>
</servlet-mapping>
The URL I am using to get the initial context is this:
http:ormi://myserver:7777/NEATS
When I attempt a lookup for one of my EJBs I get the following exception:
javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: No such domain/application: NEATS; nested exception is:
javax.naming.AuthenticationException: No such domain/application: NEATS
7777 is the port that my Oracle HTTP server listens on.
This application is deployed in one of several OC4J components that I have configured in a single 9iAS instance. Is there some additional configuration I need to do for Apache to get the request forwarded to the right application? Maybe the multiple OC4J components are causing me trouble?
Any help anyone can offer would be much appreciated!
Thanks
Chris SargentHi Chris!
Did you ever get this to work? If so what was the solution!
Thanks! -
I am trying to understand how RMI Tunneling works, but I am very confused. One of my big issues is about java-rmi.cgi, it doesn't exist on new Windows JDK.
I follow some receipts to use Apache Tomcat for Tunneling RMI with a ServletHandler, but I was unsuccessful. Probably, these receipts are deprecated... I didn't found many topics about this subject, and what I had found was for older versions of JDK. Is it worthless to use RMI Tunneling?
Now, I am reading " [C.10 How can I make outgoing Java RMI calls through a local firewall?|http://java.sun.com/javase/6/docs/technotes/guides/rmi/faq.html#firewallOut] " of RMI FAQ.
I appreciate any help. Thanks.Hi hesher,
There are two ways.
1)using java-rmin.cgi.
Just put java-rmi.cgi in /cgi-bin/.
2)using ServletHandler.
2.1)Install Tomcat6.
2.2)Read http://java.sun.com/j2se/1.4.2/docs/guide/rmi/faq.html#servlet
and download ServletHandler.java from http://java.sun.com/j2se/1.4.2/docs/guide/rmi/faq.html#servlet
2.3)Compile it by "javac -cp servlet.jar ServletHandlet.java]" where serlvet.jar (or servlet-api.jar) is located in /usr/share/tomcat6/lib and so on.
2.4)Deploy ServletHandler.class ..... in wbapps/rmi/WEB-INF/classes of Tomcat6.
2.5)Put a web.xml following in WEB-INF
   <servlet>
    <servlet-name>ServletHandler</servlet-name>
    <servlet-class>ServletHandler</servlet-class>
   </servlet>
   <servlet-mapping>
    <servlet-name>ServletHandler</servlet-name>
    <url-pattern>/ServletHandler</url-pattern>
  </servlet-mapping>
2.6)modify httpd.conf of apache.
  LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
  <Location /cgi-bin/java-rmi.cgi>
  ProxyPass ajp://localhost:8009/rmi/ServletHandler
  </Location>
2.7)Put "RMISocketFactory.setSocketFactory( new sun.rmi.transport.proxy.RMIHttpToCGISocketFactory());" in your java client main program.
That's all.
Good luck!
Ref.
1)http://sys.elec.kitami-it.ac.jp/users/ueda/blog/ in japanese 
2)http://java.sun.com/j2se/1.4.2/docs/guide/rmi/faq.html#servlet
3)http://forums.sun.com/thread.jspa?forumID=58&threadID=706008
4)http://forums.sun.com/index.jspa -
Jdk6 RMI Tunneling - ServletHandler - GET Operation no supported
Hi there
I have downloaded the jdk6 docummentacion and I want to use the RMI tunneling sample. I have already set up the Apache/Tomcat in order to to a rewrite of the rmi-cgi call to the servlet
RewriteEngine on
RewriteLog /var/log/httpd/rewrite.log
RewriteLogLevel 0
RewriteRule cgi-bin/java-rmi\.cgi$ http://myhost/maindb_dev/rmi/tunnel
And testing the call to the cgi program it changes the url to the servlet one. So the configuration of the Servlet is OK
Then running the RMIClient provided by the jdk
it catches a remote exception
Error: Error unmarshaling return header; nested exception is:
java.io.IOException: HTTP request failed
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.IOException: HTTP request failed
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:209)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at SampleRMIClient.main(SampleRMIClient.java:89)
Caused by: java.io.IOException: HTTP request failed
at sun.rmi.transport.proxy.HttpSendSocket.readNotify(HttpSendSocket.java:159)
at sun.rmi.transport.proxy.HttpSendInputStream.read(HttpSendInputStream.java:66)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at java.io.DataInputStream.readByte(DataInputStream.java:248)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:195)
... 4 more
At the tomcat side the servletHandler outputs the following
400Java RMI Client ErrorGET Operation not supported: Can only forward POST requests.
So what it seems is that the RMI implementation uses a GET request instead of a POST. That is the one handle by the Servlet.
Any body solved this?
Thanks in advance
Alfonso.Hello,
JSR 262 (Web Services Connector for JMX Agents) offers an HTTP based Connector that is compliant with JConsole.
The standard is not yet final but is already in public review and we don't expect major changes.
The latest Reference Implementation (early access 3) can be downloaded from http://ws-jmx-connector.dev.java.net
Reusing your Connector presentation I would say :
Use of JMX WS Connector
Advantages
* Standard
* Firewall friendly
Disadvantages
* Standalone. You need to add jars (quite a bunch actually) to JConsole classpath.
* Less efficient than RMI or JMXMP.
References
Project web site : http://ws-jmx-connector.dev.java.net
Article that cover the EA3 announcement : http://blogs.sun.com/jmxnetbeans/entry/web_services_connector_for_jmx#comments
Article that details the Connector architecture :
http://blogs.sun.com/jmxnetbeans/entry/up_the_metro_stack_to
Thanks.
Jean-Francois -
Reconnect remote EJB using ORMI through RMI Tunnel
Hello!
My client application connecting to server EJB using ORMI.
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin".toUpperCase());
env.put(Context.SECURITY_CREDENTIALS, passwordEncoder.encodePassword("admin", null).toUpperCase());
env.put(Context.PROVIDER_URL, "ormi:http://host:7777/application");
First connection passed. All works.
But if connection between client and server broken, then client must reconnect to server... But it can't.
Client pending and not response.
I dump threads on client pending:
First thread:
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x230962d8> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(LinkedQueue.java:192)
- locked <0x230962d8> (a java.lang.Object)
at oracle.oc4j.rmi.tunnelling.TunnelledRmiTransport$PluggableInputStream.read(TunnelledRmiTransport.java:208)
- locked <0x2308ac90> (a oracle.oc4j.rmi.tunnelling.TunnelledRmiTransport$PluggableInputStream)
at oracle.oc4j.rmi.tunnelling.TunnelledRmiTransport$PluggableInputStream.read(TunnelledRmiTransport.java:190)
- locked <0x2308ac90> (a oracle.oc4j.rmi.tunnelling.TunnelledRmiTransport$PluggableInputStream)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
- locked <0x2308cd68> (a java.io.BufferedInputStream)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2249)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2429)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2499)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2571)
at java.io.ObjectInputStream.read(ObjectInputStream.java:820)
at com.evermind.server.rmi.RMIConnection.readCommand(RMIConnection.java:162)
at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:149)
at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
at java.lang.Thread.run(Thread.java:619)
Second thread:
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x229c0bc8> (a com.evermind.server.rmi.RMICall)
at java.lang.Object.wait(Object.java:485)
at com.evermind.server.rmi.RMIClientConnection.waitForResponseFromServer(RMIClientConnection.java:758)
- locked <0x229c0bc8> (a com.evermind.server.rmi.RMICall)
at com.evermind.server.rmi.RMIClientConnection.waitForJndiResponse(RMIClientConnection.java:370)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:179)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:287)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at StartUp$1.actionPerformed(StartUp.java:61)
Look's like client trying get response from server, but server not answered... But server is alive! Why so?
When i restart client all works fine...
Please help!Hello!
My client application connecting to server EJB using ORMI.
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin".toUpperCase());
env.put(Context.SECURITY_CREDENTIALS, passwordEncoder.encodePassword("admin", null).toUpperCase());
env.put(Context.PROVIDER_URL, "ormi:http://host:7777/application");
First connection passed. All works.
But if connection between client and server broken, then client must reconnect to server... But it can't.
Client pending and not response.
I dump threads on client pending:
First thread:
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x230962d8> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(LinkedQueue.java:192)
- locked <0x230962d8> (a java.lang.Object)
at oracle.oc4j.rmi.tunnelling.TunnelledRmiTransport$PluggableInputStream.read(TunnelledRmiTransport.java:208)
- locked <0x2308ac90> (a oracle.oc4j.rmi.tunnelling.TunnelledRmiTransport$PluggableInputStream)
at oracle.oc4j.rmi.tunnelling.TunnelledRmiTransport$PluggableInputStream.read(TunnelledRmiTransport.java:190)
- locked <0x2308ac90> (a oracle.oc4j.rmi.tunnelling.TunnelledRmiTransport$PluggableInputStream)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
- locked <0x2308cd68> (a java.io.BufferedInputStream)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2249)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2429)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2499)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2571)
at java.io.ObjectInputStream.read(ObjectInputStream.java:820)
at com.evermind.server.rmi.RMIConnection.readCommand(RMIConnection.java:162)
at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:149)
at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
at java.lang.Thread.run(Thread.java:619)
Second thread:
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x229c0bc8> (a com.evermind.server.rmi.RMICall)
at java.lang.Object.wait(Object.java:485)
at com.evermind.server.rmi.RMIClientConnection.waitForResponseFromServer(RMIClientConnection.java:758)
- locked <0x229c0bc8> (a com.evermind.server.rmi.RMICall)
at com.evermind.server.rmi.RMIClientConnection.waitForJndiResponse(RMIClientConnection.java:370)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:179)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:287)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at StartUp$1.actionPerformed(StartUp.java:61)
Look's like client trying get response from server, but server not answered... But server is alive! Why so?
When i restart client all works fine...
Please help! -
Hi,
I'm currently having issues with the HTTPS Tunneling. When I make a client request to an EJB, I get the following exception:
Server returned HTTP response code: 500 for URL: https://localhost:8889/SampleEJB.rmiTunnel [Root exception is java.io.IOException: Server returned HTTP response code: 500 for URL: https://localhost:8889/SampleEJB.rmiTunnel]
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:258)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:50)
at javax.naming.InitialContext.lookup(Unknown Source)
at gov.dhs.visit.pkd.client.AggregatorClient.main(AggregatorClient.java:60)
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: https://localhost:8889/AggregatorEJB.rmiTunnel
Here are the context properties I set when I invoke the client
java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=https:ormi://localhost:7779/SampleEJB
java.naming.security.principal=oc4jadmin
java.naming.security.credentials=[pwd]
javax.net.ssl.keystore=[keystore]
javax.net.ssl.keystorePassword=[pwd]
I added the following to rmi.xml
<ssl-config keystore=[keystore location] keystore-password=[ ]/>
I also added this to my secure-website.xml
<default-web-app application="default" name="defaultWebApp" shared="true"/>
Please help!
Thanks.Nevermind. I resolved the issue. If anyone runs into a problem like this, let me know and I can provide assistance.
-
Need opinions about RMI tunneling over HTTP please
My Tomcat Server wants to talk with a JBoss Server.
This communication has to go through a firewall, and I want to use
the HTTP tunneling function.
Can anybody please tell me if the HTTP tunnel has any disadvantages?
How big is the performanceloss?
Can anybody please give me a link how to do this? What configurations
do I have to do where?
Thanks!you do not have to do anything special for this, if you do not want to.
All yours questions are answered here :
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-arch6.html -
RMI with SSL problem (cross post under RMI too)
Hi,
I'm having problems using RMI with SSL. I posted in the RMI forum originally but now realise the problems are with the SSL really.
Perhaps someone who follows this forum could help.
See post:
http://forum.java.sun.com/thread.jsp?forum=58&thread=409347
Thanks.There's more dukes in the other thread too.
-
Rmi rebind's problem,dynamic rebind object!
hi,everyone
I have a problem,i know a class's name and this class have implement remoteobject,
what can i rebind this class on the RMI registry .
I write code like this:
Class temp = Class.forName("Test");
Naming.rebind("test",temp.newInstance());
the "Test" is my class name,but cann't compile this code ,it's say:
rebind(java.lang.String,java.rmi.Remote) in java.rmi.Naming cannot be applied to (java.lang.String,java.lang.Object)
what can i do? help meYou might try downcasting your newly created Object to a Remote. If you give a method a java.lang.Object reference, it won't figure out if it's really pointing to a java.rmi.Remote.
-
RMI application policy problem..
Hi;
Because i am very new in eclipse and java i will ask you an easy question which is realy hard to find out for me.
I created an RMI project in eclipse and i put the codes inside. When i am trying to run it is says
Security Manager loaded
Exception in thread "main" java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
I searched a solution and they are saying create a policy file with same code inside and run with it .
But i got no clue about how i will write
java -Djava.security.policy=policy.all SampleServerImpl
java -Djava.security.policy=policy.all SampleClient
in eclipse to run code . And i put the policy inside of project folder but id didn't recognize it automaticly.
Thank you ...
Edited by: seray.uzgur on Jul 10, 2008 6:55 AMHi,
What i could see the solution to your problem is.
create a file name policy.all having the code
grant {
// Allow everything for now
permission java.security.AllPermission;
& when u call a client call like if u r calling a client through Ant
do llike this
<target name="run" >
<java classname="test.Sample" fork="yes" failonerror="true">
<jvmarg value="-Djava.security.manager"/>
<jvmarg value="-Djava.security.policy=policy.all"/>
<classpath refid="src.classpath" />
</java>
</target>
See if that works for you. -
WebLogic RMI UNIX Performance problem
Hi.
I'm experiencing problems with the performance of RMI calls from within session
beans to external RMI services. I have a system running 4 RMI services in separate
JVMs to weblogic 6.1 instance on Solaris 2.6 on SPARC boxes with 1+ Gb of RAM.
The system was developed on NT and deployed to UNIX. A typical request is serviced
in 70-90 ms on the NT development box (Desktop 512Mb RAM) but when deployed to
the UNIX box takes anywhere between 500-4000 ms. Performance metrics in the code
indicate that 'crunch' times are similar but remote RMI calls are orders of magnitude
greater.
Has anybody had similar problems? I have checked the tuning guides wrt TCP/IP
configurations but would not expect such a large difference using the default
Solaris configuration. Memory and CPU utilisation on the SPARC are low as are
I/O and other metrics available from vmstat.
Cheers
PeteHi.
The JVMs are running on the same machine thus should be looking in /etc/hosts
and not going via DNS.
I have read there is a performance gain by tying WL to a single CPU, any insight?
Pete
Andy Piper <[email protected]> wrote:
"Pete Harris" <[email protected]> writes:
I'm experiencing problems with the performance of RMI calls from withinsession
beans to external RMI services. I have a system running 4 RMI servicesin separate
JVMs to weblogic 6.1 instance on Solaris 2.6 on SPARC boxes with 1+Gb of RAM.
The system was developed on NT and deployed to UNIX. A typical requestis serviced
in 70-90 ms on the NT development box (Desktop 512Mb RAM) but whendeployed to
the UNIX box takes anywhere between 500-4000 ms. Performance metricsin the code
indicate that 'crunch' times are similar but remote RMI calls are ordersof magnitude
greater.
Has anybody had similar problems? I have checked the tuning guideswrt TCP/IP
configurations but would not expect such a large difference using thedefault
Solaris configuration. Memory and CPU utilisation on the SPARC arelow as are
I/O and other metrics available from vmstat.Its possible that you are getting a DNS lookup for each request or
worse a reverse lookup. You might want to try using IP addresses in
your config to see if that helps.
andy -
DLSW and Tunnel Interfaces problem
We have a pair of routers with tunnel interfaces and DLSW between them.
Some times the tunnel interface goes down thus loosing service trough DLSW.
Is there any problem reported between DLSW and this kind of tunel interfaces ?Hi,
i assume you are using dlsw tcp peers.
In general dlsw does not know over what infrastucture the connection really runs. Dlsw gives data to tcp and tcp is responsible for doing the actual transmission.
I dont know of any problems with dlsw and tunnel interfaces in general.
Some more information might help to understand the problem.
What type of tunnel are you using? GRE?
What version of ios are you running?
Do you use additional encapsulation overhead like ipsec ect?
Does tcp on this router use path mtu discovery?
thanks...
Matthias -
Tunneling and problem with unknown host exception
hello! i've got a problem with https. i use jdk 1.5.0, jboss-4.0.4.ga-patch1, soap.
and i'm going crasy.. i've testet my client code at our network and it works fine. but if i want to get jobs from the server of our customer, my client throw an "unknown host exception: firm".
i wonder why it hasn't the full host. the url may look like this: https://firm.sub.com:443/ and while the client connects to the server, i depugged it and the host is correct: firm.sub.
but after the connection, when the client want to get something from the server (when it wants to communicate with the server over soap) it crashs.
my client code looks like this:
private ClientInterfaceEndpoint getClientInterface() throws ServiceException {
QName serviceQName = new QName(DOCSERVER_NAMESPACE, CLIENT_INTERFACE_SERVICENAME);
URL wsdlUrl = getClientInterfaceWsdlUrl();
log.info("*******WSDLURL host: " + wsdlUrl.getHost()); // out: firm.sub
log.info("*******WSDLURL port: " + wsdlUrl.getPort()); // out: 443
URL mapping = getClass().getClassLoader().getResource("META-INF/DocumentServer_Mapping.xml");
log.info("*******MappingURL path: " + mapping.getPath());
if (wsdlUrl.toString().toLowerCase().contains("https")) {
if (null == getConfig().getTruststore() || getConfig().getTruststore().equalsIgnoreCase("")) {
throw new RuntimeException("No or incorrect TruststorePath in the docclient-config");
File tmp = new File(getConfig().getTruststore());
if (!tmp.isFile() || !tmp.canRead()) {
throw new RuntimeException("The truststore at the 'TruststorePath' isn't a file or can't be read.");
System.setProperty(SYS_PROPERTY_KEY_TRUST, getConfig().getTruststore());
System.setProperty(SYS_PROPERTY_KEY_TRUST_PW, config.getTruststorePass());
ServiceFactoryImpl factory = null;
factory = (ServiceFactoryImpl) ServiceFactory.newInstance();
Service clientInterfaceService = null;
try {// create the service for the ClientInterface
clientInterfaceService = factory.createService(wsdlUrl, serviceQName, mapping, new URL(config.getServerURL())); //, new URL(config.getServerURL())
log.info("*******ClientInterFaceService WSDL URL Host: " + clientInterfaceService.getWSDLDocumentLocation().getHost()); // out:firm.sub
log.info("*******ClientInterFaceService WSDL URL Port: " + clientInterfaceService.getWSDLDocumentLocation().getPort()); // out: 443
} catch (ServiceException e) {
log.error(e.getMessage());
throw new RuntimeException(e.getMessage());
} catch (MalformedURLException e) {
log.error(e.getMessage());
throw new RuntimeException(e.getMessage());
} catch (Exception e) {
log.error(e.getMessage());
throw new RuntimeException(e.getMessage());
}// getting the ClientInterfaceEndpoint
ClientInterfaceEndpoint clientInterface = (ClientInterfaceEndpoint) clientInterfaceService.getPort(ClientInterfaceEndpoint.class);
return clientInterface;
protected URL getClientInterfaceWsdlUrl() {
URL url = null;
String urlString = getConfig().getServerURL() + CLIENT_INTERFACE_URI + "?wsdl";
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
Properties properties = System.getProperties();
String handlers = System.getProperty(SYS_PROPERTY_KEY_PKGS);
if (handlers == null) {
properties.put(SYS_PROPERTY_KEY_PKGS, SYS_PROPERTY_VALUE_PKGS);
else {
properties.put(SYS_PROPERTY_KEY_PKGS, SYS_PROPERTY_VALUE_PKGS.concat("|").concat(handlers));
try {
url = new URL(urlString);
log.info("*******URL host: " + url.getHost());
log.info("*******URL port: " + url.getPort());
log.info("*******URL path: " + url.getPath());
} catch (MalformedURLException e) {
log.fatal("DocumentProvider SOAP configured incorrectly. DocServer URL malformed: " + urlString);
throw new RuntimeException("DocumentProvider SOAP configured incorrectly. DocServer URL malformed: " + urlString, e);
System.setProperties(properties);
return url;
}if it's usefull: the customer use a apache server (not tomcat) where a the server is and the client at another system the jboss.
The customer told me: if i want to connect the client via http i have to tunnel.. maybe i have to tunnel using https too?
have i to generate the endpoint classes a second time, extra for https?
or doesn't soap like host like "firm.sub"?
can anyone help me please?!
sorry, my english isn't very well...sorry, it's not the same error. The output is: Unable to connect to any host due to exception: java.net.socket.exception: java.net.socket.exception: Unregcognized windows socket error: 10106: create.
-
Hi,
I have a special problem for which I have no idea at the moment how to solve, although I am pretty new to RMI.
I get this error message
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: rmikochbuch.RemoteDateImpl_Stub
when I try to start an executable jar-file.
What I have is:
On my development PC (Win2k WS) I run
java -jar RMI_Server_Test_01.jar
(of course after "start rmiregistry") and it works. Now I take this jar file and copy it to two other PCs (Win XP / Win2k Server). So when I try to start my jar file on these machines too, I get the error messages you see above. All three machines have the same SDK 1.4.2_07 installed.
I have neither an explanation why it does not work on the other machines nor do I have any idea how to solve this problem. :(
Additional info:
The error message occurs in this code block:
RemoteDateImpl im = new RemoteDateImpl();
System.out.println( "DateServer starting..." );
Naming.rebind( RemoteDate.LOOKUPNAME, im );The "DateServer starting..." gets displayed but then the program crashes and exits.Got this problem solved now.
What I had to do - and this is not mentioned in the Java cookbook (O'Reilly):
Copy the Interface, the Implementation plus Stub + Skel .class files to the CLASSPATH on the server.
Now comes the second part - connect from a client to this server... -
I have already write a RMI example for self-study successfully, but there are a little class file problem that I'm not able fix it.
In my RMI example there are 3 .java files (RMIServer.java, RMIClient.java and a MethodImpl.java)
After I have javac and rmic them, I got RMIServer_Skel.class, RMIServer_Stub.class, RMIClient.class and the MethodImpl.class
In order to run the RMI in a local envirnment, I divide them into 2 folders as listed below:
Server - RMIServer_Skel.class, RMIServer_Stub.class and the MethodImpl.class
Client - RMIServer_Stub.class, RMIClient.class and the MethodImpl.class
Then when I start to run them in a DOC envirnment...
start rmiregistry........(run successful and another rmiregistry DOC window created)
java RMIServer.........Exception in thread "main" java.lang.NoClassDefFoundError: RMIServer
Oops? Class not found? How can that be? And after that, I tried something.......to add the RMIServer.class into the Server folder.
Again, I start to run them in a DOC envirnment...
start rmiregistry........(run successful and another rmiregistry DOC window created)
java RMIServer.........The server is instantiated(run successful and print out a String)
Um...is the RMI have to run with a RMIServer.class file? But the RMI notes I refered from is not seems to be telling me to do this, are there any one can give me a helping hand?please, go here, read thoroughly
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
Maybe you are looking for
-
BAPI_GOODSMVT_CREATE - Error Storage location not supported...
Dear All I am creating the material movement documetn 561 (MB1C) using BAPI_GOODSMVT_CREATE. Howeever, the BAPI returns me the error saying Storage location not supported. What is this about. Can someone give me hint I searched the forum and not ab
-
I can't find where to download the creative cloud
so i started out with the free trial and then signed up for the monthly plan. I tried to open photoshop on my desktop and it kept saying my free trial was over. I uninstalled it and illustrator but couldn't download them again. It said in the creativ
-
How to Copy Sales Order Filed in FI from SD while Creating Billing
Hi Everyone I was checking the line item report for my sales account. (FS10N or FBL3N). The problem is i am not able to see the original sales document number filed against that Sales Gl. Its not even visible on customer account line item details as
-
Problem using passivateStateForUndo when having taskflow requires-transacti
HI All, i'm trying to use oracle.jbo.server.ApplicationModuleImpl.passivateStateForUndo / activateStateForUndo methods to make and restore some application savepoints. The problem is that, when i try to use these methods from adf bounded taskflow, (p
-
HT1386 Can't find my device on iTunes?
I just installed the latest update iTunes (11.1.4.62) and now it's not showing my device when I plug it into my computer. It was showing my device with a previous version of Itunes and now I don't see where it is at all. Help!