Java.rmi.unmarshalexception error unmarshaling return header

java.rmi.unmarshalexception error unmarshaling return header

Java RMI Error unmarshaling return header Where should I start looking for the cause of this? And what does this mean? The text of the error message suggests. java.rmi.ConnectException: Connection refused to host. or the error: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is. Technical Article Details: Error: System.PublishingTools.GPServer: java.rmi.UnmarshalException: Error unmarshaling return header;.

Accept. opinion: Java.rmi.unmarshalexception error unmarshaling return header

Java.rmi.unmarshalexception error unmarshaling return header
CANON ERROR 502
Java.rmi.unmarshalexception error unmarshaling return header
java.rmi.unmarshalexception error unmarshaling return header

Java.rmi.unmarshalexception error unmarshaling return header - keep

I've been learning about RMI and I started with the Hello World program, which I got to work, and then began using other sample programs which all worked. (well there were errors, but I debugged them with the help of google/stackoverflow). and now I began writing my own project, which is basically a Traveling Salesman implementation that offloads the intense computation to a server.

Everything was working fine, when suddenly all my server RMI implementations broke. ie. when I run computeEngine from Eclipse as an RMI application (I use the RMI plugin), I get either the error:

or the error:

I have 4-5 different RMI applications that were all working and then all of a sudden the "ComputeEngine.java" file which I run on the server started returning one of these 2 errors for every single one of my applications.

Note: since I am testing these applications, I use "localhost" as my server hostname. In otherwords, the server and the client are the same machine.

Things I have tried:

  1. I have checked my etc/hosts/ file and found that 127.0.0.1 is set as localhost. I also created a new machine entitled "virtualmachine" and used my public IP address. Both did not work.
  2. I have double and triple checked my server.policy and client.policy files, and both seem to be fine.
  3. I have tried running the RMI application from terminal (instead of using the RMI plugin from eclipse) and I get the same errors
  4. I quit all java processes and reran everything making sure I started the server first (other threads suggested that these errors come from running the client first)
  5. I've portscanned myself and port 1099 (the default rmi port) says "LISTEN" when I run my server (even though the server is returning an exception).
  6. I've tried changing java.rmi.server.hostname, but nothing has seemed to help so far.

I'm not understanding how I'm not getting connection to host when I am running both the server and client on the same computer.

I preemptively apologize from being sucky at RMI and Java and missing some likely obvious solution.

Should I include any source code from what I have been trying to run?

EDIT: Here is the stack trace:

Thank You!

EDIT 2:

I noticed that if I restarted the RMIregistry when I started the application (as in, I selected the option in the Eclipse RMI plugin that restarted the rmiregistry) I would get a ClassNotFoundError for a class that is in my 'codebase.jar'.

Any ideas?

Resolve EngageOne Digital Delivery "Error unmarshaling return header"

EngageOne Vault and EngageOne Server Admin were on the same server as EODD. Each has its own application server (Vault- Tomcat 8.0.30, EngageOne - jboss 6.2) The processes run serially, so there was not any resource contention.

EODD JVM settings were at the defaults

C:\Program Files\PBBI CCM\EO_Digital_Delivery\command>java -Dlog.location=c:\logs\emsglog4j-command.log -Dconfig.file=file:command.properties -jar emessaging-command-jar-with-dependencies.jar OutBound Exception in thread "main" java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:

java.net.SocketException: Connection reset

at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)

at sun.rmi.server.UnicastRef.invoke(Unknown Source)

at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)

at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)

at com.sun.proxy.$Proxy1.invoke(Unknown Source)

at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:398)

at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:344)

at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:259)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at com.sun.proxy.$Proxy0.send(Unknown Source)

at Runner.main(Runner.java:37)

Caused by: java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(Unknown Source)

at java.net.SocketInputStream.read(Unknown Source)

at java.io.BufferedInputStream.fill(Unknown Source)

at java.io.BufferedInputStream.read(Unknown Source)

at java.io.DataInputStream.readByte(Unknown Source)

... 12 more

Error: System.PublishingTools.GPServer: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.net.SocketException: Connection reset

Error Message

In ArcGIS Server, publishing a service returns the following error message:

Error: System.PublishingTools.GPServer: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.net.SocketException: Connection reset

Cause

The ArcGIS Server account does not have the appropriate permissions to access the required folders. This commonly occurs in environments that apply group policies through an Active Directory, which can automatically revoke account privileges based on the policy configured.


Solution or Workaround

Warning: It is recommended that users backup their data before proceeding. If necessary, consult with the organization's IT administrator before making the following changes.
  1. Click Windows Start > Control Panel.
  2. From the Control Panel window, click Programs and Features.
  3. In the Uninstall or change a program window, click ArcGIS for Server and select the Uninstall/Change button.
Control panel options when repairing installation.
  1. In the ArcGIS for Server Setup window, select the Repair option and follow the instructions in the wizard.
  2. Once the ArcGIS for Server repair is completed, run the Configure ArcGIS Server Account wizard to reapply the ArcGIS Server service account’s permissions. The following ArcGIS for Server document describes how to do this in detail: Changing the ArcGIS Server account. Note: Another method to repair the ArcGIS for Server installation is to rerun the ArcGIS for Server installation file.

Related Information

Last Published: 8/1/2017

Article ID: 000014195

Software: ArcGIS GeoEvent Server 10.4.1, 10.4 ArcGIS Server 10.4.1, 10.4 ArcGIS Image Server 10.4.1, 10.4

Translation Feedback

