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

[bitnami/discourse] docker.io/bitnami/discourse gets stuck on the connecting to db phase #72338

Closed
tp1050 opened this issue Sep 10, 2024 · 6 comments
Assignees
Labels
discourse solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@tp1050
Copy link

tp1050 commented Sep 10, 2024

Name and Version

docker.io/bitnami/discourse:lsest

What architecture are you using?

None

What steps will reproduce the bug?

  1. 1.1 Linux 6.8.0-41-generic [bitnami/nginx-exporter] Release 0.10.0-debian-11-r16 #41-Ubuntu GNU/Linux
    1.2 Docker version 27.2.0, build 3ab4256
    1.3 I run npm, wordpress etc all some dockerized some not all using the mariadb and redis containers attached to a shared network iso_out and iso_in

  2. this is the docker-compose
    version: '3'

services:
  frm:
    image: docker.io/bitnami/discourse
    ports:
      - "55080:80"
      - "55443:443"
      - "53000:3000"
    environment:
      - DISCOURSE_ENABLE_HTTPS=yes
      - DISCOURSE_HOST=frm
      - [email protected]
      - DISCOURSE_EXTERNAL_HTTP_PORT_NUMBER=80
      - DISCOURSE_EXTERNAL_HTTPS_PORT_NUMBER=443


      - DISCOURSE_REDIS_HOST=redis_1
      - DISCOURSE_REDIS_USERNAME=discourse1
      - DISCOURSE_REDIS_PASSWORD=password

      - DISCOURSE_DATABASE_HOST=mariadb_1
      - DISCOURSE_DATABASE_NAME=discourse1
      - DISCOURSE_DATABASE_USERNAME=discourse1
      - DISCOURSE_DATABASE_PASSWORD=password
      - DISCOURSE_DATABASE_PORT_NUMBER=3306

      - DISCOURSE_USERNAME=discourse1
      - DISCOURSE_USER_PASSWORD=password

      - PGID=1000
      - UID=1000
    volumes:
      - discourse-data:/var/www/discourse
      - discourse-logs:/var/log/discourse
    networks:
      - iso_in
      - iso_out

volumes:
  discourse-data:
  discourse-logs:

networks:
  iso_in:
    external: true
  iso_out:
    external: true

What is the expected behavior?

docker-compose up -d should just fire things up without an issue, since every component works on its own.

What do you see instead?

discourse 09:52:07.16 INFO  ==> 
discourse 09:52:07.16 INFO  ==> Welcome to the Bitnami discourse container
discourse 09:52:07.16 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
discourse 09:52:07.17 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
discourse 09:52:07.17 INFO  ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
discourse 09:52:07.17 INFO  ==> 
discourse 09:52:07.17 INFO  ==> Validating settings in POSTGRESQL_CLIENT_* env vars
discourse 09:52:07.19 INFO  ==> Creating Discourse configuration file
discourse 09:52:07.21 INFO  ==> Ensuring Discourse directories exist
discourse 09:52:07.21 INFO  ==> Trying to connect to the database server
discourse 09:53:07.28 ERROR ==> Could not connect to the database

Additional information

No response

@tp1050 tp1050 added the tech-issues The user has a technical issue about an application label Sep 10, 2024
@github-actions github-actions bot added the triage Triage is needed label Sep 10, 2024
@javsalgar javsalgar changed the title docker.io/bitnami/discourse gets stuck on the connecting to db phase [bitnami/discourse] docker.io/bitnami/discourse gets stuck on the connecting to db phase Sep 11, 2024
@javsalgar
Copy link
Contributor

Hi,

Could you add the BITNAMI_DEBUG=true environment variable?

@tp1050
Copy link
Author

tp1050 commented Sep 11, 2024

so I decided i am running a posgresql container stand alone which works perferctly even over internet still same
gonna try the degbug env now

services:
  discourse:
    image: docker.io/bitnami/discourse:3
    ports:
      - '4380:3000'
    volumes:
      - 'discourse_data:/bitnami/discourse'
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
      - DISCOURSE_HOST=www.example.com
      - DISCOURSE_DATABASE_HOST=postgresql
      - DISCOURSE_DATABASE_PORT_NUMBER=5432
      - DISCOURSE_DATABASE_USER=bn_discourse
      - DISCOURSE_DATABASE_NAME=bitnami_discourse
      - DISCOURSE_REDIS_HOST=redis_1
      - DISCOURSE_REDIS_PORT_NUMBER=6379
      - POSTGRESQL_CLIENT_POSTGRES_USER=postgres
      - POSTGRESQL_CLIENT_CREATE_DATABASE_NAME=bitnami_discourse
      - POSTGRESQL_CLIENT_CREATE_DATABASE_EXTENSIONS=hstore,pg_trgm
    networks:
      - iso_in
      - iso_out
volumes:
  discourse_data:
    driver: local
networks:
  iso_in:
    external: true
  iso_out:
    external: true

@tp1050
Copy link
Author

tp1050 commented Sep 11, 2024

this is the out put with debug on

discourse-1  | discourse 16:46:58.70 INFO  ==> Trying to connect to the database server
discourse-1  | psql: error: could not translate host name "postgresql" to address: Temporary failure in name resolution
discourse-1  | psql: error: could not translate host name "postgresql" to address: Temporary failure in name resolution

@javsalgar
Copy link
Contributor

Hi,

Looking at the issue, it seems that the problem is not in the Bitnami packaging of Discourse, but a networking issue. It is not clear to me if the issue is in how you set up the networking or in docker itself. I will leave the ticket open in case someone from the community wants to share their experience.

Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Sep 28, 2024
Copy link

github-actions bot commented Oct 3, 2024

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Oct 3, 2024
@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discourse solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

3 participants