What are the steps I should take to solve the error:
17-11-2025 14:00:00.002 [org.test.ingest.io] ERROR o.s.s.s.TaskUtils$LoggingErrorHandler.handleError - Unexpected error occurred in scheduled task
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://fileprocessor:8081/fileprocessor/technical/checkAndRestartThread/restartThreads": fileprocessor
at org.springframework.web.client.RestTemplate.createResourceAccessException(RestTemplate.java:888)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:868)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:764)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:378)
at org.test.ingest.io.technical.service.CheckAndRestartThreadService.restartThreads(CheckAndRestartThreadService.java:108)
at jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:96)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.net.UnknownHostException: fileprocessor
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:572)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:533)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:638)
at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:283)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:386)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:408)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1325)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1258)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1144)
at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1073)
at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:75)
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:862)
... 15 common frames omitted
I use Helm to deploy an app, this app contain an ingest part made of a fileProcessor part and Io part.
i use a common deployment and service file for both parts
here is the service
apiVersion: v1
kind: Service
metadata:
name: ingest-{{ .Values.global.branch }}
namespace: {{ default .Release.Namespace .Values.global.namespace }}
spec:
selector:
app: ingest-{{ .Values.global.branch }}
ports:
- name: fileprocessor
port: {{ .Values.ingest.fileprocessorPort }}
targetPort: {{ .Values.ingest.fileprocessorPort }}
- name: io
port: {{ .Values.ingest.ioPort }}
targetPort: {{ .Values.ingest.ioPort }}
I think i should overwrite what adress they use in order to tell them to talk through the service but everything i tried didn't work.
fileprocessorbut your Service is named something starting withingest-.... (Strongly consider splitting this into two separate Services, and using.Release.Namerather than a values setting to construct the name.)