com.mongodb.MongoSocketOpenException: Exception opening socket

GitHub | pthewizard | 3 months ago
  1. 0

    Getting exception while connecting to mongodb using java code.

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

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

    Google Groups | 2 months ago | Shah Zaib
    com.mongodb.MongoSocketOpenException: Exception opening socket
  3. 0

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

    GitHub | 1 year ago | prabhakar349
    com.mongodb.MongoSocketOpenException: Exception opening socket
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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 | 8 months ago | Junwei Zhuge
    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 | 8 months ago | Junwei Zhuge
    com.mongodb.MongoSocketOpenException: Exception opening socket

  1. rp 2 times, last 2 months ago
  2. richard77 2 times, last 1 week ago
  3. treefolk 1 times, last 2 weeks ago
  4. kjhdofjosvs 20 times, last 2 weeks ago
  5. Andreas Häber 9 times, last 3 weeks ago
45 more registered users
49 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)
    2. java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    3. java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    4. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    6. java.net.Socket.connect(Socket.java:589)
    6 frames
  3. MongoDB Java Driver
    DefaultServerMonitor$ServerMonitorRunnable.run
    1. com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50)
    2. com.mongodb.connection.SocketStream.open(SocketStream.java:58)
    3. com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115)
    4. com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:116)
    4 frames
  4. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame