Error when starting seafile-mc 7.1.3

Hello,
I am currently getting the following error when I start the seafile-mc (version 7.1.3) docker container:

*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 21
*** Running /scripts/start.py...
[2020-04-20 18:06:12] Preparing for letsencrypt ...
Traceback (most recent call last):
  File "/scripts/start.py", line 86, in <module>
    main()
  File "/scripts/start.py", line 51, in main
    init_letsencrypt()
  File "/scripts/bootstrap.py", line 32, in init_letsencrypt
    wait_for_nginx()
  File "/scripts/utils/__init__.py", line 288, in wait_for_nginx
    if ':80 ' in output:

The problem seems to be that ‘:80’ should be changed to b’:80’ as subprocess returns a bytestring in Python 3.

same problem with seafile-mc-pro 7.1.3

*** Booting runit daemon...
*** Runit started as PID 25
*** Running /scripts/start.py...
[2020-04-22  16:22:19] Preparing for letsencrypt ...
Traceback (most recent call last):
  File "/scripts/start.py", line 86, in <module>
    main()
  File "/scripts/start.py", line 51, in main
    init_letsencrypt()
  File "/scripts/bootstrap.py", line 32, in init_letsencrypt
    wait_for_nginx()
  File "/scripts/utils/__init__.py", line 288, in wait_for_nginx
    if ':80 ' in output:
TypeError: a bytes-like object is required, not 'str'

i do receive the same error (|SEAFILE_VERSION |7.1.3|):

*** Running /etc/my_init.d/01_create_data_links.sh…

rm: cannot remove '/var/log/nginx': Device or resource busy


*** Booting runit daemon...


*** Runit started as PID 23


*** Running /scripts/start.py...


[2020-04-25 12:34:41] Preparing for letsencrypt ...


Traceback (most recent call last):


  File "/scripts/start.py", line 86, in <module>


    main()


  File "/scripts/start.py", line 51, in main


    init_letsencrypt()


  File "/scripts/bootstrap.py", line 32, in init_letsencrypt


    wait_for_nginx()


  File "/scripts/utils/__init__.py", line 288, in wait_for_nginx


    if ':80 ' in output:


TypeError: a bytes-like object is required, not 'str'


*** /scripts/start.py exited with status 1.


*** Shutting down runit daemon (PID 23)...


*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...


*** Killing all processes...


*** Running /etc/my_init.d/01_create_data_links.sh...


rm: cannot remove '/var/log/nginx': Device or resource busy


*** Booting runit daemon...


*** Runit started as PID 23


*** Running /scripts/start.py...


[2020-04-25 12:35:43] Preparing for letsencrypt ...


Traceback (most recent call last):


  File "/scripts/start.py", line 86, in <module>


    main()


  File "/scripts/start.py", line 51, in main


    init_letsencrypt()


  File "/scripts/bootstrap.py", line 32, in init_letsencrypt


    wait_for_nginx()


  File "/scripts/utils/__init__.py", line 288, in wait_for_nginx


    if ':80 ' in output:


TypeError: a bytes-like object is required, not 'str'


*** /scripts/start.py exited with status 1.


*** Shutting down runit daemon (PID 23)...


*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...


*** Killing all processes...


*** Running /etc/my_init.d/01_create_data_links.sh...


rm: cannot remove '/var/log/nginx': Device or resource busy


*** Booting runit daemon...


*** Runit started as PID 23


*** Running /scripts/start.py...


[2020-04-25 12:36:45] Preparing for letsencrypt ...


Traceback (most recent call last):


  File "/scripts/start.py", line 86, in <module>


    main()


  File "/scripts/start.py", line 51, in main


    init_letsencrypt()


  File "/scripts/bootstrap.py", line 32, in init_letsencrypt


    wait_for_nginx()


  File "/scripts/utils/__init__.py", line 288, in wait_for_nginx


    if ':80 ' in output:


TypeError: a bytes-like object is required, not 'str'


*** /scripts/start.py exited with status 1.


*** Shutting down runit daemon (PID 23)...


*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...


*** Killing all processes...


*** Running /etc/my_init.d/01_create_data_links.sh...


