Seafile update on Portainer leads to 502 Bad Gateway

Hi, I tried to run Seafile update on Portainer a couple of months ago and it’s giving 502 Bad Gateway error when I’m trying to access Seafile. I have attached the logs from Portainer when Seafile is started. Any idea what is causing this error and how can I resolve this error? :slight_smile:

*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 24
*** Running /scripts/enterpoint.sh...
2023-12-26 00:42:17 Waiting Nginx 
2023-12-26 00:42:17 Nginx ready 
2023-12-26 00:42:17 This is an idle script (infinite loop) to keep container running. 
[2023-12-26 00:42:18] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
[12/26/2023 00:42:18][upgrade]: The container was recreated, start fix the media symlinks
mv: cannot stat '/opt/seafile/seafile-server-10.0.1/seahub/media/avatars/*': No such file or directory
Traceback (most recent call last):
  File "/scripts/start.py", line 95, in <module>
    main()
  File "/scripts/start.py", line 61, in main
    check_upgrade()
  File "/scripts/upgrade.py", line 95, in check_upgrade
    fix_media_symlinks()
  File "/scripts/upgrade.py", line 79, in fix_media_symlinks
    call('mv -n %s/* %s' % (avatars_dir, dst_avatars_dir))
  File "/scripts/utils.py", line 70, in call
    return subprocess.check_call(*a, **kw)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mv -n /opt/seafile/seafile-server-10.0.1/seahub/media/avatars/* /shared/seafile/seahub-data/avatars' returned non-zero exit status 1.
*** Shutting down /scripts/enterpoint.sh (PID 25)...
*** Shutting down runit daemon (PID 24)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
*** Init system aborted.
*** Killing all processes...
*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 24
*** Running /scripts/enterpoint.sh...
2023-12-26 00:52:53 Waiting Nginx 
2023-12-26 00:52:53 Nginx ready 
2023-12-26 00:52:53 This is an idle script (infinite loop) to keep container running. 
[2023-12-26 00:52:54] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
[12/26/2023 00:52:54][upgrade]: The container was recreated, start fix the media symlinks
mv: cannot stat '/opt/seafile/seafile-server-10.0.1/seahub/media/avatars/*': No such file or directory
Traceback (most recent call last):
  File "/scripts/start.py", line 95, in <module>
    main()
  File "/scripts/start.py", line 61, in main
    check_upgrade()
  File "/scripts/upgrade.py", line 95, in check_upgrade
    fix_media_symlinks()
  File "/scripts/upgrade.py", line 79, in fix_media_symlinks
    call('mv -n %s/* %s' % (avatars_dir, dst_avatars_dir))
  File "/scripts/utils.py", line 70, in call
    return subprocess.check_call(*a, **kw)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mv -n /opt/seafile/seafile-server-10.0.1/seahub/media/avatars/* /shared/seafile/seahub-data/avatars' returned non-zero exit status 1.
*** Shutting down /scripts/enterpoint.sh (PID 25)...
*** Shutting down runit daemon (PID 24)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
*** Init system aborted.
*** Killing all processes...
*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 24
*** Running /scripts/enterpoint.sh...
2023-12-26 01:21:41 Nginx ready 
2023-12-26 01:21:41 This is an idle script (infinite loop) to keep container running. 
[2023-12-26 01:21:45] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
[12/26/2023 01:21:45][upgrade]: The container was recreated, start fix the media symlinks
mv: cannot stat '/opt/seafile/seafile-server-10.0.1/seahub/media/avatars/*': No such file or directory
Traceback (most recent call last):
  File "/scripts/start.py", line 95, in <module>
    main()
  File "/scripts/start.py", line 61, in main
    check_upgrade()
  File "/scripts/upgrade.py", line 95, in check_upgrade
    fix_media_symlinks()
  File "/scripts/upgrade.py", line 79, in fix_media_symlinks
    call('mv -n %s/* %s' % (avatars_dir, dst_avatars_dir))
  File "/scripts/utils.py", line 70, in call
    return subprocess.check_call(*a, **kw)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mv -n /opt/seafile/seafile-server-10.0.1/seahub/media/avatars/* /shared/seafile/seahub-data/avatars' returned non-zero exit status 1.
*** Shutting down /scripts/enterpoint.sh (PID 25)...
*** Shutting down runit daemon (PID 24)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
*** Init system aborted.
*** Killing all processes...
*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 23
*** Running /scripts/enterpoint.sh...
2024-03-17 23:50:31 Nginx ready 
2024-03-17 23:50:31 This is an idle script (infinite loop) to keep container running. 
[2024-03-17 23:50:36] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
[03/17/2024 23:50:36][upgrade]: The container was recreated, start fix the media symlinks
mv: cannot stat '/opt/seafile/seafile-server-10.0.1/seahub/media/avatars/*': No such file or directory
Traceback (most recent call last):
  File "/scripts/start.py", line 95, in <module>
    main()
  File "/scripts/start.py", line 61, in main
    check_upgrade()
  File "/scripts/upgrade.py", line 95, in check_upgrade
    fix_media_symlinks()
  File "/scripts/upgrade.py", line 79, in fix_media_symlinks
    call('mv -n %s/* %s' % (avatars_dir, dst_avatars_dir))
  File "/scripts/utils.py", line 70, in call
    return subprocess.check_call(*a, **kw)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mv -n /opt/seafile/seafile-server-10.0.1/seahub/media/avatars/* /shared/seafile/seahub-data/avatars' returned non-zero exit status 1.

Thanks!