Closed otaku0304 closed 7 months ago
Hello @otaku0304. It seems like an issue with Eureka setup. I will transfer it to spring-cloud-netflix. I can take a look at it for you, but please provide a minimal, complete, verifiable example that reproduces the issue as a link to a GH repo with a small executable app.
Hi @OlgaMaciaszek https://github.com/otaku0304/Swag-Micro-Services https://github.com/otaku0304/config-repo please clone the repos from this link and run the applications,
Once after applications are running send POST request to the below url by using the postman and pass the requestBody as a json body, you will get the error.
url: http://localhost:8081/swag/save-swaggest
{ "swaggestContent": "Elon Musk1", "user": "sai" }
error: { "responseCode": 400, "token": null, "responseMessage": "I/O error on POST request for \"http://swaggest-service/swaggest/save\": No such host is known (swaggest-service)", "responseBody": null }
@otaku0304 thanks, but please provide a minimal sample, with only as many services doing only as mush as absolutely necessary to reproduce the issue (this provided sample runs a lot of stuff unrelated to Spring Cloud Netflix, including a MongoDB).
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Hello,
I'm encountering an issue with microservices architecture. Specifically, when I attempt to access the microservices using with the application names, I receive an error stating "No such host is known". This problem arises even though I have set up an Eureka Discovery Server along with three Eureka client servers. As I am new to microservices, this is my first project, and I would greatly appreciate any guidance or assistance you can provide. Thank you for your understanding.
SpringBoot versions and Spring cloud versions for all micro services SpringBoot version = 3.2.4 Spring Cloud version = 2023.0.0 java Version = 21 Eureka localhost dashboard running at 8761
Application names and port numbers were defined separately in each yml files as swag-service, swagger-service, swaggest-service. so below is the swag yml file that show the application name
swagger yml file
Port numbers for microservices 8081, 8082, 8083 below is the swag yml file and running in the port 8081
When I changed the hostname and port numbers to include the application name, I encountered an error. However, the application is working fine when I used localhost and port numbers.
swagApplication
SwaggerApplication
swag controller with swag endpoint (/swag) calling save-swagger endpoint
swagService
swaggerController with (/swagger) hitting save end point
swaggerService
When i make an request from swag endpoint to save swagger I was getting the hostName error with 500 internal error
error