Cannot use RMI after MacOS update to Mavericks

I have two separate Java EE projects: one server and one client (which is a website). They both run on Spring MVC framework. The server is launched via Spring boot as a Java application. The client runs on a local (127.0.0.1) Tomcat and invokes distant method located on the server via RMI.

I am now running this little crowd in Eclipse on a Mac mini running Maverick. Everything worked perfectly before the upgrade when the Mac Mini was running Lion. The client project cannot launch because it timeouts.

A colleague with the same code does not have any problem on his Windows setup, so did I before the upgrade to Maverick. This leads me to incriminate the OS, but what do YOU think?

Answers


I found the solution!

Basically, judging from the posts like this one, the problem isn't so much that RMI doesn't work on OSX Mavericks - it's just really slow.

The problem seems to be that Mavericks doesn't understand that 127.0.0.1 is localhost (no idea why). It seems to attempt searching it for on the internet first.

So the solution is to disconnect the mac from the internet, try the rmi connection (it'll work) and then reconnect it to the internet.

I've tried restarting the Spring boot server, still works. Recompiled code, still works. Restarted Eclipse, still works.

However, I restarted the computer, and it seems to have worked for a while and then stopped. I repeated the above and it works.

I haven't been able to test whether it works when the IP changes, but if it doesn't, I believe the "solution" is the same.


Need Your Help

g++ (4.7.2) bug or feature, when initializing static arrays at compile-time?

c++ arrays templates initialization compiler-bug

Okay, so I was trying to do something clever by initializing a bunch of constexpr static int const arrays at compile-time. Even though the runtime-performance is not at all governed by initializing...

SQL 2008 Clustering

windows-server-2008 sql-server-2008 cluster high-availability

I need to configure SQL or Windows 2008 Clustering to get HA with no packet loss.