powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / Spring boot Ошибка аутентификации (error 18), но из intellij - работает?
1 сообщений из 1, страница 1 из 1
Spring boot Ошибка аутентификации (error 18), но из intellij - работает?
    #39402477
_webdev_
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Здравствуйте,

поискал в интернете, но решения так и не нашел, может кто сталкивался?
Есть MongDb запущенная из docker(офф дистрибутив), из intellij плагина(Mongo Explorer) - аутентифицируюсь, вижу данные на сервере.

Теперь пытаюсь получить коннект из spring-boot - соответственно в application.properties
Код: java
1.
spring.data.mongodb.uri=mongodb://jdev:pass@ip:37017/cam?authMechanism=SCRAM-SHA-1



Полчуаю такую ошибку.
Код: java
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
2017-02-10 18:03:44.889  INFO 5388 --- [  restartedMain] org.mongodb.driver.cluster               : Cluster created with settings {hosts=[ip:37017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
2017-02-10 18:03:45.230  INFO 5388 --- [ip:37017] org.mongodb.driver.cluster               : Exception in monitor thread while connecting to server ip:37017

com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='jdev', source='cam', password=<hidden>, mechanismProperties={}}
	at com.mongodb.connection.SaslAuthenticator.wrapInMongoSecurityException(SaslAuthenticator.java:157) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.SaslAuthenticator.access$200(SaslAuthenticator.java:37) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:66) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:44) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.SaslAuthenticator.doAsSubject(SaslAuthenticator.java:162) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.SaslAuthenticator.authenticate(SaslAuthenticator.java:44) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.InternalStreamConnectionInitializer.authenticateAll(InternalStreamConnectionInitializer.java:109) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:46) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:116) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:113) ~[mongodb-driver-core-3.4.1.jar:na]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
Caused by: com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server ip:37017. The full response is { "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed" }
	at com.mongodb.connection.CommandHelper.createCommandFailureException(CommandHelper.java:170) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.CommandHelper.receiveCommandResult(CommandHelper.java:123) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.SaslAuthenticator.sendSaslStart(SaslAuthenticator.java:117) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.SaslAuthenticator.access$000(SaslAuthenticator.java:37) ~[mongodb-driver-core-3.4.1.jar:na]
	at com.mongodb.connection.SaslAuthenticator$1.run(SaslAuthenticator.java:50) ~[mongodb-driver-core-3.4.1.jar:na]
	... 8 common frames omitted




Благодарен за подсказки.
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / Spring boot Ошибка аутентификации (error 18), но из intellij - работает?
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]