Hiccup page after upgrading the server from 1.8.5 to 3.1.7

171 views
Skip to first unread message

CentOS 6

unread,
Oct 21, 2014, 11:04:16 AM10/21/14
to sea...@googlegroups.com

Hi, 

I've just upgraded my Seafile server from 1.8.5 to 3.1.7. 

At first glance, seafile and seahub seemed to start normally, without printing any kind of errors.

When I refresh seafile homepage, I can see the login page has been updated to the 3.1.7 version. 

But, every time I try to login I end up on this error page :

"Sorry, but the requested page is unavailable due to a server hiccup.

Our engineers have been notified, so check back later."

I followed the procedure described in the manual step by step. 

The seafile server running with Apache and MySQL on a Centos 6.5 box 

When I used the first upgrade script "upgrade_1.8_2.0.sh" to migrate from 1.8.5 to a 2.0 version, I first got the following errors :

fix seafile database case issues...
sqlite3 /home/captain/seafile/ccnet/PeerMgr/usermgr.db .dump > /tmp/user-db.sql
Error: unable to open database "/home/captain/seafile/ccnet/PeerMgr/usermgr.db": unable to open database file
sqlite3 /home/captain/seafile/ccnet/GroupMgr/groupmgr.db .dump  > /tmp/group-db.sql
Error: unable to open database "/home/captain/seafile/ccnet/GroupMgr/groupmgr.db": unable to open database file
mv: impossible d'évaluer « /home/captain/seafile/ccnet/PeerMgr/usermgr.db »: Aucun fichier ou dossier de ce type
mv: impossible d'évaluer « /home/captain/seafile/ccnet/GroupMgr/groupmgr.db »: Aucun fichier ou dossier de ce type
sqlite3 /home/captain/seafile/seafile-data/seafile.db .dump  > /tmp/seafile-db.sql
sqlite3 /home/captain/seafile/seahub.db .Dump | tr -d '\n' | sed 's/;/;\n/g' > /tmp/seahub-db.sql

As I said, I'm using MySQL and not sqlite...

A this point, things didn't seem to go well ... I thought that maybe the upgrade script was only designed for a sqlite install. Or that my version (1.8.5) was not compatible with this script (designed for 1.8.2 version).

But still... I executed the 4 others upgrade scripts untile I reached the 3.1.7 version. I didn't get any errors from these scrpits.

Here is the debug about when I try to login :

DatabaseError at /accounts/login/

(1146, "Table 'seahub-db.base_userlastlogin' doesn't exist")
Request Method:POST
Request URL:blah blah blah
Django Version:1.5.1
Exception Type:DatabaseError
Exception Value:
(1146, "Table 'seahub-db.base_userlastlogin' doesn't exist")
Exception Location:/usr/lib64/python2.6/site-packages/MySQLdb/connections.py in defaulterrorhandler, line 36
Python Executable:/usr/bin/python2.6
Python Version:2.6.6
Python Path:
['/home/captain/seafile/seafile-server-3.1.7/seahub',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Djblets-0.6.14.dev-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/flup-1.0-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/chardet-2.1.1-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/gunicorn-0.16.1-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/python_daemon-1.5.5-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/lockfile-0.9.1-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/six-1.4.1-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/python_dateutil-1.5-py2.6.egg',
 '/home/captain/seafile/seafile-server-3.1.7/seafile/lib/python2.7/site-packages',
 '/home/captain/seafile/seafile-server-3.1.7/seafile/lib64/python2.7/site-packages',
 '/home/captain/seafile/seafile-server-3.1.7/seafile/lib/python2.6/site-packages',
 '/home/captain/seafile/seafile-server-3.1.7/seafile/lib64/python2.6/site-packages',
 '/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart',
 '/home/captain/seafile/seafile-server-3.1.7',
 '/usr/lib64/python26.zip',
 '/usr/lib64/python2.6',
 '/usr/lib64/python2.6/plat-linux2',
 '/usr/lib64/python2.6/lib-tk',
 '/usr/lib64/python2.6/lib-old',
 '/usr/lib64/python2.6/lib-dynload',
 '/usr/lib64/python2.6/site-packages',
 '/usr/lib64/python2.6/site-packages/PIL',
 '/usr/lib/python2.6/site-packages',
 '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
 '/home/captain/seafile/seafile-server-3.1.7/seafile/lib/python2.7/site-packages',
 '/home/captain/seafile/seafile-server-3.1.7/seafile/lib64/python2.7/site-packages',
 '/home/captain/seafile/seafile-server-3.1.7/seafile/lib/python2.6/site-packages']
Server time:Mar, 21 Oct 2014 21:48:38 +0800

Environment:


Request Method: POST
Request URL: blah blah blah

