0

my mongodb auth is false but it getting error my mongodb.conf file have no authenication

# Turn on/off security.  Off is currently the default


#noauth = true
#auth = true

my mongodb user conf file

 "mongodb": {
    "hosts": ["127.0.0.1"],
    "db": "openhab",
    "user": "",
    "password": ""
}

enter image description here

bhupathi turaga
  • 297
  • 2
  • 16

1 Answers1

0

An empty string is still parsed as a value so for you to login without auth you need to omit the user and password fields. So the correct solution is this:

"mongodb": {
    "hosts": ["127.0.0.1"],
    "db": "openhab"
}
Marco Yammine
  • 323
  • 1
  • 10