How to enable HTTP console on MongoDB 2.6 replica set

后端 未结 3 549
醉话见心
醉话见心 2021-02-10 17:59

I\'m running a 3 server MongoDB replica set. I recently upgraded from 2.4 to 2.6.

On 2.4 I was able to reach the HTTP Console on all three servers, regardless of whethe

相关标签:
3条回答
  • 2021-02-10 18:46

    Adding

    httpinterface=true
    

    in /etc/mongod.conf enables it on http://127.0.0.1:28017 I had to add

    rest=true
    

    to enable REST interface so that commands in http console are working.

    0 讨论(0)
  • 2021-02-10 18:49

    https://docs.mongodb.com/ecosystem/tools/http-interfaces/

    HTTP Status Interface

    Deprecated since version 3.2: Starting in 3.2, MongoDB deprecates the HTTP interface.

    0 讨论(0)
  • 2021-02-10 18:58

    For mongodb v3.0.2 the mongod.conf is a yaml file, you should add these two lines after net:

    http.enabled: true
    http.RESTInterfaceEnabled: true
    

    my mongod.conf is

    net:
      bindIp: 127.0.0.1
    
      http.enabled: true
      http.RESTInterfaceEnabled: true
    
    0 讨论(0)
提交回复
热议问题