You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/02/18 14:32:25 UTC

[GitHub] RamanBut-Husaim opened a new issue #69: "Empty reply from server" with local.ini file without bind_address specified

RamanBut-Husaim opened a new issue #69: "Empty reply from server" with local.ini file without bind_address specified
URL: https://github.com/apache/couchdb-docker/issues/69
 
 
   Hello, 
   Today faced the issue with the custom `local.ini` configuration file connected to the container. If there is no `bind_address` specified simple `curl http://127.0.0.1:5984/` returns the error `curl: (52) Empty reply from server` so that you could not connect to the container from the host machine.
   
   I'm totally new to `couchdb` and it took me ~2 hrs playing with docker and experimenting in order to find what actually breaks my setup.
   
   `docker-compose` file that I'm using to launch couch db
   
   ```yml
   version: '3.5'
   
   services:
     couchdb:
       image: couchdb:2.1.1
       ports:
         - target: 5984
           published: 5984
           protocol: tcp
           mode: host
       volumes:
         - type: volume
           source: dotnetweekly-api-data
           target: /opt/couchdb/data
         - type: bind
           source: ./config
           target: /opt/couchdb/etc/local.d
         - type: bind
           source: ./logs
           target: /opt/couchdb/log
   
   volumes:
     dotnetweekly-api-data:
   ```
   
   `local.ini` file that I've used:
   
   ```ini
   [couchdb]
   file_compression = snappy
   max_dbs_open = 100
   max_document_size = 2000000 ; 2 MB
   
   [log]
   writer = file
   file = /opt/couchdb/log/couch.log
   ```
   
   The log entry that point me to the right direction is (without mount with custom configuration file):
   ```
   [info] 2018-02-18T13:39:55.188704Z nonode@nohost <0.195.0> -------- Apache CouchDB has started on http://any:5986/
   ```
   (with custom config file without bind_address):
   ```
   [info] 2018-02-18T13:45:48.291813Z nonode@nohost <0.195.0> -------- Apache CouchDB has started on http://127.0.0.1:5986/
   ```
   
   I've fixed the issue using the following lines in the config file:
   ```ini
   [httpd]
   bind_address = 0.0.0.0
   
   [chttpd]
   bind_address = 0.0.0.0
   ```
   
   ## Expected Behavior
   
   It will be great if the docker documentation https://hub.docker.com/_/couchdb/ will contain some information or notes regarding this as right now it is really confusing.
   
   ## Current Behavior
   
   No information about `bind_address` override in the configuration right now.
   
   ## Possible Solution
   
   Update the documentation to include the note regarding `bind_address`.
   
   ## Context
   
   I want to develop with and deploy CouchDb using the docker container and the current image however the initial steps with configuration are painful.
   
   ## Your Environment
   
   * Version used: CouchDB 2.1.1
   * Operating System and version (desktop or mobile): 
     + Docker: Version 17.12.0-ce-mac49 (21995), Channel: stable;
     + Docker Compose: 1.18.0
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services