Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JHipster 8.8.0: Consul Setup Fails – Invalid Image bitnami/consul:1.20.1 #28580

Closed
5 tasks done
darshan-maharana opened this issue Jan 28, 2025 · 3 comments
Closed
5 tasks done

Comments

@darshan-maharana
Copy link

Overview of the issue

JHipster 8.8.0 generates configuration files that reference the Docker image bitnami/consul:1.20.1. However, this image does not exist, causing the build to fail when trying to pull or run Consul.

Motivation for or Use Case

JHipster is expected to work out of the box, but this issue breaks automated setup and requires manual intervention to fix. Users following the default setup instructions will encounter a non-working build.

Reproduce the error

Generate a new JHipster project using version 8.8.0.

Select Consul as the service discovery option (recommended).

Run ./mvnw to build the project.

The build fails because the generated configuration references an invalid Docker image:

consul:
image: bitnami/consul:1.20.1

Running docker pull bitnami/consul:1.20.1 manually results in:

Error response from daemon: manifest for bitnami/consul:1.20.1 not found: manifest unknown: manifest unknown

Related issues

I searched both open and closed issues but did not find a similar report.

Suggest a Fix

Identify where JHipster defines the default Consul image (bitnami/consul:1.20.1).
Allow users to override this value in a central configuration file before generation.
Update JHipster to use a valid Consul image, such as consul:1.15.0 (which works correctly).

JHipster Version(s)

JHipster 8.8.0

Browsers and Operating System

OS: Ubuntu Linux

Java: OpenJDK 17

Node.js: v20.18.1

npm: 10.8.2

  • Tickets opened without reproduction steps or that doesn't follows the template recommendation will be closed.
  • This issue is prompt-related or an error that prevents JHipster from generating an application.
  • I don't have a JDL otherwise I should open an JDL Issue
  • The application is not successfully generated otherwise, I should open an Issue with jhipster info
  • Checking this box is mandatory (this is just to show you read everything)
@mshima
Copy link
Member

mshima commented Jan 28, 2025

@darshan-maharana
Copy link
Author

darshan-maharana commented Jan 29, 2025

  1. As mentioned in my initial post, prior to reporting this issue, I attempted to manually run docker pull bitnami/consul:1.20.1, but it failed with the following error:

    Error response from daemon: manifest for bitnami/consul:1.20.1 not found: manifest unknown: manifest unknown

    (I tried this several times, and it never worked for this image.)

    After receiving the message from mshima, I tried the pull command again, and it succeeded. However, the issue with mvnw being unable to pull the image remains, as described below.

  2. I cleared all pulled Docker images and recreated the microservice setup in a new folder: ~/projects/jhipster-tests/consul-issue/t1. No errors were encountered during the setup (please refer to the attached log: jhipster-setup-log).

  3. I executed ./mvnw, and it showed exceptions such as:

    connection refused for localhost:8500

    This indicates that the Consul Docker image failed to start. I confirmed this by running the following commands (please refer to the attached log: mvnw-log1.txt):

    ~/projects/jhipster-tests/consul-issue/t1 $ docker ps | grep consul
    ~/projects/jhipster-tests/consul-issue/t1 $ curl http://localhost:8500/v1/status/leader
    curl: (7) Failed to connect to localhost port 8500 after 0 ms: Couldn't connect to server

  4. I then manually ran the Docker container, which worked as expected. Here is the relevant log:

    ~/projects/jhipster-tests/consul-issue/t1 $ docker run -d --name=consul -p 8500:8500 bitnami/consul:1.20.1
    Unable to find image 'bitnami/consul:1.20.1' locally
    1.20.1: Pulling from bitnami/consul
    90269b59faf8: Pull complete
    Digest: sha256:95ae25bd6a0fe3815ad5c9b0f546aa023676d79b1664257ee1ecbd80db62e8a0
    Status: Downloaded newer image for bitnami/consul:1.20.1
    6ab69aca109f441c84e91bdf155e0233847217a26b9eec729c2e028b1a2cd9ad

    After that, I successfully accessed the Consul status page:

    ~/projects/jhipster-tests/consul-issue/t1 $ curl http://localhost:8500/v1/status/leader
    "172.17.0.2:8300"

  5. I re-executed ./mvnw, and it started fine (with a few warnings). I was able to access http://localhost:8081 as expected (please refer to the attached log: mvnw-log2.txt).

  6. To summarize, it seems that during the first run after the setup, mvnw is unable to automatically pull the bitnami/consul:1.20.1 image when it is not found locally.

jhipster-setup.log

mvnw-log1.txt

mvnw-log2.txt

@mshima
Copy link
Member

mshima commented Feb 5, 2025

You should use the docker container file generated in src/main/docker folder.
The correct container is docker.io/bitnami/consul.

To start required containers run

npm run services:up

Closing as this does not look an JHipster issue.

@mshima mshima closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2025
@mraible mraible added this to the 8.9.0 milestone Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants