cancel
Showing results for 
Search instead for 
Did you mean: 

'rmiAuthenticationService' Error creating bean with name

mrudmann
Champ in-the-making
Champ in-the-making
Hi Group,
I am getting the error below when running my new build from svn as of 12/22/06.  I am running Alfresco community Network.

"…org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rmiAuthenticationService' defined in class path resource [alfresco/authentication-services-context.xml]: Initialization of bean failed; nested exception…"

Obviously, it is an RMI related issue.  I was wondering if I need to configure RMI somewhere?  Do I need to build alfresco again with other libraries?  Do I really need tomcat_viirtual pointed to the separate instance of tomcat for some of this?  etc.

Your help is appreciated!

Thanks!
-Matt
15 REPLIES 15

yahya114
Champ in-the-making
Champ in-the-making
Hi, Matt

I have the same problem…

Have you found the solution?

Would you kindly to post it?

Thanks,
- yahya

hiteshlad
Champ in-the-making
Champ in-the-making
We had this problem too, on OSX.  Could have been a zombie process.

So we paid Smiley Surprised the apple tax Smiley Surprised closed all our windows and rebooted.  Then it started up correctly.

If not, you may want to turn on the log4j level for
remoting.rmi.RmiRegistryFactoryBean and remoting.rmi.RmiServiceExporter.

- hitesh

richmitc
Champ in-the-making
Champ in-the-making
Below are my errors upon installation of 2.0 Preview under Fedora Core 6.  Based on the advice above I already 1) uninstalled, 2) rebooted, 3) installed, 4) rebooted, 5) started.   I got the same error.  I'll turn things on at the appropriate level in log4j next.  Meanwhile, I post this in case someone has already solved it.  Thanks.

14:18:55,504 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
14:25:15,069 WARN  [remoting.rmi.RmiServiceExporter] Could not detect RMI registry - creating new one
14:28:30,463 WARN  [remoting.rmi.RmiServiceExporter] Could not detect RMI registry - creating new one
14:28:30,649 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rmiAuthenticationService' defined in class path resource [alfresco/authentication-services-context.xml]: Initialization of bean failed; nested exception is java.rmi.server.ExportException: internal error: ObjID already in use
java.rmi.server.ExportException: internal error: ObjID already in use

richmitc
Champ in-the-making
Champ in-the-making
I found my problem.  It is embarrassing enough that I considered pulling the above post.  However, maybe someone else would have the same issue….

I had hostname/host resolution problems.  I was trying, in the recent past, to get my Fedora system to work right with DNS vis-a-vis my setup behind a couple of routers between it and my cable modem.  It turns out that it still wasn't working right.  I went back to a static 192.168.x.y IP address with appropriate mask, gateway, and DNS settings.  Alfresco startup problem gone.

Sorry to bother y'all.

richmitc
Champ in-the-making
Champ in-the-making
I'm back….

Thumbnails became available for 2.0 (thanks Ray) so that I have tried to install it on my "production" box.  This RMI problem is back.  From what I read in other posts in these forums, MANY other people are having the same problem.

I believe I have narrowed it down to a NAT issue.  I eliminated firewall as the problem by temporarily disabling it.  Of course, certain ports must be open on the firewall, but I just wanted to see if an unopened port was the problem.  It was not.

Here is the lowdown….  My "production" box is behind a Linksys router.  The router is set up to pass through Internet traffic to my box.  The public Internet IP is say w.x.y.z.  The box has an IP of 192.168.m.n on my local network.  If I put the host name in the form of host.xxxx.com or just host in the /etc/hosts file with the local network IP of 192.168.m.n, I get the "ObjID already in use" error.  If I put it in with an IP of w.x.y.z, I get a "192.168.m.n is a non-local host" error.  Catch-22.  Either way it doesn't work.

I've noticed other posts on the Internet where people have had this generalized problem with RMI and NAT.  They had to alter source code to make it work.  I will download the source code and check into that possibility.

Meanwhile, can someone point out to me, and from what I can see, many others who appear to have this NAT problem, how to fix it with just settings.

Thanks.

richmitc
Champ in-the-making
Champ in-the-making
I regret to inform you that I found a way to make this work under Fedora Core 6.  The regret is the fact the solution is kludgy and probably has adverse side-effects I have not run into yet.  The solution is as follows:

1.  Use the Network control panel at System->Administration->Network  or other means to change you hostname to localhost.localdomain.

2.  Remove or comment out any entries with your real host name in /etc/hosts.

3.  Add "-Djava.rmi.server.hostname=yourhost.yourrealdomain" to the JAVA_OPTS in alfresco.sh in /opt/Alfresco or wherever yours is.  Note yourrealdomain should have .com, .org, .edu or whatever is appropriate for you.

I'm hoping I have not tried all possible options but I tried many with various settings of java.rmi.server.hostname with various settings in /etc/hosts including nothing in /etc/hosts and other options like java.rmi.server.useLocalHostname (or java.rmi.server.useLocalHostName - I'm not sure which is right or if they both work).  For  all other options, I got either "ObjID already exists" or "is a non-local host".

I say I'm hoping I didn't try all options as I am hoping someone out there has a better solution for RMI behind NAT with Alfresco.

Thanks.

paullewon
Champ in-the-making
Champ in-the-making
Rich,

Thanks for this. I'm not out of the woods, but I'm past the RMI errors.

Paul

bpinnovators
Champ in-the-making
Champ in-the-making
I experienced this issue with the community 2.1 release. We are in the fortunate position to be testing the 2.1 enterprise (beta) release. It appears that the issue has been resolved in 2.1 enterprise (beta) as it is working even after backing out the changes posted by “richmitcâ€

richmitc
Champ in-the-making
Champ in-the-making
Yes, I have an "alias pj='ps -ef|fgrep java' in my /etc/bashrc just for this purpose i.e. checking for leftover java processes.  If you have one, you should get a "port 50500 already in use" error.

I still haven't found an answer, other than the one I posted, to this NAT issue.

My most recent attempt involved trying to comment out all of the RMI and AVM references in the XML configuration files as I am not doing the web content thing and got the impression that the AVM stuff is for that.  I couldn't get it to quite work.  There was always something else to get out or put in to resolve undefined references.

As such, I am back to 1.4 for now.

I'll check the forums as well as the SVN on occasion to see if there is an answer or a code change and/or I might still try to figure out one myself.