How can we make this translation better?

Get notified about latest updates to this technical article?

Do you want to Unsubscribe?

xDI Support Portal

Symptom

The following is error is thrown in the Designer's Console, after executing a Process or a Mapping from the Designer:

Exception : java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.net.SocketTimeoutException: Read timed out

The Process or Mapping is however executed, despite this error.

Most of the time it appears when executing a big Process (with a lot of sub-processes for example). 

 

Solution

This happens on environments where the connection between the Designer and Runtime is slow, causing this error.

There is an option in the Designer allowing to increase the timeout for the communications with the Runtime.

You can find it under Window > Preferences > Stambia > Runtime > Runtime Timeout (milliseconds)

 

You can increase this value until the error disappear.

Note:

The value '0' means an infinite timeout, it is not recommended.
Usually this value may be increased up to 120000 or 180000 (2 or 3 minutes).
Using such big values also means that your environment should be analyzed for improving network communication between the Runtime and the Designer. 

Name: mc57594 Date: 06/19/97 A call to Naming.lookup will sometimes improperly fail with the following error: java.rmi.UnmarshalException: Error unmarshaling return header at sun.rmi.transport.StreamRemoteCall.executeCall( StreamRemoteCall.java:208) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:104) at sun.rmi.registry.RegistryImpl_Stub.lookup( RegistryImpl_Stub.java:94) at java.rmi.Naming.lookup(Naming.java:60) The following source code reproduces the problem: -------------------------------MyClient.java------------------------------------ import java.rmi.server.*; import java.rmi.*; import java.rmi.registry.*; import java.io.*; // simple rmi client import com.meitca.hsl.zonesjagents.security.*; public class MyClient { public static void main(String args[]) { System.setSecurityManager(new InsecurityManager()); DataInputStream istream = new DataInputStream(System.in); while (true) { try { istream.readLine(); MyServer server = (MyServer) Naming.lookup("MyServer"); for (int i=0; i<10; i++) { int j = server.hello(i); System.out.println(j); } } catch (Exception e) { System.out.println("Exception during test"); System.err.println(e.getMessage()); e.printStackTrace(); } } } } ---------------------------------------------------------------------------------------- --------------------------------MyServer.java---------------------------------- import java.rmi.Remote; import java.rmi.RemoteException; interface MyServer extends Remote { public int hello(int num) throws RemoteException; } ---------------------------------------------------------------------------------------- -------------------------------MyServerImpl.java---------------------------- import java.rmi.server.*; import java.rmi.*; import java.rmi.registry.*; import com.meitca.hsl.zonesjagents.security.*; // server implementation public class MyServerImpl extends UnicastRemoteObject implements MyServer { public MyServerImpl() throws RemoteException { } public int hello(int num) throws RemoteException { return num; } public static void main(String args[]) { System.setSecurityManager(new InsecurityManager()); try { // start the registry LocateRegistry.createRegistry(Registry.REGISTRY_PORT); MyServerImpl server = new MyServerImpl(); Naming.rebind("MyServer", server); } catch (Exception e) { System.out.println("Exception during test"); System.err.println(e.getMessage()); e.printStackTrace(); } } } ---------------------------------------------------------------------------------------- To reproduce the problem do the following: 1) Run the MyServerImpl 2) Run the MyClient 3) Hit the Enter key in the MyClient window. You will see the numbers 0 to 9 on the screen (up to now it works fine). 4) Now kill the MyServerImpl via a Control-C 5) Restart the MyServerImpl a second time (DO NOT RESTART THE MyClient!) 6) Give the Server some time to intialize and then hit Enter again in MyClient 7) The Error listed above will be reported. 8) Hit Enter again in MyClient 9) The Error listed above will be reported a second time. 10) Hit Enter a thrid time. 11) This time the program will work and you will see the numbers 0 to 9 on the screen The call to Naming.lookup is failing even though at the time of the call, a new MyServerImpl object has been created and has bound itself to the name "MyServer". This problem seems to be related to the fact that the Registry is created within the MyServerImpl VM, and thus the Registry is stopped when that VM is Control-C'd. If the Registry is run as a seperate VM (using rmiregistry.exe) the Exception does not occur. Running the Registry in a sperate VM is not an acceptable workaround for us do to product requirements. ======================================================================

Unable to stop Windchill normally, error with message " java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:  java.io.EOFException"

  • This is normal to start Windchill normally with command

> windchill start

  • Will be unable to stop Windchill normally with error with message:

Exception in thread "main" wt.util.WTRemoteException: Unable to stop server manager; nested exception is:
    wt.util.WTRemoteException: Unable to ping server manager; nested exception is:
    wt.util.WTRemoteException: Unable to locate server manager; nested exception is:
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.io.EOFException
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:236)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:375)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:119)
    at wt.manager.RemoteServerManager.acquireServerManager(RemoteServerManager.java:533)
    at wt.manager.RemoteServerManager.getServerManager(RemoteServerManager.java:506)
    at wt.manager.RemoteServerManager.remoteInvoke(RemoteServerManager.java:442)
    at wt.manager.RemoteServerManager.ping(RemoteServerManager.java:369)
    at wt.manager.RemoteServerManager.stop(RemoteServerManager.java:391)
    at wt.manager.RemoteServerManager.mainInternal(RemoteServerManager.java:794)
    at wt.manager.RemoteServerManager.main(RemoteServerManager.java:769)
Caused by: java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:267)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:222)
    ... 9 more

0 Comments

Leave a Comment