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 2019/11/11 16:49:34 UTC

[GitHub] [couchdb] nickva commented on issue #2306: Listening ports in a standalone configuration

nickva commented on issue #2306: Listening ports in a standalone configuration
URL: https://github.com/apache/couchdb/issues/2306#issuecomment-552522743
 
 
   Hi @crissty,
   
   What you're seeing is probably the Erlang VM's distribution port open. That's the connection for other CouchDB (also Erlang VM) nodes to connect together so they can form a cluster.
   
   You can verify this by inspect the output of EPMD. That's Erlang's port mapper daemon, it keeps track of what Erlang nodes are running on each host and allows connecting to nodes on different hosts.
   
   ```
   $ epmd -names
   epmd: up and running on port 4369 with data:
   name node1 at port 65083
   ```
   
   In my case the extra open port was 65083 and it showed up as distribution port.
   
   You can control this port number (by default it is a random port number) and the interface it binds to using Erlang VM's `kernel` options. Erlang VM options usually go into the `vm.args` file. In the development mode the `vm.args` file is located in `rel/overlay/etc/vm.args`
   
   For example by adding this line there:
   
   ```
   -kernel inet_dist_use_interface {127,0,0,1}
   ```
   
   I got that  port to listen the the localhost interface.
   
   ```
    lsof -n -p 61704 | grep -i tcp
   beam.smp 61704  0t0      TCP 127.0.0.1:65528 (LISTEN)
   beam.smp 61704  0t0      TCP 127.0.0.1:65529->127.0.0.1:epmd (ESTABLISHED)
   beam.smp 61704  0t0      TCP 127.0.0.1:15986 (LISTEN)
   beam.smp 61704  0t0      TCP *:15984 (LISTEN)
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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