How to debug seahub under windows

Hi everyone!

Today I stumbled upon a weird situation, when a seafile user called us.
They have a seafile server installation (5.1.3 CE) which was running smoothly for quite a while.

Seafile is installed on a whindows machine as a service.
Seafile log shows, that it was shut down by the service manager, then restarted a few minutes later.
Ever since that “restart” action, seahub exited with “code 1”, immediately restarted and took about 40-50 seconds until it exited again with error code 1. This repeated every minute for 5 Days.
Using IIS 8.x as a proxy, connection to seahub is secured by https.
IIS shows a 502, which is absolutely clear, since seahub turns of every few seconds.

My actions so far:
checking the config files -> all clear and correct.
Checking the path variables -> found and deleted old python 3 installation.
stopped seafile-server service and started seafile manually -> no changes
checked netstat-output -> only status on port 8000 is SYN_SENT, which is starting a tcp handshake
Deactivated firewall -> still no chance.

Being a linux-first admin, I also tried to start seahub manually, just for the sake of finding out, what is wrong. Unfortunately “django” module was not found. is seahub started in an virtual envelope?
If so, how could I start seahub manually to get the python output?

I tried
python c:\path\to\seafile\seahub\ wsgirunserver port=8000 ...
Which at least told me, that django is not available.
From the seafile-server log I see, that seahub is started somewhere else…

Can anybody bring light into the dark?
How would I manually start seahub to read the python errrors?

EDIT: While writing this, I have info that - after a complete server restart with deactivated firewall/antivirus - seafile is up again.
60 Minute till firewall/antivirus kicks back in. I’m keen to see what happens…

Seahub can’t be run directly because library paths and environment need to be set via the script.

We are not familiar with the Windows server environment. So we can give little help on this situation. I suggest migrate to Linux server if possible.

Hi Daniel,
Thank you for confirming my guess.

My problem is not so much with Windows server environment. It’s more about the technical steps that are necessary to start seahub under windows.

That is the part I am really interested in.
I know, seafile should be run in a linux environment, and that is what I prefer. But I’d really like to understand, what you are doing on a windows host, so I can better find the reason for something not working as it should.

Best regards,