No se puede conectar a la base de datos de MongoDB (extremo prematuramente final del flujo) -- java campo con mongodb camp Relacionados El problema

Can't connect to MongoDB Database (Prematurely reached end of stream)


0
vote

problema

Español

bien hola,

Para alguna razón extraña, recibo este error extraño

      import com.mongodb.ConnectionString;     import com.mongodb.MongoClientSettings;     import com.mongodb.connection.SslSettings;     import com.mongodb.reactivestreams.client.MongoClient;     import com.mongodb.reactivestreams.client.MongoClients;  public class Main {      public static void main(String[] args) {         MongoClient client = MongoClients.create(MongoClientSettings.builder()                 .applyConnectionString(new ConnectionString("mongodb+srv://Nomar:password@development-uxfw3.mongodb.net/test"))                 .retryWrites(true)                 .applyToSslSettings(builder ->                         builder.applySettings(SslSettings.builder()                                 .enabled(false)                                 .build()))                 .build());     } }   

Estoy 100% seguro de que se supone que se conecta pero

  INFO: Exception in monitor thread while connecting to server development-shard-00-00-uxfw3.mongodb.net:27017 com.mongodb.MongoSocketReadException: Prematurely reached end of stream     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:249)     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:235)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:282)     at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(WindowsAsynchronousSocketChannelImpl.java:575)     at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:387)     at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)     at java.base/java.lang.Thread.run(Thread.java:844)  Dec 29, 2018 7:34:38 PM com.mongodb.diagnostics.logging.JULLogger log INFO: Exception in monitor thread while connecting to server development-shard-00-01-uxfw3.mongodb.net:27017 com.mongodb.MongoSocketReadException: Prematurely reached end of stream     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:249)     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:235)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:282)     at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(WindowsAsynchronousSocketChannelImpl.java:575)     at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:387)     at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)     at java.base/java.lang.Thread.run(Thread.java:844)  Dec 29, 2018 7:34:38 PM com.mongodb.diagnostics.logging.JULLogger log INFO: Exception in monitor thread while connecting to server development-shard-00-02-uxfw3.mongodb.net:27017 com.mongodb.MongoSocketReadException: Prematurely reached end of stream     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:249)     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:235)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:282)     at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(WindowsAsynchronousSocketChannelImpl.java:575)     at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:387)     at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)     at java.base/java.lang.Thread.run(Thread.java:844)   

https://hastebin.com/qenogifiri.sql Simplemente no puedo solucionar este problema, verifiqué los tipográficos que he revisado la lista blanca IP, he revisado otras versiones de MongoDB / Otros tipos

Original en ingles

Well hello,

for some odd reason, I'm getting this strange error

    import com.mongodb.ConnectionString;     import com.mongodb.MongoClientSettings;     import com.mongodb.connection.SslSettings;     import com.mongodb.reactivestreams.client.MongoClient;     import com.mongodb.reactivestreams.client.MongoClients;  public class Main {      public static void main(String[] args) {         MongoClient client = MongoClients.create(MongoClientSettings.builder()                 .applyConnectionString(new ConnectionString("mongodb+srv://Nomar:password@development-uxfw3.mongodb.net/test"))                 .retryWrites(true)                 .applyToSslSettings(builder ->                         builder.applySettings(SslSettings.builder()                                 .enabled(false)                                 .build()))                 .build());     } } 

I'm 100% sure its supposed to connect but

INFO: Exception in monitor thread while connecting to server development-shard-00-00-uxfw3.mongodb.net:27017 com.mongodb.MongoSocketReadException: Prematurely reached end of stream     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:249)     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:235)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:282)     at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(WindowsAsynchronousSocketChannelImpl.java:575)     at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:387)     at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)     at java.base/java.lang.Thread.run(Thread.java:844)  Dec 29, 2018 7:34:38 PM com.mongodb.diagnostics.logging.JULLogger log INFO: Exception in monitor thread while connecting to server development-shard-00-01-uxfw3.mongodb.net:27017 com.mongodb.MongoSocketReadException: Prematurely reached end of stream     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:249)     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:235)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:282)     at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(WindowsAsynchronousSocketChannelImpl.java:575)     at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:387)     at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)     at java.base/java.lang.Thread.run(Thread.java:844)  Dec 29, 2018 7:34:38 PM com.mongodb.diagnostics.logging.JULLogger log INFO: Exception in monitor thread while connecting to server development-shard-00-02-uxfw3.mongodb.net:27017 com.mongodb.MongoSocketReadException: Prematurely reached end of stream     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:249)     at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:235)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)     at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:282)     at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(WindowsAsynchronousSocketChannelImpl.java:575)     at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:387)     at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)     at java.base/java.lang.Thread.run(Thread.java:844) 

