Things I always forget about resolving Erlang nodes on localhost

Switching back and forth between programming languages and development environments gets easier over time. There is one thing that I’m constantly forgetting as switch back and forth between Java and Erlang however. In order to work with distributed Erlang nodes on OSX, you need an entry in your /etc/hosts file resolving 127.0.0.1 to your (short) hostname (because the OS seems incapable of resolving its shortname properly). The problem with doing this is it wreaks all kinds of havoc with java applications, so you need to remember to switch it back again when you’re jumping between developments environments. If you have both kinds of VM running at the same time in your dev environment then it’s a bit of a challenge to keep everything running smoothly. My solution (thus far) has been to use my extra laptop and run the java and erlang apps separately for dev/testing. This works fine as the target environment is generally linux so this OSX nonsense goes away once you’ve actually deployed somewhere.

Still, I forget this point regularly when flitting between my day job and personal projects. Hopefully having written it down will help me to remember.

About these ads
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: