Git Product home page Git Product logo

Comments (6)

effgarces avatar effgarces commented on August 18, 2024

Sorry about the time it took to answer this, but I didn't receive notifications for the last few issues being submited.
Can you check the error log at /var/log/apache2/booked-error.log, it should have some more info about what is happening. If not, enable log4php, in the config directory to make booked more verbose, so that you can see at what point it's failing.

from app.

gparami avatar gparami commented on August 18, 2024

I faced the same issue. I use the [librebooking/docker](image: librebooking/librebooking:2.8.6.1).

Here are the logs:

[Wed Nov 15 21:00:06.536654 2023] [php:warn] [pid 147] [client 172.19.0.5:38236] PHP Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /var/www/html/lib/Server/Server.php on line 254 [Wed Nov 15 21:00:14.546920 2023] [php:notice] [pid 147] [client 172.19.0.5:38236] Error: TypeError: mysqli_select_db(): Argument #1 ($mysql) must be of type mysqli, bool given in /var/www/html/lib/Database/MySQL/MySqlConnection.php:42\nStack trace:\n#0 /var/www/html/lib/Database/MySQL/MySqlConnection.php(42): mysqli_select_db()\n#1 /var/www/html/lib/Database/Database.php(23): MySqlConnection->Connect()\n#2 /var/www/html/Domain/Access/AnnouncementRepository.php(11): Database->Query()\n#3 /var/www/html/Presenters/LoginPresenter.php(123): AnnouncementRepository->GetFuture()\n#4 /var/www/html/Pages/LoginPage.php(126): LoginPresenter->PageLoad()\n#5 /var/www/html/Web/index.php(22): LoginPage->PageLoad()\n#6 {main} [Wed Nov 15 21:00:14.546971 2023] [php:notice] [pid 147] [client 172.19.0.5:38236] #0 /var/www/html/lib/Common/Logging/ExceptionHandler.php(22): WebExceptionHandler->HandleException(Object(TypeError))\n#1 [internal function]: ExceptionHandler::Handle(Object(TypeError))\n

from app.

colisee avatar colisee commented on August 18, 2024

Hi @gparami,

it looks like you are having an issue connecting to your database.

Could you please share your docker-compose.yml file? Please XXX any visible password.

from app.

gparami avatar gparami commented on August 18, 2024

Thank you for the reply @colisee. Here's the docker-compose.yml file:

version: "3.7"

services:
  librebooking-db:
    image: linuxserver/mariadb:10.6.13
    container_name: librebooking-db
    restart: unless-stopped
    networks:
      - internal
    volumes:
      - vol-db:/config
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - MYSQL_DATABASE=${MYSQL_DATABASE}
      - FILE__MYSQL_ROOT_PASSWORD=/run/secrets/db_root_pwd
      - MYSQL_USER=${MYSQL_USER}
      - FILE__MYSQL_PASSWORD=/run/secrets/db_user_pwd
    secrets:
      - db_root_pwd
      - db_user_pwd

  app:
    image: librebooking/librebooking:2.8.6.1
    container_name: librebooking
    restart: unless-stopped
    depends_on:
      - librebooking-db
    networks:
      - internal
      - traefik
    volumes:
      - vol-app:/config
    environment: 
      - LB_DB_NAME=${MYSQL_DATABASE}
      - LB_INSTALL_PWD_FILE=/run/secrets/lb_install_pwd
      - LB_DB_USER=${MYSQL_USER}
      - LB_DB_USER_PWD_FILE=/run/secrets/lb_user_pwd
      - LB_DB_HOST=db
      - LB_ENV=production
      - LB_LOG_FOLDER=/var/log/librebooking
      - LB_LOG_LEVEL=error
      - LB_LOG_SQL=false
      - TZ=${TZ}
    secrets:
      - lb_install_pwd
      - lb_user_pwd
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.librebooking.entrypoints=https"
      - "traefik.http.routers.librebooking.tls.certresolver=myresolver"
      - "traefik.http.routers.librebooking.rule=Host(`librebooking.xxx.ca`)"
      - "traefik.http.services.librebooking.loadbalancer.server.port=80"

volumes:
  vol-db:
    name: librebooking_data
  vol-app:
    name: librebooking_conf

networks:
  traefik:
    external: true
  internal:
    external: false

secrets:
  db_root_pwd:
    file: ./db_root_pwd.txt
  db_user_pwd:
    file: ./db_user_pwd.txt
  lb_user_pwd:
    file: ./db_user_pwd.txt
  lb_install_pwd:
    file: ./lb_install_pwd.txt

from app.

colisee avatar colisee commented on August 18, 2024

Hi again @gparami ,

I believe I found the mistake in your docker-compose.yml file.

Your database server is known by its service name: librebooking-db. Therefore, the environment variable LB_DB_HOST used by service app should reference it as follows: - LB_DB_HOST=librebooking-db.

If you want to keep the value of your LB_DB_HOST environment varianle as-is, then you need to create an alias as follows:

services:
  librebooking-db:
    image: linuxserver/mariadb:10.6.13
    container_name: librebooking-db
    restart: unless-stopped
    networks:
      internal:
        aliases:
          - db

Please, close this issue if my answer fixed it.

from app.

gparami avatar gparami commented on August 18, 2024

Thanks again @colisee! It looks like my copy-pasting skills are subpar 😛. Forgot to change the LB_DB_HOST after I changed the container name. It works now!

from app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.