I have deleted /var/log/app_lifecycle.log and recreated it. Now there are no more new entries. Tried to recreate with root and truenas_admin
What do I have to do so that it works correctly again and I get app logs?
I suspect this is an EE file because I donât have one on my system, but judging by other files I would guess that you probably want to do a sudo chown root:adm app_lifecycle.log
.
You donât have anything to lose since it isnât working at present, so give it a go.
(If someone else who is running EE can do ls -l /var/log/app_lifecycle.log
so we can get a definitive user and group that would be helpful.)
-rw-r----- 1 root root 456 Nov 17 23:21 /var/log/app_lifecycle.log
-rw-r----- 1 root root 456 Nov 24 10:10 /var/log/app_lifecycle.log
Now i got this entry in the Log
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
What commands did you execute?
Did you perchance use AI?
chmod 640 /var/log/app_lifecycle.log
chown root:root /var/log/app_lifecycle.log
i think in know nos why i got the Log Output.
Chatgpt told me to use
truncate -s 456 /var/log/app_lifecycle.log
Know i know that the number 456 stand for the File size.
But even with the correct User and group i get No entrys of My docker apps.
Yeah figured out you were using AI with that nonsense result.
Please donât blindly paste commands from chatgpt.
That file doesnât contain docker application logs in the first place. You want container logs? Use the âview logsâ button in the Web UI or use docker logs <container id or name>
.
But it would help a lot if you would tell us what youâre actually trying to achieveâŚ
Please donât blindly paste commands from people like me suggesting them here. If you get suggestions here you need to check them using e.g. man
to confirm that they seem to be correct. It is your system and whatever issues you currently have you do not want to do the wrong thing and make them worse.
Anything you need to run as root can potentially trash your system, so you have to get them exactly right - and sometimes flags like -n
and -N
can have seriously different consequences.
Anecdote warning: My brother-in-law is a lawyer - but my history of his informal legal comments to my sister and aunt and myself has been littered with bad and incorrect advice that even I can immediately spot and disprove with minimal google searching. But when my sister said recently that his advice was based on âchat-gptâ I knew that his lack of expertise was way worse than I ever thought.
Did anyone ever figure out how to solve this issue?
I see a lot of discussion about what to post and what not to, but I am not sure I see an answer here that was authoritatively declared to work.
Any assistance would be quite appreciated.
You deleted app_lifecycle.log
? Just reload syslog-ng config and itâll recreate it.
sudo syslog-ng-ctl reload
root@truenas[/var/log]# file app_lifecycle.log
app_lifecycle.log: ASCII text, with very long lines (464)
root@truenas[/var/log]#
root@truenas[/var/log]# rm app_lifecycle.log
root@truenas[/var/log]#
root@truenas[/var/log]# file app_lifecycle.log
app_lifecycle.log: cannot open `app_lifecycle.log' (No such file or directory)
root@truenas[/var/log]#
root@truenas[/var/log]# sudo syslog-ng-ctl reload
Config reload successful
root@truenas[/var/log]#
root@truenas[/var/log]# file app_lifecycle.log
app_lifecycle.log: ASCII text, with very long lines (464)
root@truenas[/var/log]#
Henry,
Unfortunately across the pond here I do not have the same luck as you! Please take notice of my experience as is instantiated by what follows hereupon.
root@truenas1[/var/log]# rm app_lifecycle.log
rm: cannot remove âapp_lifecycle.logâ: No such file or directory
root@truenas1[/var/log]# file app_lifecycle.log
app_lifecycle.log: cannot open `app_lifecycle.logâ (No such file or directory)
root@truenas1[/var/log]# sudo syslog-ng-ctl reload
Config reload successful
root@truenas1[/var/log]# sleep 45
root@truenas1[/var/log]# ls -la app_lifecycle.log
ls: cannot access âapp_lifecycle.logâ: No such file or directory
root@truenas1[/var/log]#
Stuart
Interesting, are you on an older version by chance?
Just reproduced this on a 25.04 machine in-case there was some difference with the nightly builds and seems to work fine:
root@truenas[/var/log]# cat app_lifecycle.log
[2025/05/08 13:22:09] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'test-break' app: Top-level object must be a mapping\n
[2025/05/08 13:53:54] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'asd' app: Top-level object must be a mapping\n
[2025/05/08 14:06:14] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'hello-world' app: Top-level object must be a mapping\n
[2025/05/08 14:07:53] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'hello-world' app: Top-level object must be a mapping\n
[2025/05/08 14:10:48] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'hello-world' app: Top-level object must be a mapping\n
[2025/05/08 14:15:14] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'hello-world-2' app: Top-level object must be a mapping\n
[2025/05/08 14:15:22] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'hello-world-2' app: Top-level object must be a mapping\n
root@truenas[/var/log]# rm app_lifecycle.log
root@truenas[/var/log]# sudo syslog-ng-ctl reload
Config reload successful
root@truenas[/var/log]# ls app_lifecycle.log
app_lifecycle.log
root@truenas[/var/log]#
Follows hereupon the output from my TrueNAS SCALE server:
root@truenas1[/var/log]# cat /etc/version
25.04.0# root@truenas1[/var/log]# pwd
/var/log
root@truenas1[/var/log]# ls -la app_*
zsh: no matches found: app_*
root@truenas1[/var/log]# syslog-ng-ctl reload
Config reload successful
root@truenas1[/var/log]# ls -la app_*
zsh: no matches found: app_*
root@truenas1[/var/log]#
Thanks!
That file isnât written to constantly.
If you trigger an action that requires writing to it, trying to install/start an app with incorrect settings for example, ought to cause the file to be recreated with the new error messages.
Neofusion,
Might I ask you what is an example of a command line command that should cause an error and regenerate that file?
Create a dataset. Set ACL permissions to Deny All. Try to install an app using this dataset as one of your host path storage datasets.
And to expand on that a bit, you get to the âInstall by YAMLâ by doing the following:
- Click Apps on the left.
- Click Discover Apps on the right.
- Click the three dots just to the right of Custom App.
- Select Install via YAML.
Neofusion, et alia:
Thank you everyone for all your assistance. I was able to generate an error and see the app_lifecycle.log get recreated (using the install as yaml instructions).
I hope this series of postings will be of assistance to anyone in the future coming upon this situation.