org.mongodb.driver.cluster : Exception in monitor thread while connecting to server localhost:27017
来源:互联网 发布:java main启动spring 编辑:程序博客网 时间:2024/06/04 23:48
com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.connection.SocketStream.open(SocketStream.java:63) ~[mongodb-driver-core-3.0.4.jar:na] at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:114) ~[mongodb-driver-core-3.0.4.jar:na] at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127) ~[mongodb-driver-core-3.0.4.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:1.8.0_45] at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) ~[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_45] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_45] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_45] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_45] at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50) ~[mongodb-driver-core-3.0.4.jar:na] at com.mongodb.connection.SocketStream.open(SocketStream.java:58) ~[mongodb-driver-core-3.0.4.jar:na] ... 3 common frames omitted
解决方案:
Spring Boot has a feature called "auto configuration". In this case, as soon as the Mongo driver is detected on the classpath, the MongoAutoConfiguration is activated with default values, which point to localhost:27017. If you don't want that behaviour, you can now either configure the properties for MongoDB (see http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-mongodb for valid property keys) or disable the MongoAutoConfiguration:
@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
阅读全文
0 0
- org.mongodb.driver.cluster : Exception in monitor thread while connecting to server localhost:27017
- springboot之mongoDB项目Exception in monitor thread while connecting to server localhost:27017
- Exception in thread "main" org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of
- Exception in thread "main" org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to co
- Hadoop 错误 Problem connecting to server: localhost/127.0.0.1:9000
- Exception in thread "main" org.hibernate.MappingNotFoundException
- Exception in thread "main" org.hibernate.MappingException
- Exception in thread "main" org.hibernate.InvalidMappingException: Unable to read XML
- Exception in thread "main" java.lang.IllegalAccessError: tried to access field org.slf4j.impl.Static
- Exception in thread "main" org.javalite.activejdbc.InitException: failed to determine Model class na
- Exception in thread "main" org.hibernate.HibernateException: Access to DialectResolutionInfo cannot
- Exception in thread "main" org.hibernate.AnnotationException: List/array has to be annotated with an
- Exception in thread "main" org.hibernate.QueryException: illegal attempt to dereference collection
- Exception in thread "main" org.hibernate.HibernateException: Access to DialectResolutionInfo cannot
- mongodb Failed: error connecting to db server: no reachable servers
- Connecting to Sybase Server
- Problem in connecting VS 2005 to SQL Server 2008
- Connecting to LDAP server using JNDI in Java
- python 数据分析
- Hibernate4 分组查询
- Navicat 2003-can't connect to MYSQL server on 'localhost'(10061)
- nc命令详解
- Android百度(1)---百度语音集成指南
- org.mongodb.driver.cluster : Exception in monitor thread while connecting to server localhost:27017
- 判断一个序列是否是一棵二叉树的后序遍历序列(分治算法)
- Spring中@Autowired注解、@Resource注解的区别
- 简单高仿荷包注册进度条
- LeetCode Exercise 8: Remove Nth Node From End of List
- ubuntu下修改mysql数据库root密码
- WebService
- 关于分库分表?
- SpringBoot32-springboot开发部署与测试-云部署,基于Docker的部署