Django Version: 1.5.1
Python Version: 2.6.6
Installed Applications:
['django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'registration',
 'captcha',
 'seahub.api2',
 'seahub.avatar',
 'seahub.base',
 'seahub.contacts',
 'seahub.wiki',
 'seahub.group',
 'seahub.message',
 'seahub.notifications',
 'seahub.options',
 'seahub.profile',
 'seahub.share',
 'seahub.help',
 'gunicorn']
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'seahub.auth.middleware.AuthenticationMiddleware',
 'seahub.base.middleware.BaseMiddleware',
 'seahub.base.middleware.InfobarMiddleware')


Traceback:
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/core/handlers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/utils/decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/views/decorators/cache.py" in _wrapped_view_func
  89.         response = view_func(request, *args, **kwargs)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/seahub/auth/views.py" in login
  151.                 return log_user_in(request, form.get_user(), redirect_to)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/seahub/auth/views.py" in log_user_in
  49.     auth_login(request, user)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/seahub/auth/__init__.py" in login
  89.     user_logged_in.send(sender=user.__class__, request=request, user=user)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/dispatch/dispatcher.py" in send
  170.             response = receiver(signal=self, sender=sender, **named)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/seahub/base/models.py" in update_last_login
  525.         user_last_login = UserLastLogin.objects.get(username=user.username)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/models/manager.py" in get
  143.         return self.get_query_set().get(*args, **kwargs)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/models/query.py" in get
  382.         num = len(clone)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/models/query.py" in __len__
  90.                 self._result_cache = list(self.iterator())
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/models/query.py" in iterator
  301.         for row in compiler.results_iter():
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/models/sql/compiler.py" in results_iter
  775.         for rows in self.execute_sql(MULTI):
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/models/sql/compiler.py" in execute_sql
  840.         cursor.execute(sql, params)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/backends/util.py" in execute
  41.             return self.cursor.execute(sql, params)
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/backends/mysql/base.py" in execute
  130.             six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
File "/home/captain/seafile/seafile-server-3.1.7/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/db/backends/mysql/base.py" in execute
  120.             return self.cursor.execute(query, args)
File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py" in execute
  173.             self.errorhandler(self, exc, value)
File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py" in defaulterrorhandler
  36.     raise errorclass, errorvalue

Exception Type: DatabaseError at /accounts/login/
Exception Value: (1146, "Table 'seahub-db.base_userlastlogin' doesn't exist")

CentOS 6

unread,
Oct 21, 2014, 11:07:50 AM10/21/14
to sea...@googlegroups.com
Sorry for editing errors, I'm not used to Google Group and I can't find the Edit button !!!

Shuai Lin

unread,
Oct 21, 2014, 11:35:25 AM10/21/14
to sea...@googlegroups.com
This is because the upgrade script is added after seafile server 2.0. To solve your problem, just manually import the sqls of 1.8 -> 2.0 upgrade, e.g.

Assume your mysql username is root, password is PASSWORD, and the name of seahub database is seahub-db:

cat seafile-server-3.0.3/upgrade/sql/2.0.0/mysql/seahub.sql | mysql -uroot -pPASSWORD seahub-meta

On Tue, Oct 21, 2014 at 11:07 PM, CentOS 6 <correo...@gmail.com> wrote:
Sorry for editing errors, I'm not used to Google Group and I can't find the Edit button !!!

--
You received this message because you are subscribed to the Google Groups "seafile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seafile+u...@googlegroups.com.
To post to this group, send email to sea...@googlegroups.com.
Visit this group at http://groups.google.com/group/seafile.
For more options, visit https://groups.google.com/d/optout.

Shuai Lin

unread,
Oct 21, 2014, 11:36:06 AM10/21/14
to sea...@googlegroups.com
Sorry, it should be

cat seafile-server-3.1.7/upgrade/sql/2.0.0/mysql/seahub.sql | mysql -uroot -pPASSWORD seahub-meta

Message has been deleted
Message has been deleted
Message has been deleted

CentOS 6

unread,
Feb 24, 2015, 11:57:58 AM2/24/15
to sea...@googlegroups.com

Thanks for your help. Sorry I'm a bit late to answer, I had to postpone the upgrade :) I also removed the old edits

The upgrade from 1.8 to 3.1 seems to work, but I've got one doubt :

Should I use the first script upgrade_1.8_2.0.sh at the beginning before updating manually the seahub-db or it's broken ?

This is the procedure I followed :

sh upgrade_1.8_2.0.sh  (errors, but that was expected)
cat seafile-server-3.1.7/upgrade/sql/2.0.0/mysql/seahub.sql | mysql -u root -p seahub-db

Thx
Reply all
Reply to author
Forward
0 new messages