https://hastebin.com/qenogifiri.sql I just can't fix this issue I checked for typo's I've checked the IP whitelist I've checked other versions of MongoDB / other types

     
       
       

Lista de respuestas


Relacionados problema

1  Qué mejor lugar / camino para guardar imágenes con MongoDB / PHP  ( What better place way to save images with mongodb php ) 
Buenos días Gente, Tengo una pregunta, Estoy creando una aplicación web en PHP que hará uso de la base de datos MongoDB, es decir, una base de datos NOSQL. ...

0  Spring Mongodb incrustado establecido en el documento  ( Spring mongodb embedded set in document ) 
Estoy usando ROO de primavera con MongoDB. Me gustaría crear una entidad que contenga un conjunto integrado de un tipo definido por el usuario, de modo que es...

2  ¿Cómo puedo ejecutar un archivo de script JS de Pymongo?  ( How can i execute a js script file from pymongo ) 
Tengo un trabajo MapReduce para mi base de datos Mongodb implementada en un archivo de script de JavaScript. Lo he probado desde la línea de comandos y shell ...

2  ¿Puedo usar una cadena como llave en Mongodb para buscar?  ( Can i use a string as key in mongodb for search ) 
Estoy moviendo mis primeros pasos en NOSQLDB y Mongo, me gusta mucho, y tengo una pregunta sobre los índices: En MySQL DBS tradicional, generalmente encontr...

0  Error al ejecutar PHP con la extensión MongoDB (PHP 5.3.8, OS: CentOS 5.4)  ( Failed to run php with mongodb extension php 5 3 8 os centos 5 4 ) 
Tengo un problema en la ejecución de las extensiones de MongoDB de PHP Lea la solución al final de esta publicación Lo instalé con éxito usando 3 método...

6  Nodejs y nodo-mongodb-nativo  ( Nodejs and node mongodb native ) 
Acabando de comenzar con nodo, y tratar de obtener el controlador Mongo trabajar. Tengo mi conexión configurada, y extrañamente puedo insertar cosas. Sólo bie...

17  Actualización de una clave / valor específico dentro de un campo de matriz con MongoDB  ( Updating a specific key value inside of an array field with mongodb ) 
Como prefacio, he estado trabajando con Mongodb durante aproximadamente una semana, así que esto puede resultar una respuesta bastante simple. Tengo datos y...

11  Cómo determinar si se ha realizado una exploración de colección completa en MongoDB  ( How to determine if a full collection scan has been done in mongodb ) 
Entiendo que usando la salida de RESERVATIONS # | LISTING OWNER NAME | LISTING OWNER EMAIL | LISTING OWNER PHONE | GUEST NAME | GUEST EMAIL | CLASS OF LIST...

0  MongoDB - Obtenga un error al conectarse con la base de datos local  ( Mongodb getting error while connect with local data base ) 
Estoy tratando de crear una lista de usuarios cuando el usuario envíe sus detalles. En app.js Tengo la función para eso. Me gusta esto: app.post('/addL...

1  La mejor manera de obtener datos en Larave relacionados con la matriz de ID de objetos con la base de datos MongoDB  ( Best way to get data in laravel related to array of object ids with mongodb data ) 
Tengo una tabla Los datos de usuario son los siguientes: _id:ObjectId("mongodbid"), name:"acdfgf", skills:[ObjectId("skills id"),ObjectId("skill id 2")], c...




© 2022 respuesta.top Reservados todos los derechos. Centro de preguntas y respuestas reservados todos los derechos