I am running seafile server 4.3 on a raspberry pi using nginx. I know, the server version is old now, but you know, never touch a running system… And to be honest, I am not really good at linux etc. and it took me quite a while to get the server running in the first place.
So, today I could not connect anymore, neither from the windows client, nor from a mobile client. The windows error message was “Sorry, but the requested page is unavailable due to a server hiccup. Our engineers have been notified, so check back later.”
Checking the seafile.log was difficult, as the raspberry pi took about half an hour to scroll to the latest entries. The log has increased over the course of the two years I have been running the server to about 250 MB, and the raspberry editor can hardly cope with that.
Anyway, the latest entries are from July 3 to July 5, stating: “http-server.c(1354): Failed to write block 9b1979a4…”.
I don’t quite understand why there has been no error message dating from today.
I’ve just checked the remaining disk space on the SD card. Everything is OK.
So - any ideas how I could continue with my troubleshooting bearing in mind my limited understanding of Linux and the internal workings of the Seafile server?
Blockquote
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/models/base.py”, line 546, in save
force_update=force_update, update_fields=update_fields)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/models/base.py”, line 626, in save_base
rows = manager.using(using).filter(pk=pk_val)._update(values)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/models/query.py”, line 605, in _update
return query.get_compiler(self.db).execute_sql(None)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/models/sql/compiler.py”, line 1020, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/models/sql/compiler.py”, line 846, in execute_sql
cursor.execute(sql, params)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/backends/sqlite3/base.py”, line 366, in execute
six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/backends/sqlite3/base.py”, line 362, in execute
return Database.Cursor.execute(self, query, params)
DatabaseError: database is locked
seahub_django_request.log:
Blockquote
2018-07-05 17:17:50,020 [ERROR] django.request:210 handle_uncaught_exception Internal Server Error: /api2/avatars/user/xyz@xyz.com/resized/80/
Traceback (most recent call last):
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/core/handlers/base.py”, line 185, in get_response
response = middleware_method(request, response)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/contrib/sessions/middleware.py”, line 38, in process_response
request.session.save()
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/contrib/sessions/backends/db.py”, line 57, in save
obj.save(force_insert=must_create, using=using)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/models/base.py”, line 546, in save
force_update=force_update, update_fields=update_fields)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/models/base.py”, line 626, in save_base
rows = manager.using(using).filter(pk=pk_val)._update(values)
File “/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/models/query.py”, line 605, in _update
return query.get_compiler(self.db).execute_sql(None)
File "/home/seafile/seafile-server-4.3.0/seahub/thirdpart/Django-1.5.12-py2.7.egg/django/db/model
The user where seafile is running has no permission to acces the seafile databes. You should change the owner of them. Are you using SQLite or MariaDB?
Sorry if I appear a bit clueless… I set up the server following some step by step instructions that I had to modify a bit. That was more than two years ago. The details are a bit hazy now for me.
When I check the instructions I used, the only reference to SQL is the initial command “sudo apt-get install sqlite3”, so I assume that my server uses sqlite. However, when I ceck the directories, I only find two folders related to sql in the seafile-server-latest folder (I hope that is the right one): setup-seafile-mysql.py and setup-seafile-mysql.sh
For SQLite, the database files are also under the ‘haiwen’ directory. The locations are:
ccnet/PeerMgr/usermgr.db: contains user information
ccnet/GroupMgr/groupmgr.db: contains group information
seafile-data/seafile.db: contains library metadata
seahub.db: contains tables used by the web front end (seahub)
Since everything is right, it seems SQLite doesn’t support your version anymore. You have to upgrade, please remind that you have to do every minor step. I would just upgrade 6.2.5, 6.3 isn’t stable.
Weird. At some time before this was happening I had tried seafile 2.6 on a pi, just because I was curious how looked at this time. I worked for me, but maybe just libaries v1 didn’t have complicated database entries, which aren’t recommend now.