1

I/O error on POST request for "http://localhost:9411/api/v2/spans": Connect timed out; nested exception is java.net.SocketTimeoutException: Connect timed out

2021-11-24 10:17:30.642  INFO [,,,] 7872 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.2.RELEASE)

2021-11-24 10:17:31.942  INFO [service,,,] 7872 --- [  restartedMain] ServiceApplication      : No active profile set, falling back to default profiles: default
2021-11-24 10:17:35.956  INFO [service,,,] 7872 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2021-11-24 10:17:36.883  INFO [service,,,] 7872 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 901ms. Found 27 JPA repository interfaces.
2021-11-24 10:17:38.737  INFO [service,,,] 7872 --- [  restartedMain] o.s.cloud.context.scope.GenericScope     : BeanFactory id=f090e4ad-27c8-34fa-89ba-eeeccacd1fd9
2021-11-24 10:17:42.104  INFO [service,,,] 7872 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9194 (http)
2021-11-24 10:17:42.149  INFO [service,,,] 7872 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-11-24 10:17:42.150  INFO [service,,,] 7872 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.37]
2021-11-24 10:17:42.661  INFO [service,,,] 7872 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-11-24 10:17:42.662  INFO [service,,,] 7872 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 10646 ms
2021-11-24 10:17:43.074  INFO [service,,,] 7872 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2021-11-24 10:17:43.494  INFO [service,,,] 7872 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2021-11-24 10:17:43.517  INFO [service,,,] 7872 --- [  restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration    : H2 console available at '/h2-console'. Database available at 'jdbc:postgresql://localhost:5432/codeis'
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils (file:/C:/Users/Hp/.m2/repository/org/springframework/spring-core/5.2.8.RELEASE/spring-core-5.2.8.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2021-11-24 10:17:46.238  WARN [school-erp-service,,,] 7872 --- [  restartedMain] o.s.c.s.zipkin2.ZipkinAutoConfiguration  : Check result of the [org.springframework.cloud.sleuth.zipkin2.sender.RestTemplateSender@41a2805a] contains an error [CheckResult{ok=false, error=org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://localhost:9411/api/v2/spans": Connect timed out; nested exception is java.net.SocketTimeoutException: Connect timed out}]

What mistake I make? I am not using the Zipkin server. Why throw such type of error how to resolve it? I am using zuul API gateway.

Alfabravo
  • 7,493
  • 6
  • 46
  • 82
Ksha
  • 37
  • 1
  • 6

2 Answers2

0

Check your build dependency tree, there must be an entry for spring-cloud-starter-sleuth. In case you are planning not to use it, then remove it.

0

The firewall is not turned off

$ systemctl stop firewalld
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
bir
  • 1
  • 2
    A good answer will always include an explanation why this would solve the issue, so that the OP and any future readers can learn from it. – Tyler2P Mar 01 '22 at 08:26