Upgraded with wrong architecture (debian; 32bit community edition); fixed it; now I can't upgrade to 6.1.1

Hi there,

I’ve been using Seafile for quite a while now and never ran into problems I couldn’t fix through a proper google search. Until now :slight_smile:

I wasn’t paying attention and used a 64bit install to upgrade a 32bit installation. (5.x.x 32bit to 6.0 64bit)
The install failed (I can’t remember the error message).

I then tried to revert the process by running different upgrade scripts and managed to have a running system with version 6.0.7

However, I’d now like to run the latest version (6.1.1). Yet when I try to run the upgrade script (6.0 to 6.1) I receive an error message:

Updating seafile/seahub database …
[INFO] You are using MySQL
[INFO] updating seahub database…
[ERROR] Failed to execute sql: Duplicate column name ‘permission’
Failed to upgrade your database

To get things running, I tried to upgrade the symbolic links only by using the minor upgrade script - which ran without errors yet gives me a “502 Bad Gateway” error when I try to access the webinterface.

Could anyone give me a few pointers on how to fix this? I’d really appreciate it.

Logs:
seahub.log contains the following error message:

File “/usr/lib/python2.7/dist-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1205, ‘Lock wait timeout exceeded; try restarting transaction’)

seafile.init.log contains no errors (“Starting seafile server, please wait … Seafile server started”).
seahub.init.log contains no errors or fishy messages.

Basic System Information:

32 bit Debian (2.6.32)
Seafile + nginx + mariaDB
First install was with the Jackson install script

PS: Someone in the chinese forum seems to have the same problem, yet he has no answeres:

That should not be an issue, just run the minor upgrad script if you run the upgrade script in the 32bit version and the symlinks will be replaced. I don’t think that there is much different in the DB.

Thanks for the reply.
I already gave this one a try however the result is an “Unhandled Exception” when loading the webinterface.

Please have a look at seahub_django_request.log in the logs folder.

You can post relevant stuff here or upload it at https://home.hoeper.me/u/d/2e3495c20c/ and I can have a look.

1 Like

Hi,

Latest entries in seahub_django_request.log:

2017-05-21 08:39:34,859 [WARNING] django.request:170 get_response Not Found: /admin/images/tango.png
2017-05-22 12:43:30,338 [WARNING] django.request:170 get_response Not Found: /admin/config.php
2017-05-25 13:09:34,060 [WARNING] django.request:170 get_response Not Found: /favicon.ico

To get rid of old logs I created a new logs folder, did a init.d/seafile restart and connected once to the webinterface. I uploaded the content of logs/ using the link you provided.

EDIT:
Log files on nopaste: https://nopaste.me/view/5dc94ad3

Similar happens with the update from 6.0.8 on raspian and sqlite3
I accidently did a minor upgrade first. Switched back to the 6.0.8 version with the minor_upgrade.sh script and run the upgrade_6.0_to_6.1.sh script which ran into the:

Duplicate column name ‘permission’
Failed to upgrade your database

I can start ./seahub.sh and ./seafile.sh but weither the webfront works nor the client. When logging in it says “Internal Server Error”

Was able to switch back to 6.0.8 and got that running. But I cannot in either way upgrade to 6.1.1.

The upgrade scripts are very basic. The Seafile team needs to put in some more functions to allow upgrading even though there are errors or the script should try to solve basic error directly and not just stop working.

This means you’ve run the major upgrade script before.

From my point of view this is ok.

People need to actually think about what they do.

Yes also :smiley:

The logs are acutally almost empty. Nothing interesting there from my point of view.

I recommend the following:

  • Make sure you now have the binaries for the correct architecture
  • Make sure the seafile-server-latest symlink points to the most recent version (see ls -l seafile-server-latest), run the minor upgrade script of the most recent version otherwise.
  • Make sure seafile and seahub are stopped and there are no remaining processes.
  • Start both and visit seahub. If there is an error it should be logged in seahub_django_request.log

Thanks for the replies!

