After Seafile was upgraded from 6.2 to 7.0.5, Seahub (the web-interface for Seafile) would not start anymore. In all previous versions, the way to start Seafile and Seahub was the following procedure.
As seafile user launch:
seafile@seafile:~$ /path/to/seafile/seafile.sh start
seafile@seafile:~$ /path/to/seafile/seahub.sh start-fastcgi
Since the upgrade to 7.0.5 Seahub would not start anymore and fail with the following error:
seafile@seafile:~$ /path/to/seafile/seahub.sh start-fastcgi
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at 127.0.0.1:8000 ...
Warning: File comment has changed since version 6.3, while table `base_filecomment` is not migrated yet, please consider migrate it according to v6.3.0 release note, otherwise the file comment feature will not work correctly.
Unknown command: 'runfcgi'
Type 'manage.py help' for usage.
Error:Seahub failed to start.
The warning mistakenly leads to believe that there was a problem due to the upgrade, although all the upgrade scripts were executed successfully.
The reason is actually that Seahub no longer supports to be run as a fastcgi application. A hint can be found in Seahub's public repository in issue #4197 and an "official" information can be found in the updated Seafile documentation for Nginx, where it states:
If you are using [FastCGI](http://en.wikipedia.org/wiki/FastCGI), which is not recommended [...]
In previous versions, all documentation always mentioned to run Seahub in FastCGI mode.
Obviously this requires changes in the Nginx config. The fastcgi parameters for the / location are gone and need to be replaced by proxy parameters:
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_read_timeout 1200s;
client_max_body_size 0;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
}
The /seafhttp location configuration remains the same (always has been using proxy_pass).
After this, Seahub can be started without the fastcgi parameter:
seafile@seafile:~$ /path/to/seafile/seahub.sh start
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...
Seahub is started
Done.
Running into issues after upgrading Seafile to 7.1? Read the follow-up article Seafile upgrade and Seahub start errors after upgrading from Seafile 7.0 to 7.1.
If you are looking for hosted Seafile server in Switzerland, check out the Private File Cloud Server offer at Infiniroot!
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Observability Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder