Vikas
Vikas

Reputation: 7175

Spring cloud client trying to run on server port 8888

The config server is up and the client is able to fetch the properties from config server.

HTTP GET http://localhost:8888/account-service/dev/config
Accept=[application/json, application/*+json]
Response 200 OK

But the problem is, client service is trying to start on config server port 8888. I have set server.port=8080 in the client but still not working.

***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 8888 was already in use.

Am I missing any configuration here? Highly appreciate any help.

Config server application.properties,

spring.application.name=config-server
spring.cloud.config.profiles=dev 
spring.cloud.config.server.git.uri=REPO_URL
server.port=8888

Upvotes: 2

Views: 1309

Answers (1)

Vikas
Vikas

Reputation: 7175

Finally, I was able to find the solution. When I was trying to start client service, server.port was also getting overridden with config server port. I added server.port=8080 in the properties file for the client service profile in config repo (account-service.properties) and it worked.

Upvotes: 4

Related Questions