I have: Linux 2.6.32-042stab120.6 #1 SMP Thu Oct 27 16:59:03 MSK 2016 i686 GNU/Linux
and I got: seafile-server_6.1.1_i386.tar.gz

lrwxrwxrwx 1 seafile nogroup 20 Jun 25 23:06 seafile-server-latest → seafile-server-6.1.1

/opt/seafile $ ps -A | grep sea
/opt/seafile $
and
/opt/seafile $ ps -U seafile
PID TTY TIME CMD
/opt/seafile $

started through /etc/init.d/seafile-server start

/opt/seafile $ ps -A | grep sea
 4196 ?        00:00:00 seafile-control
 4201 ?        00:00:00 seaf-server

and

/opt/seafile/logs $ ps -U seafile
  PID TTY          TIME CMD
 4196 ?        00:00:00 seafile-control
 4198 ?        00:00:00 ccnet-server
 4200 ?        00:00:00 python2.7
 4201 ?        00:00:00 seaf-server
 4289 ?        00:00:00 python2.7
 4290 ?        00:00:00 python2.7
 4291 ?        00:00:00 python2.7
 4292 ?        00:00:00 python2.7
 4293 ?        00:00:00 python2.7
 4294 ?        00:00:00 python2.7
/opt/seafile/logs $

When I visit seahub I get:

"Unhandled Exception
An unhandled exception was thrown by the application."

and seahub_django_request.log remains empty:

/opt/seafile/logs $ cat seahub_django_request.log 
/opt/seafile/logs $

seahub_django_request.log belongs to user seafile:

/opt/seafile/logs $ ls -l seahub_django_request.log 
-rw-r--r-- 1 seafile nogroup 0 Jun 26 09:06 seahub_django_request.log

Is there a seahub_django_request.log in /tmp or is there any additional information in the nginx error log?

Damn, I somehow managed to forget about /var/log …
There’s a /var/log/nginx folder with a large amount of seahub.error.logs

Here are the latest lines of seahub.error.log:

