bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.46k stars 4.93k forks source link

[bitnami/magento]while installing scripts of magento, it suddenly quited. #68043

Closed smth-hyj closed 4 months ago

smth-hyj commented 5 months ago

Name and Version

bitnami/magento:2.4.7, latest

What architecture are you using?

arm64

What steps will reproduce the bug?

envirnoment

configuration

I use docker-compose.yaml file

version: '3'
networks:
  magento2_default:
    driver: bridge
services:
  mariadb:
    image: bitnami/mariadb:11.2.4
    container_name: mariadb
    environment:
      - MARIADB_BIND_ADDRESS=0.0.0.0
      - ALLOW_EMPTY_PASSWORD=yes
      - MARIADB_USER=bn_magento
      - MARIADB_PASSWORD=magento
      - MARIADB_DATABASE=magento
    volumes:
      - mariadb_data:/bitnami/mariadb

  elasticsearch:
    image: elasticsearch:7.17.22
    container_name: elasticsearch
    environment:
      - node.name=elastic
      - cluster.name=elastic-docker-cluster
      - discovery.type=single-node
    ports:
      - '9200:9200'
    volumes:
      - elasticsearch_data:/usr/share/elasticsearch/data

  grafana:
    image: grafana/grafana-oss
    container_name: grafana
    restart: unless-stopped
    ports:
     - '3000:3000'
    environment:
     - GF_SERVER_ROOT_URL=http://my.grafana.server/
     - GF_INSTALL_PLUGINS=grafana-clock-panel
     - user=$(id -u)
     - name=grafana
    volumes:
      - /grafana-data/grafana-data:/var/lib/grafana
      - ./grafana/provisioning/:/etc/grafana/provisioning/
    depends_on:
      - elasticsearch

  magento:
    image: bitnami/magento:2.4.7
    container_name: magento
    ports:
      - '8080:8080'
      - '8443:8443'
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
      - MAGENTO_DATABASE_HOST=mariadb
      - MAGENTO_DATABASE_USER=bn_magento
      - MAGENTO_DATABASE_PASSWORD=magento
      - MAGENTO_DATABASE_NAME=magento
      - MAGENTO_DATABASE_PORT_NUMBER=3306
      - MAGENTO_HOST=localhost
      - MAGENTO_DATABASE_HOST=mariadb
      - MAGENTO_SEARCH_ENGINE=elasticsearch7
      - MAGENTO_SEARCH_ENGINE_HOST=elasticsearch
      - MAGENTO_SEARCH_ENGINE_PORT=9200
      - image.debug=true
    volumes:
      - magento_data:/bitnami/magento
    depends_on:
      - mariadb
      - elasticsearch
    cpus: 2                    # without these two arguments, it don't work well too
    mem_limit: 6MB  

volumes:
  mariadb_data:
    driver: local
  elasticsearch_data:
    driver: local
  magento_data:
    driver: local

Run

docker compose run -d

after a few seconds

[/var/www/html/magento2]# docker logs magento
magento 11:06:35.71 INFO  ==> 
magento 11:06:35.72 INFO  ==> Welcome to the Bitnami magento container
magento 11:06:35.72 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
magento 11:06:35.72 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
magento 11:06:35.73 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
magento 11:06:35.73 INFO  ==> 
magento 11:06:35.74 INFO  ==> ** Starting Magento setup **
magento 11:06:35.79 INFO  ==> Generating sample certificates
Certificate request self-signature ok
subject=CN = example.com
realpath: /bitnami/apache/conf: No such file or directory
magento 11:06:37.99 INFO  ==> Configuring Apache ServerTokens directive
magento 11:06:38.07 INFO  ==> Configuring PHP options
magento 11:06:38.09 INFO  ==> Setting PHP expose_php option
magento 11:06:38.11 INFO  ==> Setting PHP output_buffering option
magento 11:06:38.21 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars
magento 11:06:38.27 WARN  ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment.
magento 11:06:38.39 INFO  ==> Ensuring Magento directories exist
magento 11:06:38.40 INFO  ==> Configuring permissions
magento 11:06:38.43 INFO  ==> Trying to connect to the database server
magento 11:06:38.45 INFO  ==> Trying to connect to Elasticsearch
magento 11:06:58.86 INFO  ==> Running Magento install script
[/var/www/html/magento2]# docker ps -a
CONTAINER ID   IMAGE                    COMMAND                   CREATED          STATUS                        PORTS                                                 NAMES
49473e6efde0   bitnami/magento:2.4.7    "/opt/bitnami/script…"   46 seconds ago   Exited (137) 18 seconds ago                                                         magento
d7852406db3c   grafana/grafana-oss      "/run.sh"                 46 seconds ago   Up 41 seconds                 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp             grafana
25b0b9a9ed1b   elasticsearch:7.17.22    "/bin/tini -- /usr/l…"   46 seconds ago   Up 43 seconds                 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp   elasticsearch
9506d0696600   bitnami/mariadb:11.2.4   "/opt/bitnami/script…"   46 seconds ago   Up 44 seconds                 3306/tcp                                              mariadb

Are you using any custom parameters or values?

    environment:
      - ALLOW_EMPTY_PASSWORD=yes
      - MAGENTO_DATABASE_HOST=mariadb
      - MAGENTO_DATABASE_USER=bn_magento
      - MAGENTO_DATABASE_PASSWORD=magento
      - MAGENTO_DATABASE_NAME=magento
      - MAGENTO_DATABASE_PORT_NUMBER=3306
      - MAGENTO_HOST=localhost
      - MAGENTO_DATABASE_HOST=mariadb
      - MAGENTO_SEARCH_ENGINE=elasticsearch7
      - MAGENTO_SEARCH_ENGINE_HOST=elasticsearch
      - MAGENTO_SEARCH_ENGINE_PORT=9200

What is the expected behavior?

I have to get in server: localhost:8080 but it doesn't work image

What do you see instead?

some kind of Magento admin page? Idk bc I never get it right

Additional information

I have to finish this work until tomorrow so I am now considering using woocommerce....

carrodher commented 5 months ago

The issue may not be directly related to the Bitnami container image/Helm chart, but rather to how the application is being utilized, configured in your specific environment, or tied to a specific scenario that is not easy to reproduce on our side.

If you think that's not the case and are interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Suppose you have any questions about the application, customizing its content, or technology and infrastructure usage. In that case, we highly recommend that you refer to the forums and user guides provided by the project responsible for the application or technology.

With that said, we'll keep this ticket open until the stale bot automatically closes it, in case someone from the community contributes valuable insights.

thomas-naudin-pegase-market commented 5 months ago

Exact same problem here with Podman 4.9 .4 on Rocky Linux 9.

The solution is here : https://github.com/bitnami/containers/issues/64133 Just use a compatible MariaDB version (10.6 here)

github-actions[bot] commented 4 months ago

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[bot] commented 4 months ago

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.