We’ve been analysing noSQL world for a while to be able use it in a new project of Nexum. I’ve seen that could be a good opportunity to go back to the “software world” which I loved most in the past and tried to do my own research. First of all, I’ve downloaded and setup MongoDB on my personal computer running Ubuntu(on VM) to see if it fulfills our needs. I did couple of POC by creating test data and trying to play with it via .NET client. After all these years passed by experience on relational database, I’ve got a little bit confused but that just made me more curious on noSQL(to be honest, somehow, I loved it). After reading couple of best practices online, I gave a shot to Couchbase. I’ve downloaded Windows version from the site and set it up without any problem. But when I tried to connect to server, I’ve seen the famous -but not as welcoming as it should be- UI of Chrome:
See? Not an expected response… I followed the steps to resolve this issue.
1. Probably, there should be a service, and probably it has to be running(Yes, indeed, there is a service and it is running):
2. Logically, service listener should be running on a port. I’ve found related ports from Couchbase’s site.
3. Is there any service/deamon running on the port(8091 should have to be busy related with my problem. Only 8092 is being listened at the moment)?
P.S.: You can check your active ports by entering following command on DOS command line(Microsoft Windows only)
netstat -an -p tcp
4. “localhost” that I was using is correctly defined as “127.0.0.1”. Nothing was wrong with that. I’ve restarted windows service and checked event viewer. there was no error.
5. I’ve checked the directory and the files under that Couchbase installed(default is “C:\Program Files\Couchbase\” if you’re using Microsoft Windows). I’ve found the batch files(.bat) under “Server\bin” folder:
service_register.bat
service_reregister.bat
service_unregister.bat
service_start.bat
service_stop.bat
6. I’ve opened “service_register.bat”. I was really suprised(and upset with myself) when I see the advanced batch file codes in that file (after 20 years, they seemed really advanced). There was a line in that file as following: for /f “tokens=1* delims=” %%a in (‘cmd /q/c “type bin\ipaddr.out”‘) do set IP_ADDR=%%a. Probably IP_ADDR variable is being set to “%%a” according to these weird codes. I figured out that the line just before that is somehow involved to set “%%a” variable which is related with the “ipaddr.out” file. I’ve opened in my text editor.
7. The happy ending… In the file, address was given as “169.254.252.63”. I’ve changed it to “127.0.0.1” and saved the file(If you get “read only error” or something like that, just run your text editor with administrator rights).
8. I’ve runned “service_unregister.bat” file and “service_register.bat” files consecutively.
9. Final: Couchbase 2.0 is working as expected.