Getting request Permission denied: no further information on Service Discovery with Spring-Cloud-Config

485 views Asked by At

I am trying to connect to the spring cloud config server via a eureka registered serviceId. My Spring cloud config server is up and running , and my client can connect to it via local host. But I want to connect to it via the

my config service is registered

CONFIG-SERVICE  n/a (1) (1) UP (1) - 192.168.0.19:config-service:8086

My application.yml is

spring:
  profiles:
    active: @activatedProperties@
  application:
    name: @artifactId@
  config:
    import: "configserver:"
  cloud:
    config:
      enabled: true
      #uri: http://localhost:8086
      discovery:
        enabled: true
        serviceId: COFIG-SERVICE

The service id registers the correct Ip address http://192.168.0.19:8086/application/local but gives me a Permission denied.

22:04:53.547 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.cloud.config.client.ConfigClientFailFastException: Could not locate PropertySource and the resource is not optional, failing
        at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.doLoad(ConfigServerConfigDataLoader.java:193)
        at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.load(ConfigServerConfigDataLoader.java:101)
        at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.load(ConfigServerConfigDataLoader.java:60)
        at org.springframework.boot.context.config.ConfigDataLoaders.load(ConfigDataLoaders.java:107)
        at org.springframework.boot.context.config.ConfigDataImporter.load(ConfigDataImporter.java:128)
        at org.springframework.boot.context.config.ConfigDataImporter.resolveAndLoad(ConfigDataImporter.java:86)
        at org.springframework.boot.context.config.ConfigDataEnvironmentContributors.withProcessedImports(ConfigDataEnvironmentContributors.java:121)
        at org.springframework.boot.context.config.ConfigDataEnvironment.processWithProfiles(ConfigDataEnvironment.java:311)
        at org.springframework.boot.context.config.ConfigDataEnvironment.processAndApply(ConfigDataEnvironment.java:232)
        at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:102)
        at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:94)
        at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:102)
        at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:87)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
        at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
        at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
        at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
        at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62)
        at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:374)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:332)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332)
        at com.opsec.shared.harvesting.fetcher.htmlunit.ServiceApplication.main(ServiceApplication.java:18)
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://192.168.0.19:8086/application/local": Permission denied: no further information; nested exception is java.net.SocketException: Permission denied: no further information
        at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:785)
        at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)
        at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:602)
        at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.getRemoteEnvironment(ConfigServerConfigDataLoader.java:299)
        at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.doLoad(ConfigServerConfigDataLoader.java:117)
        ... 27 common frames omitted
Caused by: java.net.SocketException: Permission denied: no further informationested exception is java.net.SocketException: Permission denied: no further information

Trying

0

There are 0 answers