Search code examples
socketscouchbasewindows-firewallmcafee

Cannot connect to Couchbase Server on Windows machine at localhost 8091


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


Solution

  • 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/