com.mongodb.MongoSocketOpenException: Exception opening socket

Google Groups | Shah Zaib | 8 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp . Or join the community to write better ones.
  1. 0
    samebug tip
    Check if your MongoDB is available.
  2. 0

    Getting exception while connecting to mongodb using java code.

    GitHub | 8 months ago | pthewizard
    com.mongodb.MongoSocketOpenException: Exception opening socket
  3. 0

    Trying to manage the Graylog Server with the separate graylog web in 2.1.1 version

    Google Groups | 8 months ago | Shah Zaib
    com.mongodb.MongoSocketOpenException: Exception opening socket
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Getting the following error when I am using lordofthejars in Spring boot application

    GitHub | 2 years ago | prabhakar349
    com.mongodb.MongoSocketOpenException: Exception opening socket
  6. 0

    I want to build a web application on Heroku, I can connect to mongodb, because I tried to create a collection in the Main.java, and it worked. There is the error message: {code} 6:47:08 PM web.1 | [main] INFO org.mongodb.driver.cluster - Cluster created with settings {hosts=[ds015869.mlab.com:15869], mode=SINGLE, requiredClusterTy… 6:47:08 PM web.1 | [main] INFO org.mongodb.driver.cluster - Cluster created with settings {hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNO… 6:47:08 PM web.1 | [cluster-ClusterId{value='56fda8ece1a1e38897e615c5', description='null'}-127.0.0.1:27017] INFO org.mongodb.driver.cluster - Exception i… 6:47:08 PM web.1 | com.mongodb.MongoSocketOpenException: Exception opening socket 6:47:08 PM web.1 | at com.mongodb.connection.SocketStream.open(SocketStream.java:63) 6:47:08 PM web.1 | at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:114) 6:47:08 PM web.1 | at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:128) 6:47:08 PM web.1 | at java.lang.Thread.run(Thread.java:745) 6:47:08 PM web.1 | Caused by: java.net.ConnectException: Connection refused 6:47:08 PM web.1 | at java.net.PlainSocketImpl.socketConnect(Native Method) 6:47:08 PM web.1 | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 6:47:08 PM web.1 | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 6:47:08 PM web.1 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 6:47:08 PM web.1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 6:47:08 PM web.1 | at java.net.Socket.connect(Socket.java:589) 6:47:08 PM web.1 | at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50) 6:47:08 PM web.1 | at com.mongodb.connection.SocketStream.open(SocketStream.java:58) 6:47:08 PM web.1 | ... 3 more 6:47:08 PM web.1 | [main] INFO org.mongodb.driver.cluster - No server chosen by WritableServerSelector from cluster description ClusterDescription{type=UN… 6:47:09 PM web.1 | [cluster-ClusterId{value='56fda8ece1a1e38897e615c4', description='null'}-ds015869.mlab.com:15869] INFO org.mongodb.driver.connection - … 6:47:09 PM web.1 | [cluster-ClusterId{value='56fda8ece1a1e38897e615c4', description='null'}-ds015869.mlab.com:15869] INFO org.mongodb.driver.cluster - Mon… 6:47:09 PM web.1 | {code}

    JIRA | 1 year ago | Junwei Zhuge
    com.mongodb.MongoSocketOpenException: Exception opening socket

  1. pulse00 40 times, last 2 hours ago
  2. Dunmer 6 times, last 1 month ago
  3. johnxfly 5 times, last 2 months ago
  4. andyglick 3 times, last 2 months ago
  5. rp 5 times, last 5 months ago
72 more registered users
23 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.ConnectException

    Connection refused

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    Socket.connect
    1. java.net.PlainSocketImpl.socketConnect(Native Method)[?:1.8.0_101]
    2. java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)[?:1.8.0_101]
    3. java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)[?:1.8.0_101]
    4. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)[?:1.8.0_101]
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[?:1.8.0_101]
    6. java.net.Socket.connect(Socket.java:589)[?:1.8.0_101]
    6 frames
  3. MongoDB Java Driver
    DefaultServerMonitor$ServerMonitorRunnable.run
    1. com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50)[graylog.jar:?]
    2. com.mongodb.connection.SocketStream.open(SocketStream.java:58)[graylog.jar:?]
    3. com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115)[graylog.jar:?]
    4. com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:116)[graylog.jar:?]
    4 frames
  4. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[?:1.8.0_101]
    1 frame