marcelomunozr / sneakers-city-spring-boot

0 stars 0 forks source link

configuración mongo #3

Open isaioliva opened 3 years ago

isaioliva commented 3 years ago

mvn spring-boot:run [INFO] Scanning for projects... [INFO] [INFO] --------------------< com.seneakers:springbootapp >--------------------- [INFO] Building springbootapp 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot-maven-plugin:2.5.1:run (default-cli) > test-compile @ springbootapp >>> [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ springbootapp --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ springbootapp --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 11 source files to C:\testEVO\Marcelo\sneakers-city-spring-boot\target\classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ springbootapp --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory C:\testEVO\Marcelo\sneakers-city-spring-boot\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ springbootapp --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to C:\testEVO\Marcelo\sneakers-city-spring-boot\target\test-classes [INFO] [INFO] <<< spring-boot-maven-plugin:2.5.1:run (default-cli) < test-compile @ springbootapp <<< [INFO] [INFO] [INFO] --- spring-boot-maven-plugin:2.5.1:run (default-cli) @ springbootapp --- [INFO] Attaching agents: []

. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v2.5.1)

2021-06-28 19:18:36.564 INFO 31172 --- [ main] c.s.s.SpringbootappApplication : Starting SpringbootappApplication using Java 15.0.2 on zion with PID 31172 (C:\testEVO\Marcelo\sneakers-city-spring-boot\target\classes started by Administrator in C:\testEVO\Marcelo\sneakers-city-spring-boot) 2021-06-28 19:18:36.566 INFO 31172 --- [ main] c.s.s.SpringbootappApplication : No active profile set, falling back to default profiles: default 2021-06-28 19:18:36.982 INFO 31172 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode. 2021-06-28 19:18:37.028 INFO 31172 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 41 ms. Found 2 MongoDB repository interfaces. 2021-06-28 19:18:37.399 INFO 31172 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2021-06-28 19:18:37.410 INFO 31172 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2021-06-28 19:18:37.410 INFO 31172 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.46] 2021-06-28 19:18:37.480 INFO 31172 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2021-06-28 19:18:37.481 INFO 31172 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 880 ms 2021-06-28 19:18:37.611 INFO 31172 --- [ main] org.mongodb.driver.cluster : Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'} 2021-06-28 19:18:38.078 INFO 31172 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2021-06-28 19:18:38.085 INFO 31172 --- [ main] c.s.s.SpringbootappApplication : Started SpringbootappApplication in 1.838 seconds (JVM running for 2.118) 2021-06-28 19:18:39.716 INFO 31172 --- [localhost:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server localhost:27017

com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[mongodb-driver-core-4.2.3.jar:na] at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:143) ~[mongodb-driver-core-4.2.3.jar:na] at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:188) ~[mongodb-driver-core-4.2.3.jar:na] at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:144) ~[mongodb-driver-core-4.2.3.jar:na] at java.base/java.lang.Thread.run(Thread.java:832) ~[na:na] Caused by: java.net.ConnectException: Connection refused: no further information at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na] at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:660) ~[na:na] at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:549) ~[na:na] at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[na:na] at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:333) ~[na:na] at java.base/java.net.Socket.connect(Socket.java:648) ~[na:na] at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:107) ~[mongodb-driver-core-4.2.3.jar:na] at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79) ~[mongodb-driver-core-4.2.3.jar:na] at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65) ~[mongodb-driver-core-4.2.3.jar:na] ... 4 common frames omitted

marcelomunozr commented 3 years ago

@isaioliva Buenos días. Se habilitó cluster mongo db con la data. lo que ocurrió es que tenía localmente una conexión a monbodb que seguro era eso lo que fallaba. Favor probar en master