rm: cannot remove '/var/log/nginx': Device or resource busy


*** Booting runit daemon...


*** Runit started as PID 23


*** Running /scripts/start.py...


[2020-04-25 12:37:48] Preparing for letsencrypt ...


Traceback (most recent call last):


  File "/scripts/start.py", line 86, in <module>


    main()


  File "/scripts/start.py", line 51, in main


    init_letsencrypt()


  File "/scripts/bootstrap.py", line 32, in init_letsencrypt


    wait_for_nginx()


  File "/scripts/utils/__init__.py", line 288, in wait_for_nginx


    if ':80 ' in output:


TypeError: a bytes-like object is required, not 'str'


*** /scripts/start.py exited with status 1.


*** Shutting down runit daemon (PID 23)...


*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...


*** Killing all processes...


*** Running /etc/my_init.d/01_create_data_links.sh...


rm: cannot remove '/var/log/nginx': Device or resource busy


*** Booting runit daemon...


*** Runit started as PID 24


*** Running /scripts/start.py...


[2020-04-25 12:38:50] Preparing for letsencrypt ...


Traceback (most recent call last):


  File "/scripts/start.py", line 86, in <module>


    main()


  File "/scripts/start.py", line 51, in main


    init_letsencrypt()


  File "/scripts/bootstrap.py", line 32, in init_letsencrypt


    wait_for_nginx()


  File "/scripts/utils/__init__.py", line 288, in wait_for_nginx


    if ':80 ' in output:


TypeError: a bytes-like object is required, not 'str'


*** /scripts/start.py exited with status 1.


*** Shutting down runit daemon (PID 24)...


*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...


*** Killing all processes...

I´ve lived with this error since the upgrade from 6 to version 7. The cause is that the letsencrypt certificate is not getting renewed automatically. Therefore i strongly believe that there is an error in the “stack” thats responsible for the renewing/autorestarting.

and the docker settings are set accordingly for letsenrypt:

DB_HOST db
DB_ROOT_PASSWD password
TZ Europe/Vienna
SEAFILE_SERVER_LETSENCRYPT true
SEAFILE_SERVER_HOSTNAME domainnameexternal
SEAFILE_ADMIN_EMAIL xxx@gmail.com
SEAFILE_ADMIN_PASSWORD xxxx
VIRTUAL_HOST domainnameexternal
LETSENCRYPT_HOST domainnameexternal
LETSENCRYPT_EMAIL xxx@gmail.com
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DEBIAN_FRONTEND teletype
LANG en_US.UTF-8
LANGUAGE en_US:en
LC_ALL en_US.UTF-8
SEAFILE_VERSION 7.1.3
SEAFILE_SERVER seafile-pro-server

I had to revert to 7.0.13

Would be great if that could be fixed!

thanks in advance!!

I get the same error after updating docker to 7.1.3 in the case of https with letsencrypt. If I disable https, then seafile works fine.

Same for me. Is there a temporary solution? Maybe to have certificates manually generated or updating the docker-compose.yml file?

Is there already a solution? I guess that needs to be fixed within the next versions!

is there a solution?

Did you find a solution? has this been fixed with one of the newer releases?

Hi, yes I got mine working, but I dont 100% remember how.

I think the key was to make sure your hostname was resolved on any internet DNS and pointed to your server IP. So for example, if your server name is seafile.satheras.com any DNS shall resolve this hostname and the IP shall point to your server.

When that happens, Letsencrypt central servers are able to verify your server by testing connection to it and then the script succeeds to issue you a certificate.

Try that and let us know.

Hi again,

Thanks for your fast response! I checked on that with severals dns worldwide checker tools. Everything regarding your hint was already a given. That means it can be resolved. Also port 80 and 443 are working as they should - especially for letsencrypt. So i gave the seafile-latest a try again and got the same error pattern again.

By stepping back to the old seafile-pro-mc:7.0.13 seafile docker release it works as a workaround. Only with the step up to the newest version those errors are showing up and preventing from booting up seafile. Therefore i am clueless again :frowning:

Hmm, can you try to run with
docker-compose up
without -d and see the logs on the screen to understand where it fails?