planka.log is not created #556

Closed
opened 2026-02-04 20:20:44 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @ipod86 on GitHub (Aug 15, 2024).

Where is the problem occurring?

I'm not sure

What browsers are you seeing the problem on?

Other

Current behaviour

Hello,

I would like to monitor Planka with fail2ban. To do this, I have mounted the logs locally. However, my logs folder remains empty.

Screenshot_20240815_135505_Chrome
Screenshot_20240815_134956_RaspController
I have tried to log in incorrectly twice and correctly twice. Is this a bug or have I configured something incorrectly?

Desired behaviour

See Logfile

Steps to reproduce

Other information

No response

Originally created by @ipod86 on GitHub (Aug 15, 2024). ### Where is the problem occurring? I'm not sure ### What browsers are you seeing the problem on? Other ### Current behaviour Hello, I would like to monitor Planka with fail2ban. To do this, I have mounted the logs locally. However, my logs folder remains empty. ![Screenshot_20240815_135505_Chrome](https://github.com/user-attachments/assets/6465ff77-2bb2-4f3c-b62d-d726e0f9f046) ![Screenshot_20240815_134956_RaspController](https://github.com/user-attachments/assets/67fe07dd-b33f-4378-a1d6-fdddadc9d2ad) I have tried to log in incorrectly twice and correctly twice. Is this a bug or have I configured something incorrectly? ### Desired behaviour See Logfile ### Steps to reproduce - ### Other information _No response_
OVERLORD added the help wanted label 2026-02-04 20:20:44 +03:00
Author
Owner

@meltyshev commented on GitHub (Aug 16, 2024):

Hi! I've just tested this and everything works fine for me, I can see planka.log in the mounted folder. It looks like you're using an outdated docker-compose.yml file. Please try to use the latest version, I think it might be the issue.

