0

Need help to resolve and connect to couchbase server.

I have installed couchbase server community edition. Post installation I tried to access the server on port 8091. But no luck, browser complaining connection refused.

Tech Details

couchbase-server-community_4.5.1-windows_amd64

Fiddler Tracking

Request

GET http://localhost:8091/ HTTP/1.1

Host: localhost:8091

Proxy-Connection: keep-alive

Upgrade-Insecure-Requests: 1

User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8

Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.8

Response

HTTP/1.1 502 Fiddler - Connection Failed

Date: Fri, 04 Aug 2017 12:12:51 GMT

Content-Type: text/html; charset=UTF-8

Connection: close Cache-Control: no-cache, must-revalidate Timestamp: 17:42:51.523

[Fiddler] The connection to 'localhost' failed.
Error: ConnectionRefused (0x274d).
System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it [::1]:8091

Control Panel Services status which reflect Couchbase Server started.

enter image description here

Telnet Status enter image description here

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Rizwan
  • 2,369
  • 22
  • 27
  • are you sure you use correct telnet syntax? on linux telnet requires space as host/port separator. Also note that it is trying to connect to port 23, and interprets `127.0.0.1:8091` as hostname. – avsej Aug 06 '17 at 20:48
  • Edited for the correct telnet syntax to refer port 8091. Still it shows connect failed. – Rizwan Aug 07 '17 at 01:39
  • Do you see any errors in the server logs? `C:\Program Files\Couchbase\Server\var\lib\couchbase\logs`. Is it possible that firewall is actively blocking it? – avsej Aug 07 '17 at 16:47
  • @avsej It would be really helpful if you point me for the firewall config, please. – Rizwan Aug 07 '17 at 16:53
  • Sorry I'm not windows expert, but you could try something like this https://support.microsoft.com/en-us/help/4028544/windows-turn-windows-firewall-on-or-off – avsej Aug 07 '17 at 16:55
  • Yes, firewall needs to be open for the port. Now I have stuck on the port config as on my machine McAffee is running and utilizing the port 8091/8092. Is there any way I can customize the couchbase server ports? – Rizwan Aug 09 '17 at 10:56
  • 1
    It is possible to reassign ports for Couchbase Server: https://developer.couchbase.com/documentation/server/current/install/install-ports.html. But you'll better uninstall McAffee as internets say that it is worst antivirus on the planet – avsej Aug 09 '17 at 11:03
  • @avsej thanks for the pointer of reassign, I will go through and update you. The other part of uninstalling McAfee can't be done, this one is got licensed copy on my office workstation :( – Rizwan Aug 09 '17 at 12:15

1 Answers1

0

Issue was with the McAfee utilizing the default ports of the couchbase server.

Solution

  • Customized couchbase installation to use user defined ports.
  • Updated etc\couchbase\static_config with the custom ports instead of 8091 -> 9000
  • Along with above modified Couch API port via couchdb\default.d\capi.ini 8092 -> 9001
  • Deleted var\lib\couchbase\config\config.dat
  • Started Couchbase Service.

Solved

  • http://localhost:9000/ is accessible now.
  • couchbase logs also confirmed the same.
    • [couchdb:info,2017-08-11T14:24:25.815+05:30,couchdb_ns_1@127.0.0.1:cb_couch_sup<0.95.0>:couch_log:info:41]Apache CouchDB has started on http://0.0.0.0:9001/
Rizwan
  • 2,369
  • 22
  • 27