Ho installato due server s1 e s2. s1 è il server su cui è in esecuzione un server Web mentre s2 è il server su cui è in esecuzione il mio mongodb. Ho impostato l'autenticazione sull'istanza di mongo per sicurezza. Quando provo a connettermi all'istanza di mongo su s2 da s1 ottengo errori quando provo ad autenticarmi.Autenticazione Mongo
Se uso:
mongo DB --host HOST --port PORT -u USER -p PASSWORD
--authenticationDatabase DB --authenticationMechanism SCRAM-SHA-1
ottengo questo errore:
Error: 2 SASL authentication support not compiled into client library.
at src/mongo/shell/db.js:228
exception: login failed
Se uso:
mongo DB --host HOST --port PORT -u USER -p PASSWORD
--authenticationDatabase DB
ottengo questo errore:
Error: 18 { ok: 0.0, errmsg: "Challenge-response authentication using
getnonce and authenticate commands is disabled.", code: 2 } at
src/mongo/shell/db.js:228
exception: login failed
se uso:
mongo DB --host HOST --port PORT
salgo in ma poi ho bisogno di usare db.auth al fine di fare qualsiasi cosa e quindi ottengo questo errore:
Error: 18 { ok: 0.0, errmsg: "Challenge-response authentication using
getnonce and authenticate commands is disabled.", code: 2 }
ho idea perché io non posso entrare. Qualcuno può aiutarti?
Quale versione di server mongo stai usando? 3.0.X suppongo? Quindi SCRAM-SHA-1 è attivo per impostazione predefinita e anche il client deve supportarlo. –