@meltyshev commented on GitHub (Aug 16, 2024): Hi! I've just tested this and everything works fine for me, I can see `planka.log` in the mounted folder. It looks like you're using an outdated `docker-compose.yml` file. Please try to use the [latest](https://raw.githubusercontent.com/plankanban/planka/master/docker-compose.yml) version, I think it might be the issue.
Author
Owner

@ipod86 commented on GitHub (Aug 16, 2024):

It still doesn't seem to work.
The folder remains empty.
Attached is my (testing) docker compose. I used the posted version. Could it be because of Portainer, which I use to run the compose?

version: '3'

services:
  planka:
    image: ghcr.io/plankanban/planka:latest
    restart: on-failure
    volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/private/attachments
      - ./logs/:/app/logs/
    ports:
      - 3003:1337
    environment:
      - BASE_URL=http://192.168.99.83:3003
      - DATABASE_URL=postgresql://postgres@postgres/planka
      - SECRET_KEY=notsecretkey

      # - TRUST_PROXY=0
      # - TOKEN_EXPIRES_IN=365 # In days

      # related: https://github.com/knex/knex/issues/2354
      # As knex does not pass query parameters from the connection string we
      # have to use environment variables in order to pass the desired values, e.g.
      # - PGSSLMODE=<value>

      # Configure knex to accept SSL certificates
      # - KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false

      # - DEFAULT_ADMIN_EMAIL=demo@demo.demo # Do not remove if you want to prevent this user from being edited/deleted
      # - DEFAULT_ADMIN_PASSWORD=demo
      # - DEFAULT_ADMIN_NAME=Demo Demo
      # - DEFAULT_ADMIN_USERNAME=demo

      # - ALLOW_ALL_TO_CREATE_PROJECTS=true

      # - OIDC_ISSUER=
      # - OIDC_CLIENT_ID=
      # - OIDC_CLIENT_SECRET=
      # - OIDC_ID_TOKEN_SIGNED_RESPONSE_ALG=
      # - OIDC_USERINFO_SIGNED_RESPONSE_ALG=
      # - OIDC_SCOPES=openid email profile
      # - OIDC_RESPONSE_MODE=fragment
      # - OIDC_USE_DEFAULT_RESPONSE_MODE=true
      # - OIDC_ADMIN_ROLES=admin
      # - OIDC_EMAIL_ATTRIBUTE=email
      # - OIDC_NAME_ATTRIBUTE=name
      # - OIDC_USERNAME_ATTRIBUTE=preferred_username
      # - OIDC_ROLES_ATTRIBUTE=groups
      # - OIDC_IGNORE_USERNAME=true
      # - OIDC_IGNORE_ROLES=true
      # - OIDC_ENFORCED=true

      # Email Notifications (https://nodemailer.com/smtp/)
      # - SMTP_HOST=
      # - SMTP_PORT=587
      # - SMTP_NAME=
      # - SMTP_SECURE=true
      # - SMTP_USER=
      # - SMTP_PASSWORD=
      # - SMTP_FROM="Demo Demo" <demo@demo.demo>

      # Optional fields: accessToken, events, excludedEvents
      # - |
      #   WEBHOOKS=[{
      #     "url": "http://localhost:3001",
      #     "accessToken": "notaccesstoken",
      #     "events": ["cardCreate", "cardUpdate", "cardDelete"],
      #     "excludedEvents": ["notificationCreate", "notificationUpdate"]
      #   }]

      # - SLACK_BOT_TOKEN=
      # - SLACK_CHANNEL_ID=
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:14-alpine
    restart: on-failure
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  user-avatars:
  project-background-images:
  attachments:
  db-data:
@ipod86 commented on GitHub (Aug 16, 2024): It still doesn't seem to work. The folder remains empty. Attached is my (testing) docker compose. I used the posted version. Could it be because of Portainer, which I use to run the compose? ``` version: '3' services: planka: image: ghcr.io/plankanban/planka:latest restart: on-failure volumes: - user-avatars:/app/public/user-avatars - project-background-images:/app/public/project-background-images - attachments:/app/private/attachments - ./logs/:/app/logs/ ports: - 3003:1337 environment: - BASE_URL=http://192.168.99.83:3003 - DATABASE_URL=postgresql://postgres@postgres/planka - SECRET_KEY=notsecretkey # - TRUST_PROXY=0 # - TOKEN_EXPIRES_IN=365 # In days # related: https://github.com/knex/knex/issues/2354 # As knex does not pass query parameters from the connection string we # have to use environment variables in order to pass the desired values, e.g. # - PGSSLMODE=<value> # Configure knex to accept SSL certificates # - KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false # - DEFAULT_ADMIN_EMAIL=demo@demo.demo # Do not remove if you want to prevent this user from being edited/deleted # - DEFAULT_ADMIN_PASSWORD=demo # - DEFAULT_ADMIN_NAME=Demo Demo # - DEFAULT_ADMIN_USERNAME=demo # - ALLOW_ALL_TO_CREATE_PROJECTS=true # - OIDC_ISSUER= # - OIDC_CLIENT_ID= # - OIDC_CLIENT_SECRET= # - OIDC_ID_TOKEN_SIGNED_RESPONSE_ALG= # - OIDC_USERINFO_SIGNED_RESPONSE_ALG= # - OIDC_SCOPES=openid email profile # - OIDC_RESPONSE_MODE=fragment # - OIDC_USE_DEFAULT_RESPONSE_MODE=true # - OIDC_ADMIN_ROLES=admin # - OIDC_EMAIL_ATTRIBUTE=email # - OIDC_NAME_ATTRIBUTE=name # - OIDC_USERNAME_ATTRIBUTE=preferred_username # - OIDC_ROLES_ATTRIBUTE=groups # - OIDC_IGNORE_USERNAME=true # - OIDC_IGNORE_ROLES=true # - OIDC_ENFORCED=true # Email Notifications (https://nodemailer.com/smtp/) # - SMTP_HOST= # - SMTP_PORT=587 # - SMTP_NAME= # - SMTP_SECURE=true # - SMTP_USER= # - SMTP_PASSWORD= # - SMTP_FROM="Demo Demo" <demo@demo.demo> # Optional fields: accessToken, events, excludedEvents # - | # WEBHOOKS=[{ # "url": "http://localhost:3001", # "accessToken": "notaccesstoken", # "events": ["cardCreate", "cardUpdate", "cardDelete"], # "excludedEvents": ["notificationCreate", "notificationUpdate"] # }] # - SLACK_BOT_TOKEN= # - SLACK_CHANNEL_ID= depends_on: postgres: condition: service_healthy postgres: image: postgres:14-alpine restart: on-failure volumes: - db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d planka"] interval: 10s timeout: 5s retries: 5 volumes: user-avatars: project-background-images: attachments: db-data: ```
Author
Owner

@meltyshev commented on GitHub (Aug 16, 2024):

Hm...

Have you checked if the log file is being created in the /app/logs directory of the Planka container (if the folder isn't mounted)?

It could be a problem with write permissions for the mounted folder. You can try to change an owner before mounting by:

chown 1000:1000 /data/compose/30/logs
@meltyshev commented on GitHub (Aug 16, 2024): Hm... Have you checked if the log file is being created in the `/app/logs` directory of the Planka container (if the folder isn't mounted)? It could be a problem with write permissions for the mounted folder. You can try to change an owner before mounting by: ``` chown 1000:1000 /data/compose/30/logs ```
Author
Owner

@ipod86 commented on GitHub (Aug 16, 2024):

How can I check if the folder is not mounted? I don't see any log in the mounted folder. I changed the permissions and ran compose again. No change.

@ipod86 commented on GitHub (Aug 16, 2024): How can I check if the folder is not mounted? I don't see any log in the mounted folder. I changed the permissions and ran compose again. No change.
Author
Owner

@meltyshev commented on GitHub (Aug 16, 2024):

Unfortunately, I don't know what else it could be. We'll try to check it on our Portainer, but a little later.

@meltyshev commented on GitHub (Aug 16, 2024): Unfortunately, I don't know what else it could be. We'll try to check it on our Portainer, but a little later.
Author
Owner

@ipod86 commented on GitHub (Aug 16, 2024):

I just mounted the App folder without the logs. I see some folders there, but all of them have no content.

@ipod86 commented on GitHub (Aug 16, 2024): I just mounted the App folder without the logs. I see some folders there, but all of them have no content.
Author
Owner

@ipod86 commented on GitHub (Aug 18, 2024):

I just had a problem in another container where I couldn't see all the files in the mount.

The option

environment:
- DOCKER_ENABLE_SECURITY=true 

helped there. Is there a parameter like this in planka too?

@ipod86 commented on GitHub (Aug 18, 2024): I just had a problem in another container where I couldn't see all the files in the mount. The option ``` environment: - DOCKER_ENABLE_SECURITY=true ``` helped there. Is there a parameter like this in planka too?
Author
Owner

@ipod86 commented on GitHub (Aug 18, 2024):

I just tried something else. I changed my user picture and uploaded an attachment in a card. The "attachments" and "user avatars" folders are also empty. But I can see everything in planka.

So is all integrated:

volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/private/attachments
      - ./logs/:/app/logs
@ipod86 commented on GitHub (Aug 18, 2024): I just tried something else. I changed my user picture and uploaded an attachment in a card. The "attachments" and "user avatars" folders are also empty. But I can see everything in planka. So is all integrated: ``` volumes: - user-avatars:/app/public/user-avatars - project-background-images:/app/public/project-background-images - attachments:/app/private/attachments - ./logs/:/app/logs ```
Author
Owner

@Nounoursdestavernes commented on GitHub (Aug 24, 2024):

Hi @ipod86

I had the same issue. I tried with the raw docker-compose.yml (with the ./logs volume) and the problem is, in my case (on test and on my server), a permissions issue. The chown 1000:1000 ./logs solved the problem.

Could you maybe retry this solution and update us ?

For that part:

I just tried something else. I changed my user picture and uploaded an attachment in a card. The "attachments" and "user avatars" folders are also empty. But I can see everything in planka.

So is all integrated:

volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/private/attachments
      - ./logs/:/app/logs

If I understand well, you have no problem with attachment and avatars ? If it is the case, it seems to confirm the permissions problem. Because in the case of user-avatars and the other volumes (excepted logs) docker will handle everything about volumes and "hide" them on /var/lib/docker/volumes

If the chown command doesn't work you can investigate with the following idea:

In the docker compose file use

      - ./user-avatars:/app/public/user-avatars

instead of the

      - user-avatars:/app/public/user-avatars

Check the permissions of the user-avatars folder in the host machine and try to upload an avatar.

If the upload does'nt work this is a permissions issue for sure. (and the chown should work)

Otherwise check the difference in permissions between the two folders (logs and user-avatars)

If there is no difference then remove the logs volume in the docker file and run the container.

Then use the following command to have a bash in the docker:
docker exec -ti <container name> /bin/bash with the right container name that you can get with docker ps

Then inside the docker check that the logs/planka.log file exist.
If it's the case then it is a permissions problem but here I have no idea
If the file does'nt exist that mean there is a problem elsewhere (and actually have no idea where it is)

Hope this will help. Don't hesitate to ask anything if something is unclear or weird :)

@Nounoursdestavernes commented on GitHub (Aug 24, 2024): Hi @ipod86 I had the same issue. I tried with the raw docker-compose.yml (with the ./logs volume) and the problem is, in my case (on test and on my server), a permissions issue. The ```chown 1000:1000 ./logs``` solved the problem. Could you maybe retry this solution and update us ? For that part: > I just tried something else. I changed my user picture and uploaded an attachment in a card. The "attachments" and "user avatars" folders are also empty. But I can see everything in planka. > > So is all integrated: > > ``` > volumes: > - user-avatars:/app/public/user-avatars > - project-background-images:/app/public/project-background-images > - attachments:/app/private/attachments > - ./logs/:/app/logs > ``` If I understand well, you have no problem with attachment and avatars ? If it is the case, it seems to confirm the permissions problem. Because in the case of ```user-avatars``` and the other volumes (excepted logs) docker will handle everything about volumes and "hide" them on ```/var/lib/docker/volumes``` If the chown command doesn't work you can investigate with the following idea: In the docker compose file use ``` - ./user-avatars:/app/public/user-avatars ``` instead of the ``` - user-avatars:/app/public/user-avatars ``` Check the permissions of the user-avatars folder in the host machine and try to upload an avatar. If the upload does'nt work this is a permissions issue for sure. (and the chown should work) Otherwise check the difference in permissions between the two folders (logs and user-avatars) If there is no difference then remove the logs volume in the docker file and run the container. Then use the following command to have a bash in the docker: ```docker exec -ti <container name> /bin/bash``` with the right container name that you can get with docker ps Then inside the docker check that the logs/planka.log file exist. If it's the case then it is a permissions problem but here I have no idea If the file does'nt exist that mean there is a problem elsewhere (and actually have no idea where it is) Hope this will help. Don't hesitate to ask anything if something is unclear or weird :)
Author
Owner

@ipod86 commented on GitHub (Aug 24, 2024):

It works with chmod 1000.

Thank you

@ipod86 commented on GitHub (Aug 24, 2024): It works with chmod 1000. Thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#556