tobybatch / kimai2

Docker containers for the kimai2 web application including docker-compose and kubernetes/helm deployment.
MIT License
183 stars 96 forks source link

[BUG] Can't get LDAP to run #407

Closed MrRulf closed 1 year ago

MrRulf commented 1 year ago

Describe the bug I can't get LDAP to run with Kimai(Docker). I have other services using the same LDAP server so I'm pretty sure the problem is on Kimai site.

To Reproduce local.yaml:

kimai:
    ldap:
        activate: true
        # https://docs.laminas.dev/laminas-ldap/api/
        connection:

            host: ldap://openldap
            #port: 389
            #useSsl: false
            #useStartTls: true
            #username: cn=admin,dc=mydomain,dc=net
            #password: password
            #bindRequiresDn: true
            #optReferrals: false

        user:

            baseDn: ou=users, dc=mydomain, dc=net
            #usernameAttribute: uid
            attributes:
                - { ldap_attr: uid, user_method: setUsername }
                - { ldap_attr: cn, user_method: setAlias }
                - { ldap_attr: mail, user_method: setEmail }

Desktop (please complete the following information):

Command used to run the container

Docker compose file (with passwords redacted)

version: '3.5'
services:

  kimai-db:
    image: mariadb:latest
    container_name: kimai-db
    hostname: kimai-db
    environment:
      - MYSQL_DATABASE=kimai
      - MYSQL_USER=admin
      - MYSQL_PASSWORD=password
      - MYSQL_ROOT_PASSWORD=password
    volumes:
      - ./data/mysql:/var/lib/mysql
    command: --default-storage-engine innodb
    restart: unless-stopped
    healthcheck:
      test: mysqladmin -p$$MYSQL_ROOT_PASSWORD ping -h localhost
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3
    networks:
      - kimai

  nginx:
    image: tobybatch/nginx-fpm-reverse-proxy
    volumes:
      - ./data/public:/opt/kimai/public:ro
    restart: unless-stopped
    depends_on:
      - kimai
    healthcheck:
      test:  wget --spider http://nginx/health || exit 1
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3
    networks:
      - kimai
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.kimai-secure.entrypoints=https"
      - "traefik.http.routers.kimai-secure.rule=Host(`kimai.mydomain.net`)"
      - "traefik.http.routers.kimai-secure.middlewares=kimai-middlewares"
      - "traefik.http.routers.kimai-secure.tls=true"
      - "traefik.http.routers.kimai-secure.service=kimai"
      - "traefik.http.services.kimai.loadbalancer.server.port=80"
      - "traefik.http.services.kimai.loadbalancer.server.scheme=http"
      - "traefik.http.services.kimai.loadbalancer.passhostheader=true"
      - "traefik.http.middlewares.kimai-middlewares.chain.middlewares=https-redirectscheme@file,default-headers@file,authelia@docker"
      - "traefik.docker.network=proxy"

  kimai: # This is the latest FPM image of kimai
    image: kimai/kimai2:latest
    container_name: kimai
    hostname: kimai
    environment:
      - ADMINMAIL=kimai@mydomain.net
      - ADMINPASS=password
      - DATABASE_URL=mysql://admin:password@kimai-db/kimai
      - TRUSTED_HOSTS=nginx,localhost,127.0.0.1,mydomain.net
      - APP_ENV=prod
    volumes:
      - ./data/public:/opt/kimai/public
      - ./local.yaml:/opt/kimai/config/packages/local.yaml:z
      # - var:/opt/kimai/var
      # - ./ldap.conf:/etc/openldap/ldap.conf:z
      # - ./ROOT-CA.pem:/etc/ssl/certs/ROOT-CA.pem:z
    restart: unless-stopped
    networks:
      - kimai
      - openldap
    depends_on:
      - kimai-db

volumes:
    var:
    public:
    mysql:

networks:
  proxy:
    external: true
  openldap:
    external: true
  kimai:
    name: kimai
    external: false

