🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

Need help as how to change default solace logging directory

Monis
Monis Member Posts: 4

when i am trying to bring the container , it fails by throwing "The file: /usr/sw/jail/logs/debug.log is not writable." is there a way i can change the logging directory to ay /opt

i beleive if i keep logging_debug_output=none , still debug.log will try to get created but due to permission issue it will not work for me, so i am trying if there is a way i can redirect the default "usr/sw/jail/logs" to the directory where i have access will solve my issue

Answers

  • swenhelge
    swenhelge Member, Employee Posts: 80 Solace Employee

    Hi,

    There are two options:

    Redirect the logs to stdout (disable logging to files) or disable debug log completely. The log config can be passed in as configuration keys when the docker container is created. See

    https://docs.solace.com/Software-Broker/Container-Tasks/Configuring-VMR-Container-Logging.htm

    The other option is to bind mount a host directory or mount a docker volume - each of course with read/write access - into the container at /usr/sw/jail/logs/

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 644 admin

    I've added this to my Docker create script, to externalize all the container volumes into one spot:

    --mount 'type=bind,source=/mnt/solace,destination=/var/lib/solace,ro=false' \
    

    Just had to go and make a directory /mnt/solace owned by the container userId "1000001":

    $ ls -l /mnt
    total 12K
    drwxr-xr-x  6 root    root 4.0K Jul 10 17:31 .
    drwxr-xr-x 21 root    root 4.0K Aug 13 15:10 ..
    drwxrwxrwx  1 alee    alee 4.0K Aug 15 10:50 c
    drwxrwxrwx  1 alee    alee 4.0K Aug 15 10:50 d
    drwxr-xr-x  9 1000001 root 4.0K Aug 14 09:08 solace
    drwxrwxrwt  5 root    root  100 Aug 14 09:07 wsl
    

  • swenhelge
    swenhelge Member, Employee Posts: 80 Solace Employee

    Thanks for adding the example @Aaron

    It is generally advisable to create this mount so data is preserved on changes to the container e.g. due to broker updates that require the container to be re-created.

    This link explains more:

    https://docs.solace.com/Software-Broker/Container-Tasks/Config-Container-Storage.htm

    And this documents the folders within the broker storage:

    https://docs.solace.com/Software-Broker/Configuring-Storage.htm#understanding-storage-group