2017/06/26 12:46:22 [error] 2141#0: *163848 connect() failed (111: Connection refused) while connecting to upstream, client: client_IP_removed, server: , request: "GET /api2/ping/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "hostname_removed"
2017/06/26 12:46:22 [error] 2141#0: *163849 connect() failed (111: Connection refused) while connecting to upstream, client: client_IP_removed, server: , request: "GET /api2/account/info/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "hostname_removed"
2017/06/26 12:46:23 [error] 2141#0: *163848 connect() failed (111: Connection refused) while connecting to upstream, client: client_IP_removed, server: , request: "GET /api2/ping/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "hostname_removed"
2017/06/26 12:46:53 [error] 2141#0: *163856 connect() failed (111: Connection refused) while connecting to upstream, client: client_IP_removed, server: , request: "GET /api2/ping/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "hostname_removed"
2017/06/26 14:09:32 [error] 2112#0: *1 FastCGI sent in stderr: "" while reading response header from upstream, client: client_IP_removed, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "hostname_removed"
2017/06/26 14:09:32 [error] 2112#0: *1 FastCGI sent in stderr: "Traceback (most recent call last):
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 558, in run
    protocolStatus, appStatus = self.server.handler(self)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 1118, in handler
    result = self.application(environ, start_response)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/wsgi.py", line 170, in __call__
    self.load_middleware()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/base.py", line 52, in load_middleware
    mw_instance = mw_class()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 401, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 395, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/utils/rooturl.py", line 41, in <module>
    (r'^%s' % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/conf/urls/__init__.py", line 33, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/urls.py", line 8, in <module>
2017/06/26 14:09:45 [error] 2112#0: *6 FastCGI sent in stderr: "Traceback (most recent call last):
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 558, in run
    protocolStatus, appStatus = self.server.handler(self)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 1118, in handler
    result = self.application(environ, start_response)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/wsgi.py", line 170, in __call__
    self.load_middleware()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/base.py", line 52, in load_middleware
    mw_instance = mw_class()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 401, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 395, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/utils/rooturl.py", line 41, in <module>
    (r'^%s' % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/conf/urls/__init__.py", line 33, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/urls.py", line 8, in <module>
2017/06/26 14:09:45 [error] 2112#0: *6 FastCGI sent in stderr: "Traceback (most recent call last):
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 558, in run
    protocolStatus, appStatus = self.server.handler(self)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 1118, in handler
    result = self.application(environ, start_response)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/wsgi.py", line 170, in __call__
    self.load_middleware()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/base.py", line 52, in load_middleware
    mw_instance = mw_class()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 401, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 395, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/utils/rooturl.py", line 41, in <module>
    (r'^%s' % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/conf/urls/__init__.py", line 33, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/urls.py", line 8, in <module>
2017/06/26 14:09:45 [error] 2112#0: *6 FastCGI sent in stderr: "" while reading response header from upstream, client: client_IP_removed, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "server_IP_removed"
2017/06/26 14:09:45 [error] 2112#0: *6 FastCGI sent in stderr: "Traceback (most recent call last):
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 558, in run
    protocolStatus, appStatus = self.server.handler(self)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 1118, in handler
    result = self.application(environ, start_response)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/wsgi.py", line 170, in __call__
    self.load_middleware()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/base.py", line 52, in load_middleware
    mw_instance = mw_class()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 401, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 395, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/utils/rooturl.py", line 41, in <module>
    (r'^%s' % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/conf/urls/__init__.py", line 33, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/urls.py", line 8, in <module>
2017/06/26 14:19:57 [error] 2112#0: *11 FastCGI sent in stderr: "" while reading response header from upstream, client: client_IP_removed, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "hostname_removed"
2017/06/26 14:19:57 [error] 2112#0: *11 FastCGI sent in stderr: "Traceback (most recent call last):
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 558, in run
    protocolStatus, appStatus = self.server.handler(self)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 1118, in handler
    result = self.application(environ, start_response)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/wsgi.py", line 170, in __call__
    self.load_middleware()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/base.py", line 52, in load_middleware
    mw_instance = mw_class()
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 401, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/urlresolvers.py", line 395, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/utils/rooturl.py", line 41, in <module>
    (r'^%s' % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
  File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/conf/urls/__init__.py", line 33, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.1.1/seahub/seahub/urls.py", line 8, in <module
2017/06/26 14:36:52 [error] 2112#0: *13 connect() failed (111: Connection refused) while connecting to upstream, client: client_IP_removed, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "hostname_removed"

Which python version is installed? I see it’s 2.7, but which minor version? It was reported that there are issues with 2.7.9 and that it works with 2.7.12.

I’m running Python 2.7.3 (current debian wheezy package)

Do you happen to know if the Python 2.7.9 issues are with seafile 6.1.1 only? Because seafile 6.0.7 works flawlessly.

Probably Seafile 6.0.9 is the border between working and beyond this release, not working.

Does this help (german)? BananaPI auf Seafile 6.1.1 aktualisieren

Basically he installs pip which requires python-requests on his system with the following command:

sudo apt-get install python-pip python-requests
2 Likes

@jobenvil it looks like this is the solution for all upgrade issues. To me it looks like python-requests is what people need. Maybe you can add it to your announcement either as a requirement or as a troubleshooting notice.

You did it mate!
Vielen Dank :slight_smile:

Installing python-pip and python-requests solved the problem.
EDIT: You don’t need python-pip. Python-requests should already solve the problem. I will remove python-pip from the short guide below.

In case anybody comes across this thread and has the same problem:

If you are upgrading to seafile 6.1.1 on Debian and receive an “Unhandled Exception” when opening the webinterface / seahub, try to install python-requests

run
apt-get install python-requests
to install and restart seafile and seahub.

1 Like

@Ente I think very likely only python-requests is needed. Could you try that out by stopping Seafile, removing python-pip (apt-get remove python-pip), starting Seafile again and see if it still works?