Issues with DHCP on development laptop
I'm trying to evaluate Membase on my Windows 7 x64 laptop and running into an obnoxious issue where it appears to be binding quasi-permanently to my laptop's external IP address. I installed Membase while on my home network and it was working fine until I went to the coffee shop for the afternoon, when the client decided that the node was dead. I eventually tracked down the issue to the IP address when the admin console showed my home IP address instead of the current one. Sure enough with logging turned on in the client it was saying that the node at my old IP address was dead and it couldn't connect.
Is there some way to bind to just localhost? I only found 3 threads even referencing DHCP and none had a fix. Surely Membase must have a way to develop on a laptop short of uninstalling/reinstalling every time your IP address changes?
Thanks,
John
Hi Steve,
The Membase service doesn't seem to like being bound to 127.0.0.1. After registering it at 127.0.0.1 the executables all start, but then immediately terminate. The following is in the System event log, "MembaseServer: Erlang machine stopped instantly (distribution name conflict?). The service is not restarted, ignoring OnFail option.". Here's a link to the dump file it seems to have generated: http://dl.dropbox.com/u/7230783/erl_crash.zip
Running service_reregister.bat fixed the issue where it can't start, but now it's bound to the external IP address again.
Any ideas?
Thanks!
John
Hi John,
You're right and apologies for the typo in the service_register.bat parameter. Please try...
service_stop.bat
service_unregister.bat
service_register.bat ns_1@127.0.0.1
service_start.bat
Cheers,
Steve
Hi Steve,
That did the trick! In the admin console it shows up as 127.0.0.1 and works as expected now.
Thanks!
John
I'm making this a sticky post as it contains a quick and uncluttered description of the problem and working solution.
You can also look at this wiki page for more information: http://wiki.membase.org/display/membase/Using+Membase+in+the+Cloud
Perry
Hi John,
On windows, ip addresses are picked automatically at installation time. (It's a bit more dynamic on linux, due to some erlang platform differences.) If the machine has several addresses, like ethernet (right one), vmware host interfaces, VPN, etc... — the wrong address might be picked. A correct address can be re-configured on windows (which you should do before joining the windows membase node to other nodes, as this will reset your configuration) using...
service_stop.bat
service_unregister.bat
service_register.bat <new-dotted-quad-IP-address>
For example, for a dev windows laptop that you're migrating between cafe, home and elsewhere, you might pick: service_register.bat 127.0.0.1
Cheers,
Steve