Error in re-creating RMI registry when reloading Tomcat server.
Hi,
I use LocateRegistry.createRegistry() in a servlet which is load-on-startup. I've unexport the registered remote object in the HttpServlet.destroy().
But when I reload the tomcat server, such an exception ocurrs:
java.rmi.server.ExportException: internal error: ObjID already in use
at sun.rmi.transport.ObjectTable.putTarget(ObjectTable.java:168)
at sun.rmi.transport.Transport.exportObject(Transport.java:69)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:190)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:145)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:164)
at RmiUtils.rebindLocal(RmiUtils.java:86)Here is the binding code in RmiUtils.rebindLocal:
try {
Naming.rebind(url, rmiImpl);
} catch (RemoteException ce) {
if (!ru.isLocalhost()) {
ce.printStackTrace();
// cannot cache
return;
} else {
// try to create the registry in local machine if not created
try {
LocateRegistry.createRegistry(ru.getPort());
Naming.rebind(url, rmiImpl);
} catch (RemoteException e) {
System.err.println("Failure in create Registry on port "
+ ru.getPort() + ", maybe it's been created already!");
e.printStackTrace();// handle exception
}Can anybody help?
Thanks.
Hi
I havent code for quite a while.
I would think that this wont work.
The registry is created on startup (possibly init method in ur servlet) but it is never destroyed.
You are better off starting the registry externally to ur servlet engine, and then use do a bind/rebind on startup, unbind on destroy.
Hope this helps.
Similar Messages
-
Hi All,
I am getting "An error occurred while creating a subprocess in the processing server. [RCIRAS0603]" error while opening the previous instances of the crystal report in BOCMC.
I am trying to run or schedule the report but it is always going to "PENDING STATUS".
(Previously it was resolved after restarting the server. Error : problem in ProcessingServer)
Could you please suggest.
Details :
Crystal Reports 2008
Clarity 13
Server Details:
BO XI 3.1 SP5
OS : Red Hat 6
Patch X11
Symptom
" Crystal Reports 2008/2011/2013 Processing Server fails to create child
processes after applied X11 client libraries security update on Redhat
Linux 6
" "An error occurred while creating a subprocess in the processing server.
[RCIRAS0603]" error occurs when viewing the Crystal Reports in InfoView/BIHi Rajeev,
This is a known issue you can refer to below note,
2098659 - "An error occurred while creating a subprocess in the processing server. [RCIRAS0603]" error occurs after applied X11 client libraries security update on Redhat Linux 6
Regards,
~Shree -
An error occurred while creating a subprocess in the processing server.
Hi,
I have developed a Crystal Report using CR 2008 with SAP BW as the datasource. The report is executing fine in CR 2008, but when saved to the BOE, in Infoview it is throwing the following error:
An error occurred while creating a subprocess in the processing server. [RCIRAS0603]
Did anyone face similar issue? Is there any resolution for the same.?
I have deleted the report from enterprise and saved it back, still facing this problem.
Appreciate your help in this regard.
Thanks
RaviCrystal Reports processing (CR Page) server is not operational.
There could be many reasons for this.
CR processing server traces will need to be enabled and analysed by support.
You should also be on the latest patch release.
Sometimes following steps help :
1) Stop all of the XI 3.1 processes using the ./stopservers command (ensure they are all down before proceeding)
2) Once all processes are stopped ensure the serverpids directory is empty
<install dir>/bobje/serverpids/
If any files are within the 'serverpids' folder, remove them.
3) Go to bobje/tmp
Remove any MW, .MW, mw, .mw and regss files and/or directories
4) Go to /tmp
Remove any MW, .MW, mw, .mw, and regss files and/or directories
5) start servers back up.
If this doesn't help - you'll need to open a Support Incident -
I have a test 2-node Failover cluster using Server 2012 R2
As of last night the cluster service on one of the 2 nodes is down with this error:
The Cluster Service service terminated with the following service-specific error:
Cannot create a file when that file already exists.
EventID 7024
The Cluster service waits 60 sec, tries to start, and the same error occurs again.
Any idea where to look to identify which file this error is referring to, or how to go about identifying root cause and getting a solution?
thank you.
sambHi Yeswanth
Then you can try with a "Add Counter". This will create new file each time with the same name but a counter will be added to the file name at the end specifying the number of times it is created.
You can also the specify the format to create the counter once select this option u can correspondingly fill the Format and step fields.
Will this be fine.
Regards
Ashmi -
Problem when mounting tomcat server for upgrading ACS
Hi:
I've downloaded the Appliance Management package for 4.1.1.23 version. Once I extract all archives I execute the autorun.bat file. The problem is that the tomcat server doesn't work properly, continuously appears a message error:
INFO: WebServer not ready or not fully initialized -- testing again...
Which can be the problem?,
Many ThanksUpgrading the Cisco Secure ACS Solution Engine typically involves the following three steps:
1. Obtain the upgrade package from Cisco Systems and load it onto a distribution server in your network. This can be done either by employing an upgrade CD or downloading the upgrade package from Cisco.com.
2. Load the upgrade image onto the Cisco Secure ACS Solution Engine from the distribution server on your network. You can do this either from within the HTML interface, or from the serial console. The Cisco Secure ACS Solution Engine verifies the files transferred to ensure that they have not been corrupted. For more information on performing this step from the HTML interface, see the below URL:
http://www.cisco.com/en/US/products/sw/secursw/ps5338/products_user_guide_book09186a0080204be1.html
3. Finally, apply the Cisco Secure ACS Solution Engine system upgrade. You can do this either from within the HTML interface, or from the serial console. For more information, see:
http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_server_for_solution_engine/3.3/installation/guide/appliance/admap.html#wp1048998 -
I am getting error in transection created by crmd_order when status close ?
Hi Expert,
When i am creating transaction by tcode CRMD_ORDER in crm system ,I am getting warning "edit service ticket 800002568" when the status is close and was not able to see the system log.whenever i am cicking on log its show the warnoing and then control comes out from the transaction.I want to know the possible cause of this.Please anyone guide me to solve this.
Thanks,
Prem.Hi Laxmi,
As you said ,i am debugging all the modules ,i saw one thing for status close that we are getting a exception initially in class cl_gui_toolbar the error is Exception (cx_salv_bs_sc_runtime_info) occurred
this we are not getting for ticket status open ,inprocess.
why it coming is the problem ? -
Emca invalid username/password error on -repos create for recovered DB on new server
11.2.0.4 on Windows Server 2012 64 bit (new server)
database install without db create went fine.
restore of two backup databases went fine.
reconfig of Apex on new server went fine
cannot get dbcontrol configured.
emca -repos create works fine with sysman et al dropped
but when I try
emca -config dbcontrol db
I get an invallid username/password error
the log file indicates that it is initSqlEngineLoacly failing with a null value for user
and returning the ORA-01017 invalid username/password error.
why is it not using the sys user for this connection? I don't see a user parameter in the emca help.
Any suggestions? Do zi need to install the 32 bit Oracle client?error in log file is :
Apr 22, 2015 10:46:01 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine connecting with SID: prodtp, oracleHome: F:\app\Oracle\product\11.2.0\dbhome_1, and user:
Apr 22, 2015 10:46:04 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-01017: invalid username/password; logon denied
Apr 22, 2015 10:46:04 AM oracle.sysman.emcp.DatabaseChecks throwDBUnavailableException
SEVERE:
Database instance is unavailable. Fix the ORA error thrown and run EM Configuration Assistant again.
Note that the user is NULL and logon is denied
How do I configure emca to connect using SYS for this? That appears to be the problem at this point. -
After reload tomcat server we receive this error
oracle10g
apex version 4.0
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.IllegalStateException
org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407)
oracle.dbtools.apex.ModApexContext.handleError(ModApexContext.java:278)
oracle.dbtools.apex.ModApex.close(ModApex.java:144)
oracle.dbtools.apex.ModApex.doGet(ModApex.java:85)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.please help.
Edited by: A on 03-Aug-2011 22:44Hi,
By default settings Tomcat save Apex config file to temp folder.
When you re-start Tomcat that folder is deleted.
Try configure Apex Listener again.
If that do not help, post questions relating Apex Listener to
ORDS, SODA & JSON in the Database
Regards,
Jari -
Error 49: LDAP Invalid credential Supplied when installing Identity Server
I am installing oracle Acess manager with Active directory for windows server 2003. While installing
the identity server we facing the issue with
Error 49: LDAP Invalid credential supplied. Please see the attached screen shot for more details.At which stage are getting this error?
If you are getting this error after specifying LDAP Directory details during identity server install, make sure that your username/password for AD are correct.
if your domain name = example.com
and the user you are using is under cn=users in AD use:
1. cn=your_username,cn=users,dc=example,dc=com
and your password
2. if this doesn't work, try:
[email protected]
and your password. -
RMI Registry as a service.
I have found evidence that supports the possibility of rmiregistry.exe running as a service on windows, but I have not found any "How-To" for it. I wrote a batch file to run the command:
sc create "RMI Registry" binpath= "c:\Program Files\Java\jdk1.6.0_03\jre\bin\rmiregistry.exe" displayname= "RMI Registry" start= "auto"
However, when I attempt to start the service, I get the message:
ERROR 1053: The service did not respond to the start or control request in a timely fashion.
Where did I go wrong or is it just not possible?Do some searching in this forum and you may find some more leads. Also: try hard to google for it.
The registry exe simply does not have the interfacing required to act as a service.
So what most people do is try to write or obtain a service wrapper that can talk to/be controlled by the service manager, and which can also run the registry exe as another process. -
Hello,
I'm wondering if any of you have previous experiences in the following situation.
I have a linux server with tomcat 5.0.28 that is supposed to act as an RMI end point for clients connecting with the aforementioned RMI to do some persisting stuff. Now I figured that the easiest way is to create a servlet that creates the RMI registry and binds my server objects (so that's in the servlet's init(), with 1 load-on-startup, the servlet doesn't do anything else, at least yet).
Now problems arise: my linux server is logging "context is read-only" when trying to bind the objects to RMI. Testing on my windows laptop doesn't show the same error for some reason (although it doesn't work properly either). This is apparently normal, as the contexts are supposed to be read-only.
Thing is, I wouldn't want to run a separate rmiregistry on the server, if possible to do it with a simple servlet. But is this the easiest way?
Thank you in advance,
yours truly, in sickness and in health,
Jussi'Context is read-only' is not a Registry error
message. You are trying to bind to something else.
Show us some code.Well, I'm not doing a lot of binding, so I'm assuming it's this part:
DDBServer stub = (DDBServer)UnicastRemoteObject.exportObject(this, 0);
Registry registry = LocateRegistry.getRegistry();
registry.rebind("DDBServer", stub);The error message is:
2007-04-18 14:06:40 NamingContextListener[Catalina/localhost/DDBServer]: Creation of the naming context failed: javax.naming.NamingException: Context is read only -
Hi Guruz,
Let me describe the problem..
I have 2 apps running on tomcat server. Both the apps initiates RMI server and then regiter the object on RMI registry. If I deploy both the app on a single web server ( Tomcat ) and start the server, it successfully create and register the rmi object but the subsequent app when attempts to register their object, it crashes.
I am pasting the snippet of code that initiate rmi regitry.I am using the same code to initiate rmi registry with the same port.
try{
//Start the RMI registry
registry = LocateRegistry.createRegistry(ServiceProperties.rmiServerBindPort);
catch(RemoteException re){
try {
registry = LocateRegistry.getRegistry(ServiceProperties.rmiAppHost, ServiceProperties.rmiServerBindPort);
} catch (RemoteException remE) {
log.error("could not initialize RMI registry", remE);
throw remE;
Here's the error that is being thrown if subscequent app try to initiate rmi registry. Both the apps have same security policy present. Please give you input why this is happening.
ERROR : remote exception.....Failed to bind to RMI registry : RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.abc.efg.hij.RMIListenerImpl_Stub (no security manager: RMI class loader disabled)
Regards,
KashifYou can only run one rmi on a single port. You are going to have to use different machines or different ports. How would java be able to distinguish which registry to use if this were possible?
-
Is the RMI registry "process-atomic"?
Hi,
Sorry if this is a really stupid question, and I have really tried to find this out on my own.
When I say "process" I mean Process, as opposed to Thread.
What I mean is, if one Process calls Registry.bind( String, Remote ), can we be sure that another Process which does the same thing one nanosecond later will get an AlreadyBoundException if it calls with the same String?
The context is that up to now I have been starting the RMI Server (only for logging at the mo, these are my first steps) explicitly in a Process. But now I want to move to "lazy" startup of the RMI registry and of the Server... so I would go LoggerInterface.log( bindingName, message ), and if the name "bindingName" is not presently in the registry it will create a new Server, and log the message using it.
More specifically, this is about me trying to automate OpenOffice apps using Java... and it occurs to me that 2 events could indeed happen almost simultaneously, so in fact even explicitly starting up the Server in each handler module might encounter "Process concurrency" problems ... so I need to have an answer to this.
I hope the answer is yes... otherwise I'm going to be a bit flummoxed about how to ensure one doesn't start up one Server Process from one calling Process, and another Server Process from another calling Process.
ThanksI mean to use rebind() instead of the lookup()/bind() pair. It is atomic.... I understand it is atomic, but my point is that between checking whether you need to rebind (because the bound stub is invalid) and actually doing the rebind there will be an interval. If you systematically use rebind, without a prior check to make sure your Remote is actually attached to an existing Process, every call will cause a new Server Process to be created and then rebound, one after another. Which would be a mess.
I'm going to spend a bit of time looking at your two references... thanks for them.
I have thought of a possible solution involving a sort of lock, but I'm not sure if it works.
1. create a "DummyInterface" extending Remote:
public interface DummyInterface extends Remote {
}2. in the Process + Thread which actually sets up the Registry, bind a DummyInterface
Registry reg = null;
try {
reg = LocateRegistry.createRegistry( 1099 );
} catch (RemoteException e) {
return; // is this right? see below...
DummyInterface dummyStub = new DummyInterface(){};
try {
dummyStub = (DummyInterface) UnicastRemoteObject.exportObject( dummyStub, 0);
} catch (RemoteException e) {
// TODO sthg
e.printStackTrace();
try {
reg.bind( "DummyLockForLoggerServer", dummyStub );
} catch (AlreadyBoundException e) {
// every Thread in every Process (except the first such) to call "bind" will get here
return;
} catch (Exception e) {
// TODO sthg
e.printStackTrace();
}3. the first Process + Thread which wants to set up the LoggerServer will have first to unbind the DummyLock.
try {
reg.unbind( "DummyLockForLoggerServer" );
} catch (AccessException e) {
// TODO sthg
e.printStackTrace();
} catch (RemoteException e) {
// TODO sthg
e.printStackTrace();
} catch (NotBoundException e) {
// every Thread in every Process (except the first such) to call "unbind" will get here
return;
// only one Thread in one Process will ever succeed in getting here
// start the LoggerServer
String qualifiedClassName = ".... rmi.LoggerServer";
String[] a_commandArgs = { "java", qualifiedClassName, "logName" };
Process process = null;
try {
process = Utils.runSubprocess(a_commandArgs, null, ProcessSettings.getJavaRootDir());
} catch (IOException e) {
// TODO sthg
e.printStackTrace();
}... however there seem to be one or two questions about this:
- does reg = LocateRegistry.createRegistry( 1099 ); throw a RemoteException if the Registry is already bound? I don't know and intend to do a few experiments to find this out for myself. But in any event only one Process+Thread can ever bind the dummy lock
- there might be a race condition nonetheless to do with the interval between creating the Registry and binding the dummy lock... during this interval the Registry is established, and the dummylock is not yet set up... but I think this does no harm, as a Process trying to start the LoggerServer during this time will get the "NotBoundException" and simply return (and the calling thread will then sleep for a bit before trying again). -
RMI registry on multiple net interfaces
I'm interested in creating several RMI registry servers, each one listening in one different net interface of the same machine (two ethernet cards). Is there any way to do this without using custom RMI socket factories? From the documentation I have read, it looks like there's no possibility to choose a specific network interface. Instead, RMI registry chooses the one associated to localhost.
Thanks in advance.
ZealonYou could use
LocaeRegistry.createRegistry(port,csf,ssf) with an
RMIServerSocketFactory that binds the ServerSocket to
the appropriate network address, but you will then
discover that you can only have one Registry per JVM
because it has a fixed objectID, so don't bother.
But actually, why do you want to do this? Your stated
reason is not correct. By default any ServerSocket,
including those created by the Registry and RMI, is
bound to 'any', which means it should accept from all
network interfaces. Perhaps you have the classic
'hosts' hosts/DNS setup problem where your servers
embed 127.0.0.1 in the stub? Use
-Djava.rmi.server.hostname at the server JVM, or
better still fix your 'hosts' file or DNS setup.
EJPThanks for your reply. Maybe I didn't explain myself enough.
I'm working in medical electrocardiography, and have a PC with two net interfaces. The first one is bound to a LAN IP address that belongs to a medical network. Each one of the hosts in this medical network is an electrocardiography monitor, attached to a patient..
The second net interface is an external IP address (not LAN address).
I created a remote class called MonitorFactory, that should provide information about the electrocardiography monitors existing into the medical network. It works OK, and I cand bind MonitorFactory objects to a RMI registry with no problem at all.
There are some reasons I would like to use several RMI registries:
- First one, I need to control access from external network to my medical network. Medical patient data must be handled very carefully. I thought I could do so by enabling/disabling an RMI registry bound to the external IP address. This way, I could enable access to medical data from outside the medical network, by registering my MonitorFactory objects to this external RMI registry, but only when I decide to do that.
- Second one, I want an RMI registry always running bound to the medical LAN IP address, so I could use the applications that use MonitorFactory like a local application, not only like a remote one.
This scheme represents the system I have to build:
PC with two network interfaces
External PC <----------->|213.xxx.xxx.xxx 192.xxx.xxx.xxx|<----------> Medical network
MonitorFactory - Listens to medical data into 192.xxx.xxx.xxx network only. Bound to
external RMI registry when available and always bound to internal RMI registry.
External RMI registry - bound to 213.xxx.xxx.xxx. Enabled when I decide to do so.
Internal RMI registry - bound to 192.xxx.xxx.xxx. Always enabled.
If I create an RMI registry bound to "any" of the interfaces, I always risk my medical data to the Internet, because there is always a port open at 213.xxx.xxx.xxx accepting connections.
One possible solution could be using SSL sockets for RMI. This way, only allowed clients could connect to RMI registry. But what worries me most is the fact that a port could be open to the Internet - what about attacks to this open port? If those attacks could make RMI registry fall, medical data flow to another information systems could be interrupted, including medical alarms like critical patient status.
On the other way, I would like to maintain RMI default sockets for compatibility and future releases of my application.
Any suggestions?
Thanks in advance.
Zealon. -
Cannot rename DC, "Cannot create a file when that file already exists."
Hi,
A long time ago we used a domain controller named jacob.mydomain.lan. It was removed, possibly in a 'dirty' way, and now we cannot re-use that name for another domain controller. In the meantime we have upgraded to Win 2012 domain controllers
now, and when I enter this to rename:
netdom computername ourdc.mydomain.lan /add:jacob.mydomain.lan
I get the error: "Unable to add jacob.mydomain.lan as an alternate name for the computer. The error is: Cannot create a file when that file already exists."
If I enter:
netdom computername ourdc.mydomain.lan /remove:jacob.mydomain.lan
I get: "The command completed successfully", but it still refuses to add jacob.mydomain.lan
After each attempt to add a forward zone dns record 'jacob.ourdomain.lan' has been created. I always erase this manually afterwards.
What is the problem? How can I search to find the offending 'file' named 'jacob'?
Thanks a lot for help on this.
regards TorKevin,
I suggest you wait 30 days instead of 3 days before you enthusiastically close threads. Some people might think you are being a jerk if you don't.
"K_evin Zhu" wrote in message
news:[email protected]...
Hi,
As this thread has been quiet for a while, we will mark it as �??Answered�?? as the information provided should be helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to
unmark the answer as you wish.
BTW, we�??d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks for your understanding and efforts.
Best Regards
Kevin
Tomás Mason
Maybe you are looking for
-
So as I already said I saw today that there i a little red stain on my pictures if i use my camera The stain wasnt there yesterday and i cant get it away What is is and how can i get it away Should i go to an apple store or can i fix it myself My iph
-
Hello All, I'm using the transaction MB90 and I try to view a Z form but appear next error 'Form Zxxx language EN is not active and has no errors' I don´t know why happend it because the form is activated and contain any errors. I don´t transport any
-
How do i extract pages from a pdf file folder on my computer system?
This whole set-up is starting to piss me off. I have spent all morning downloading this FREE trial and it has not done anything it purports to do.
-
hi gurus, I have an issue which was listed below, please give me advice how to proceed We have a new request about delivery cost.Our request is composed of two parts: First part: We want some mandotary conditions in ZTR002 calculation schema.We make
-
I just installed iTunes. I previously had a problem with QT but uninstalling the particular Windows patch recommended by another user and using the standalone installer remedied that. Itunes installed completely but I then received a Windows error up