Additional context My guess is that I fucked something up in the config, however I'm working on this problem for a few days now without results and I also found no other place like a discord to ask more experienced people for help. So I considering that and that I wasn't able to fix this alone with the documentation I think it's reasonable to open an issue for this, so that even if this ain't a bug in the code it documents better how to use kimai in docker with ldap. If my tough is wrong I'm sorry and I'm ready to ask at the place where this questions should get asked, however somebody would have to tell me where that is ^^" Of course, help would be welcome anyway ^^

kevinpapst commented 1 year ago

Try to use a developer container with APP_ENV=dev (not sure if that works in the prod docker) to see the LDAP query logs.

MrRulf commented 1 year ago

Did that, but I still can't find anything that looks related to ldap :/

kimai-db       | 2022-09-24 17:09:48+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.9.2+maria~ubu2204 started.
kimai-db       | 2022-09-24 17:09:48+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
kimai-db       | 2022-09-24 17:09:48+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.9.2+maria~ubu2204 started.
kimai          | 
kimai          | Wait for MySQL DB connection ...
kimai-db       | 2022-09-24 17:09:49+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
kimai-db       | 2022-09-24 17:09:49 0 [Note] mariadbd (server 10.9.2-MariaDB-1:10.9.2+maria~ubu2204) starting as process 1 ...
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: Number of transaction pools: 1
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
kimai-db       | 2022-09-24 17:09:49 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: Completed initialization of buffer pool
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
kimai          | Testing DB:** new \PDO(mysql:host=kimai-db;dbname=kimai;port=3306, admin, password, [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION ]);*SQLSTATE[HY000] [2002] Connection refused (?)Checking DB: 10
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: 128 rollback segments are active.
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: log sequence number 1726935; transaction id 1760
kimai-db       | 2022-09-24 17:09:49 0 [Note] Plugin 'FEEDBACK' is disabled.
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
kimai-db       | 2022-09-24 17:09:49 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
kimai-db       | 2022-09-24 17:09:49 0 [Note] Server socket created on IP: '0.0.0.0'.
kimai-db       | 2022-09-24 17:09:49 0 [Note] Server socket created on IP: '::'.
kimai-db       | 2022-09-24 17:09:49 0 [Note] mariadbd: ready for connections.
kimai-db       | Version: '10.9.2-MariaDB-1:10.9.2+maria~ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
kimai-db       | 2022-09-24 17:09:49 0 [Note] InnoDB: Buffer pool(s) load completed at 220924 17:09:49
kimai          | Testing DB:** new \PDO(mysql:host=kimai-db;dbname=kimai;port=3306, admin, password, [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION ]);*Connection established
kimai          | tar: public: Cannot utime: Operation not permitted
kimai          | tar: public: Cannot change mode to rwxr-xr-x: Operation not permitted
kimai          | tar: Exiting with failure status due to previous errors
kimai          | [2022-09-24 17:09:56] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"} []
kimai          | [2022-09-24 17:09:56] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DumpListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DumpListener::configure"} []
kimai          | 
kimai          | Kimai installation running ...
kimai          | ==============================
kimai          | 
kimai          |  ! [NOTE] Database is existing and connection could be established              
kimai          | 
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SHOW FULL TABLES WHERE Table_type = 'BASE TABLE' [] []
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'kimai' AND TABLE_NAME = 'migration_versions' ORDER BY ORDINAL_POSITION ASC [] []
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'migration_versions' */ WHERE k.table_name = 'migration_versions' AND k.table_schema = 'kimai' /*!50116 AND c.constraint_schema = 'kimai' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_NAME = 'migration_versions' AND TABLE_SCHEMA = 'kimai' ORDER BY SEQ_IN_INDEX ASC [] []
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SELECT ENGINE, AUTO_INCREMENT, TABLE_COLLATION, TABLE_COMMENT, CREATE_OPTIONS FROM information_schema.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'migration_versions' [] []
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SELECT * FROM migration_versions [] []
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SELECT * FROM migration_versions [] []
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SELECT * FROM migration_versions [] []
kimai          | [2022-09-24 17:09:56] doctrine.DEBUG: SELECT * FROM migration_versions [] []
kimai          | 
kimai          |  [OK] Already at the latest version ("DoctrineMigrations\Version20220722125847")
kimai          | 
kimai          | 
kimai          |  Rebuilding your cache, please be patient ...
kimai          | 
kimai          |  // Clearing the cache for the dev environment with debug                       
kimai          |  // true                                                                        
kimai          | 
kimai          |  [OK] Cache for the "dev" environment (debug=true) was successfully cleared.    
kimai          | 
kimai          | 
kimai          |  // Warming up the cache for the dev environment with debug                     
kimai          |  // true                                                                        
kimai          | 
kimai          |  [OK] Cache for the "dev" environment (debug=true) was successfully warmed.     
kimai          | 
kimai          | 
kimai          |  [OK] Congratulations! Successfully installed Kimai version 1.25.0              
kimai          | 
kimai          | [2022-09-24 17:10:01] php.INFO: Deprecated: Return type of App\Configuration\ThemeConfiguration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"exception":"[object] (ErrorException(code: 0): Deprecated: Return type of App\\Configuration\\ThemeConfiguration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /opt/kimai/src/Configuration/ThemeConfiguration.php:32)"} []
kimai          | [2022-09-24 17:10:01] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"} []
kimai          | [2022-09-24 17:10:01] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DumpListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DumpListener::configure"} []
kimai          | 
kimai          | Kimai updates running ...
kimai          | =========================
kimai          | 
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SHOW FULL TABLES WHERE Table_type = 'BASE TABLE' [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SHOW FULL TABLES WHERE Table_type = 'BASE TABLE' [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SHOW FULL TABLES WHERE Table_type = 'BASE TABLE' [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'kimai' AND TABLE_NAME = 'migration_versions' ORDER BY ORDINAL_POSITION ASC [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'migration_versions' */ WHERE k.table_name = 'migration_versions' AND k.table_schema = 'kimai' /*!50116 AND c.constraint_schema = 'kimai' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_NAME = 'migration_versions' AND TABLE_SCHEMA = 'kimai' ORDER BY SEQ_IN_INDEX ASC [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SELECT ENGINE, AUTO_INCREMENT, TABLE_COLLATION, TABLE_COMMENT, CREATE_OPTIONS FROM information_schema.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'migration_versions' [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SELECT * FROM migration_versions [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SELECT * FROM migration_versions [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SELECT * FROM migration_versions [] []
kimai          | [2022-09-24 17:10:01] doctrine.DEBUG: SELECT * FROM migration_versions [] []
kimai          | 
kimai          |  [OK] Already at the latest version ("DoctrineMigrations\Version20220722125847")
kimai          | 
kimai          | 
kimai          |  Rebuilding your cache, please be patient ...
kimai          | 
kimai          |  // Clearing the cache for the dev environment with debug                       
kimai          |  // true                                                                        
kimai          | 
kimai          |  [OK] Cache for the "dev" environment (debug=true) was successfully cleared.    
kimai          | 
kimai          | 
kimai          |  // Warming up the cache for the dev environment with debug                     
kimai          |  // true                                                                        
kimai          | 
kimai          |  [OK] Cache for the "dev" environment (debug=true) was successfully warmed.     
kimai          | 
kimai          | 
kimai          |  [OK] Congratulations! Successfully updated Kimai to version 1.25.0             
kimai          | 
kimai-nginx-1  | 172.27.0.4 - - [24/Sep/2022:17:10:09 +0000] "GET /health HTTP/1.1" 200 5 "-" "Wget" "-"
kimai          | [2022-09-24 17:10:10] php.INFO: Deprecated: Return type of App\Configuration\ThemeConfiguration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"exception":"[object] (ErrorException(code: 0): Deprecated: Return type of App\\Configuration\\ThemeConfiguration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /opt/kimai/src/Configuration/ThemeConfiguration.php:32)"} []
kimai          | [2022-09-24 17:10:10] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"} []
kimai          | [2022-09-24 17:10:10] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DumpListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DumpListener::configure"} []
kimai          | [2022-09-24 17:10:10] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.value AS value_3 FROM kimai2_configuration t0 [] []
kimai          | [2022-09-24 17:10:10] doctrine.DEBUG: SELECT t0.id AS id_1, t0.alias AS alias_2, t0.registration_date AS registration_date_3, t0.title AS title_4, t0.avatar AS avatar_5, t0.api_token AS api_token_6, t0.auth AS auth_7, t0.username AS username_8, t0.email AS email_9, t0.account AS account_10, t0.enabled AS enabled_11, t0.password AS password_12, t0.last_login AS last_login_13, t0.confirmation_token AS confirmation_token_14, t0.password_requested_at AS password_requested_at_15, t0.roles AS roles_16, t0.color AS color_17 FROM kimai2_users t0 WHERE t0.email = ? LIMIT 1 ["kimai@mydomain.net"] []
kimai          | [2022-09-24 17:10:10] doctrine.DEBUG: SELECT t0.id AS id_1, t0.alias AS alias_2, t0.registration_date AS registration_date_3, t0.title AS title_4, t0.avatar AS avatar_5, t0.api_token AS api_token_6, t0.auth AS auth_7, t0.username AS username_8, t0.email AS email_9, t0.account AS account_10, t0.enabled AS enabled_11, t0.password AS password_12, t0.last_login AS last_login_13, t0.confirmation_token AS confirmation_token_14, t0.password_requested_at AS password_requested_at_15, t0.roles AS roles_16, t0.color AS color_17 FROM kimai2_users t0 WHERE t0.email = ? LIMIT 1 ["superadmin"] []
kimai          | [2022-09-24 17:10:10] doctrine.DEBUG: SELECT t0.id AS id_1, t0.alias AS alias_2, t0.registration_date AS registration_date_3, t0.title AS title_4, t0.avatar AS avatar_5, t0.api_token AS api_token_6, t0.auth AS auth_7, t0.username AS username_8, t0.email AS email_9, t0.account AS account_10, t0.enabled AS enabled_11, t0.password AS password_12, t0.last_login AS last_login_13, t0.confirmation_token AS confirmation_token_14, t0.password_requested_at AS password_requested_at_15, t0.roles AS roles_16, t0.color AS color_17 FROM kimai2_users t0 WHERE t0.username = ? LIMIT 1 ["superadmin"] []
kimai          | [2022-09-24 17:10:10] doctrine.DEBUG: SELECT t0.id AS id_1, t0.alias AS alias_2, t0.registration_date AS registration_date_3, t0.title AS title_4, t0.avatar AS avatar_5, t0.api_token AS api_token_6, t0.auth AS auth_7, t0.username AS username_8, t0.email AS email_9, t0.account AS account_10, t0.enabled AS enabled_11, t0.password AS password_12, t0.last_login AS last_login_13, t0.confirmation_token AS confirmation_token_14, t0.password_requested_at AS password_requested_at_15, t0.roles AS roles_16, t0.color AS color_17 FROM kimai2_users t0 WHERE t0.username = ? LIMIT 1 ["kimai@mydomain.net"] []
kimai          | 
kimai          |  [ERROR] email (superadmin)                                                     
kimai          |              The email is already used.                                         
kimai          | 
kimai          |  [ERROR] username (superadmin)                                                  
kimai          |              The username is already used.                                      
kimai          | 
kimai          | [2022-09-24 17:10:10] console.DEBUG: Command "'kimai:create-user' superadmin 'kimai@mydomain.net' ROLE_SUPER_ADMIN password" exited with code "2" {"command":"'kimai:create-user' superadmin 'kimai@mydomain.net' ROLE_SUPER_ADMIN password","code":2} []
kimai          | [2022-09-24 17:10:10] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\MakerBundle\Event\ConsoleErrorSubscriber::onConsoleTerminate". {"event":"console.terminate","listener":"Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber::onConsoleTerminate"} []
kimai          | [2022-09-24 17:10:10] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Component\Console\EventListener\ErrorListener::onConsoleTerminate". {"event":"console.terminate","listener":"Symfony\\Component\\Console\\EventListener\\ErrorListener::onConsoleTerminate"} []
kimai          | [2022-09-24 17:10:10] php.INFO: Deprecated: Return type of App\Configuration\ThemeConfiguration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"exception":"[object] (ErrorException(code: 0): Deprecated: Return type of App\\Configuration\\ThemeConfiguration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /opt/kimai/src/Configuration/ThemeConfiguration.php:32)"} []
kimai          | [2022-09-24 17:10:10] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"} []
kimai          | [2022-09-24 17:10:10] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DumpListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DumpListener::configure"} []
kimai          | [2022-09-24 17:10:10] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\MakerBundle\Event\ConsoleErrorSubscriber::onConsoleTerminate". {"event":"console.terminate","listener":"Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber::onConsoleTerminate"} []
kimai          | [2022-09-24 17:10:10] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Component\Console\EventListener\ErrorListener::onConsoleTerminate". {"event":"console.terminate","listener":"Symfony\\Component\\Console\\EventListener\\ErrorListener::onConsoleTerminate"} []
kimai          | Kimai2 ready
kimai          | [2022-09-24 17:10:11] php.INFO: Deprecated: Return type of App\Configuration\ThemeConfiguration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"exception":"[object] (ErrorException(code: 0): Deprecated: Return type of App\\Configuration\\ThemeConfiguration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /opt/kimai/src/Configuration/ThemeConfiguration.php:32)"} []
kimai          | [2022-09-24 17:10:11] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"} []
kimai          | [2022-09-24 17:10:11] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DumpListener::configure". {"event":"console.command","listener":"Symfony\\Component\\HttpKernel\\EventListener\\DumpListener::configure"} []
kimai          | 
kimai          | Reloading configurations ...
kimai          | ============================
kimai          | 
kimai          | 
kimai          |  [OK] All 40 YAML files contain valid syntax.                                   
kimai          | 
kimai          | 
kimai          | 
kimai          |  [OK] All 514 XLIFF files contain valid syntax.                                 
kimai          | 
kimai          | 
kimai          |  Rebuilding your cache, please be patient ...
kimai          | 
kimai          |  // Clearing the cache for the dev environment with debug                       
kimai          |  // true                                                                        
kimai          | 
kimai          |  [OK] Cache for the "dev" environment (debug=true) was successfully cleared.    
kimai          | 
kimai          | 
kimai          |  // Warming up the cache for the dev environment with debug                     
kimai          |  // true                                                                        
kimai          | 
kimai          |  [OK] Cache for the "dev" environment (debug=true) was successfully warmed.     
kimai          | 
kimai          | 
kimai          |  [OK] Kimai config was reloaded                                                 
kimai          | 
kimai          | [24-Sep-2022 19:10:25] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
kimai          | [24-Sep-2022 19:10:25] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
kimai          | [24-Sep-2022 19:10:25] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
kimai          | [24-Sep-2022 19:10:25] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
kimai          | [24-Sep-2022 19:10:25] NOTICE: fpm is running, pid 1
kimai          | [24-Sep-2022 19:10:25] NOTICE: ready to handle connections
kimai          | 127.0.0.1 -  24/Sep/2022:19:10:29 +0200 "GET /ping" 404
kimai-nginx-1  | 172.27.0.4 - - [24/Sep/2022:17:10:29 +0000] "GET /health HTTP/1.1" 200 5 "-" "Wget" "-"
kevinpapst commented 1 year ago

You have to check the Kimai log file at kimai-root/var/log/dev.log, not the docker logs!

MrRulf commented 1 year ago

I can't access the root folder in the container, permission denied and sudo and su don't work :/ I used this comment to enter the container: sudo docker exec -it kimai bash (had no access to a pc to test in the last two days :/)

tobybatch commented 1 year ago
docker exec -it --user=root kimai bash
kevinpapst commented 1 year ago

@tobybatch doing a tail on the kimai log would be something like this ?

docker exec --user=root kimai tail -f /opt/kimai/var/log/dev.log