spring-cloud / spring-cloud/spring-cloud-consul

Service not registering in Consul when packaged in war and deployed to external Tomcat

Open
#302 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Java
Stars
822
Forks
539
Avg merge
9h 31m
Merged PRs (30d)
7

Description

I have a Spring Cloud service that should register itself with Consul. When I start it with embedded Tomcat, this works as expected. However, when I package it as a war and deploy to an external Tomcat instance, it is not registering. There is no error or related messages in the console. It does not display the "Registering service with consul..." log message.

I have tried explicitly specifying server.port in bootstrap.yml but this does not change the behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the difference between embedded Tomcat and an external Tomcat deployment using the packaged WAR, then compare startup behavior and configuration. Check why the service never emits the reported registration log message; done means the deployed service registers in Consul as it does with embedded Tomcat.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.