[SOLVED] Error in logrotate helper

Hardware: VPS bought online ( Contabo )
YunoHost version: 11.0.9.6 (stable)
I have access to my server : Through SSH and browser
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

it seems to be a very common issue, but the most recent request hasn’t been answered so not sure if solution is the same as in the past.
i’ve also done the migration btw.
this is the excerpt of the log shown after the failed installation:

2022-08-17 14:20:43,022: DEBUG - + local checksum_setting_name=checksum__etc_cron.d_invidious
2022-08-17 14:20:43,023: DEBUG - ++ md5sum /etc/cron.d/invidious
2022-08-17 14:20:43,023: DEBUG - ++ cut '--delimiter= ' --fields=1
2022-08-17 14:20:43,025: DEBUG - + ynh_app_setting_set --app=invidious --key=checksum__etc_cron.d_invidious --value=c5d7988d47166fb3c4af22dc674a427b
2022-08-17 14:20:43,026: DEBUG - + local _globalapp=invidious
2022-08-17 14:20:43,087: DEBUG - + app=invidious
2022-08-17 14:20:43,087: DEBUG - + [[ checksum__etc_cron.d_invidious =~ (unprotected|protected|skipped)_ ]]
2022-08-17 14:20:43,087: DEBUG - + ynh_app_setting set invidious checksum__etc_cron.d_invidious c5d7988d47166fb3c4af22dc674a427b
2022-08-17 14:20:43,137: DEBUG - + '[' -n '' ']'
2022-08-17 14:20:43,137: DEBUG - + unset backup_file_checksum
2022-08-17 14:20:43,137: DEBUG - + chown root: /etc/cron.d/invidious
2022-08-17 14:20:43,138: DEBUG - + chmod 644 /etc/cron.d/invidious
2022-08-17 14:20:43,202: INFO - [##################..] > Configuring log rotation...
2022-08-17 14:20:43,202: DEBUG - + ynh_use_logrotate
2022-08-17 14:20:43,202: DEBUG - + all_args=()
2022-08-17 14:20:43,203: DEBUG - ++ seq 0 0
2022-08-17 14:20:43,204: WARNING - /usr/share/yunohost/helpers.d/logrotate: line 30: all_args[$I]: unbound variable
2022-08-17 14:20:43,204: DEBUG - + for I in $(seq 0 $#)
2022-08-17 14:20:43,204: DEBUG - ++ ynh_exit_properly
2022-08-17 14:20:43,709: DEBUG - ++ ynh_clean_setup
2022-08-17 14:20:43,713: DEBUG - ++ ynh_clean_check_starting
2022-08-17 14:20:43,713: DEBUG - ++ '[' -n '' ']'
2022-08-17 14:20:43,713: DEBUG - ++ '[' -n '' ']'
2022-08-17 14:20:43,713: DEBUG - ++ exit 1
2022-08-17 14:20:44,716: ERROR - Unable to install invidious: An error occurred inside the app installation script

while here you can find the full log.

Hardware: VPS bought online ( Contabo )
YunoHost version: 11.0.9.6 (stable)
I have access to my server : Through SSH and browser
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

as it happened few minutes ago with invidious, also this installation failed.
i’ve also done the migration btw.
this is the excerpt of the log shown after the failed installation:

2022-08-17 14:33:40,176: DEBUG - + [[ checksum__etc_systemd_system_nitter.service =~ (unprotected|protected|skipped)_ ]]
2022-08-17 14:33:40,176: DEBUG - + ynh_app_setting set nitter checksum__etc_systemd_system_nitter.service 460f2f9e9a14c699f0091d1d8f06b66c
2022-08-17 14:33:40,224: DEBUG - + '[' -n '' ']'
2022-08-17 14:33:40,225: DEBUG - + unset backup_file_checksum
2022-08-17 14:33:40,225: DEBUG - + systemctl enable nitter --quiet
2022-08-17 14:33:40,414: DEBUG - + systemctl daemon-reload
2022-08-17 14:33:40,577: DEBUG - + set_permissions
2022-08-17 14:33:40,577: DEBUG - + chown -R root:nitter /var/www/nitter
2022-08-17 14:33:40,598: DEBUG - + chown -R nitter:nitter /var/www/nitter/tmp
2022-08-17 14:33:40,599: DEBUG - + chmod -R g=u,g-w,o-rwx /var/www/nitter
2022-08-17 14:33:40,622: DEBUG - + setfacl -n -m u:www-data:--x /var/www/nitter
2022-08-17 14:33:40,625: DEBUG - + setfacl -nR -m u:www-data:r-x -m d:u:www-data:r-x /var/www/nitter/public
2022-08-17 14:33:40,718: INFO - [#################...] > Configuring log rotation... [00h00m,01s]
2022-08-17 14:33:40,719: DEBUG - + ynh_use_logrotate
2022-08-17 14:33:40,719: DEBUG - + all_args=()
2022-08-17 14:33:40,720: DEBUG - ++ seq 0 0
2022-08-17 14:33:40,722: WARNING - /usr/share/yunohost/helpers.d/logrotate: line 30: all_args[$I]: unbound variable
2022-08-17 14:33:40,723: DEBUG - + for I in $(seq 0 $#)
2022-08-17 14:33:40,723: DEBUG - ++ ynh_exit_properly
2022-08-17 14:33:41,227: DEBUG - ++ ynh_clean_setup
2022-08-17 14:33:41,227: DEBUG - ++ ynh_clean_check_starting
2022-08-17 14:33:41,227: DEBUG - ++ '[' -n '' ']'
2022-08-17 14:33:41,227: DEBUG - ++ '[' -n '' ']'
2022-08-17 14:33:41,227: DEBUG - ++ exit 1
2022-08-17 14:33:42,229: ERROR - Unable to install nitter: An error occurred inside the app installation script

while here you can find the full log.

1 Like

Same error, same root cause… merging your threads.

Bug most likely introduced with helpers: fix logrotate shitty inconsistent handling of 'supposedly le… · YunoHost/yunohost@8d1c75e · GitHub.

2 Likes

I guess this will affect lots of apps. I got an error when updating gotosocial_ynh just now in case any people installing this app are checking the forum.

Info: Now upgrading gotosocial...
Info: [+...................] > Loading installation settings...
Info: [#+..................] > Backing up the app before upgrading (may take a while)...
Info: [##++................] > Stopping a systemd service...
Info: [####+...............] > Ensuring downward compatibility...
Info: [#####+..............] > Making sure dedicated system user exists...
Info: [######++............] > Upgrading NGINX web server configuration...
Info: [########+...........] > Upgrading dependencies...
Info: [#########+..........] > Updating a configuration file...
Info: [##########++........] > Upgrading systemd configuration...
Info: [############+.......] > Upgrading logrotate configuration...
Warning: /usr/share/yunohost/helpers.d/logrotate: line 30: all_args[$I]: unbound variable
Warning: [Error] Upgrade failed.
1 Like

i was about to try to install it. :sweat_smile:
maybe i should just skip it for now…

1 Like

logrotate error seems fixed by upgrading to yunohost 11.0.9.7.

i updated my apps with no problem.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.