haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.25k stars 1.54k forks source link

AttributeError: 'NoneType' object has no attribute 'endswith' #1784

Closed ghost closed 7 years ago

ghost commented 7 years ago

After installing Seafile on my Linux CentOS-72-64-minimal I was not able to start Seafile.

Seafile itself seems starting and running fine, but Seahub does troubles. When starting Seahub I'm getting the message

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ... 

Seahub is started

Done.

But nothing else happened

netstat -npl | grep 8000

shows that Port 8000 is used

But my browser loads to infinity and curl does not show a single message.

seahub.log is empty

seahub_django_request.log

2016-10-19 21:48:50,552 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /accounts/login/
Traceback (most recent call last):
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/home/seafile/seafile-server-6.0.5/seahub/seahub/auth/views.py", line 246, in login
    }, context_instance=RequestContext(request))
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/shortcuts.py", line 45, in render_to_response
    using=using)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/loader.py", line 115, in render_to_string
    template_name, context, context_instance, dirs, dictionary)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/engine.py", line 221, in render_to_string
    return t.render(context_instance)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/base.py", line 209, in render
    with context.bind_template(self):
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/context.py", line 241, in bind_template
    updates.update(processor(self.request))
  File "/home/seafile/seafile-server-6.0.5/seahub/seahub/base/context_processors.py", line 56, in base
    if not file_server_root.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
2016-10-19 21:48:50,650 [WARNING] django.request:170 get_response Not Found: /favicon.ico
2016-10-19 21:48:50,652 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /favicon.ico
Traceback (most recent call last):
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py", line 87, in get_exception_response
    response = callback(request, **param_dict)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/views/defaults.py", line 22, in page_not_found
    body = template.render(context, request)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/backends/django.py", line 74, in render
    return self.template.render(context)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/base.py", line 209, in render
    with context.bind_template(self):
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/context.py", line 241, in bind_template
    updates.update(processor(self.request))
  File "/home/seafile/seafile-server-6.0.5/seahub/seahub/base/context_processors.py", line 56, in base
    if not file_server_root.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
2016-10-19 21:48:51,860 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /accounts/login/
Traceback (most recent call last):
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/home/seafile/seafile-server-6.0.5/seahub/seahub/auth/views.py", line 246, in login
    }, context_instance=RequestContext(request))
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/shortcuts.py", line 45, in render_to_response
    using=using)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/loader.py", line 115, in render_to_string
    template_name, context, context_instance, dirs, dictionary)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/engine.py", line 221, in render_to_string
    return t.render(context_instance)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/base.py", line 209, in render
    with context.bind_template(self):
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/context.py", line 241, in bind_template
    updates.update(processor(self.request))
  File "/home/seafile/seafile-server-6.0.5/seahub/seahub/base/context_processors.py", line 56, in base
    if not file_server_root.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
2016-10-19 21:48:52,180 [WARNING] django.request:170 get_response Not Found: /favicon.ico
2016-10-19 21:48:52,185 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /favicon.ico
Traceback (most recent call last):
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py", line 87, in get_exception_response
    response = callback(request, **param_dict)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/views/defaults.py", line 22, in page_not_found
    body = template.render(context, request)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/backends/django.py", line 74, in render
    return self.template.render(context)
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/base.py", line 209, in render
    with context.bind_template(self):
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/seafile/seafile-server-6.0.5/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/context.py", line 241, in bind_template
    updates.update(processor(self.request))
  File "/home/seafile/seafile-server-6.0.5/seahub/seahub/base/context_processors.py", line 56, in base
    if not file_server_root.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

seafile.log just saying, that the mq client is started.

ccnet.log

[10/19/16 15:37:59] ../common/session.c(132): using config file /home/seafile/conf/ccnet.conf
[10/19/16 15:37:59] ../common/session.c(455): socket file exists, delete it anyway 
[10/19/16 15:37:59] ../common/session.c(484): Listen on /home/seafile/ccnet/ccnet.sock for local clients
[10/19/16 15:37:59] ../common/session.c(290): Update pubinfo file 
[10/19/16 15:38:10] ../common/peer.c(943): Local peer down

controller.log

[10/19/16 15:33:44] seafile-controller.c(154): starting ccnet-server ...
[10/19/16 15:33:44] seafile-controller.c(73): spawn_process: ccnet-server -F /home/seafile/conf -c /home/seafile/ccnet -f /home/seafile/logs/ccnet.log -d -P /home/seafile/pids/ccnet.pid
[10/19/16 15:33:44] seafile-controller.c(88): spawned ccnet-server, pid 1353
[10/19/16 15:33:46] seafile-controller.c(555): ccnet daemon connected.
[10/19/16 15:33:46] seafile-controller.c(186): starting seaf-server ...
[10/19/16 15:33:46] seafile-controller.c(73): spawn_process: seaf-server -F /home/seafile/conf -c /home/seafile/ccnet -d /home/seafile/seafile-data -l /home/seafile/logs/seafile.log -P /home/seafile/pids/seaf-server.pid
[10/19/16 15:33:46] seafile-controller.c(88): spawned seaf-server, pid 1357
[10/19/16 15:33:46] seafile-controller.c(528): seafdav not enabled.
[10/19/16 15:36:14] seafile-controller.c(566): shutting down ccnet-server ...
[10/19/16 15:37:59] seafile-controller.c(154): starting ccnet-server ...
[10/19/16 15:37:59] seafile-controller.c(73): spawn_process: ccnet-server -F /home/seafile/conf -c /home/seafile/ccnet -f /home/seafile/logs/ccnet.log -d -P /home/seafile/pids/ccnet.pid
[10/19/16 15:37:59] seafile-controller.c(88): spawned ccnet-server, pid 1633
[10/19/16 15:38:00] seafile-controller.c(555): ccnet daemon connected.
[10/19/16 15:38:00] seafile-controller.c(186): starting seaf-server ...
[10/19/16 15:38:00] seafile-controller.c(73): spawn_process: seaf-server -F /home/seafile/conf -c /home/seafile/ccnet -d /home/seafile/seafile-data -l /home/seafile/logs/seafile.log -P /home/seafile/pids/seaf-server.pid
[10/19/16 15:38:00] seafile-controller.c(88): spawned seaf-server, pid 1637
[10/19/16 15:38:00] seafile-controller.c(528): seafdav not enabled.
[10/19/16 15:33:44] seafile-controller.c(154): starting ccnet-server ...
[10/19/16 15:33:44] seafile-controller.c(73): spawn_process: ccnet-server -F /home/seafile/conf -c /home/seafile/ccnet -f /home/seafile/logs/ccnet.log -d -P /home/seafile/pids/ccnet.pid
[10/19/16 15:33:44] seafile-controller.c(88): spawned ccnet-server, pid 1353
[10/19/16 15:33:46] seafile-controller.c(555): ccnet daemon connected.
[10/19/16 15:33:46] seafile-controller.c(186): starting seaf-server ...
[10/19/16 15:33:46] seafile-controller.c(73): spawn_process: seaf-server -F /home/seafile/conf -c /home/seafile/ccnet -d /home/seafile/seafile-data -l /home/seafile/logs/seafile.log -P /home/seafile/pids/seaf-server.pid
[10/19/16 15:33:46] seafile-controller.c(88): spawned seaf-server, pid 1357
[10/19/16 15:33:46] seafile-controller.c(528): seafdav not enabled.
[10/19/16 15:36:14] seafile-controller.c(566): shutting down ccnet-server ...
[10/19/16 15:37:59] seafile-controller.c(154): starting ccnet-server ...
[10/19/16 15:37:59] seafile-controller.c(73): spawn_process: ccnet-server -F /home/seafile/conf -c /home/seafile/ccnet -f /home/seafile/logs/ccnet.log -d -P /home/seafile/pids/ccnet.pid
[10/19/16 15:37:59] seafile-controller.c(88): spawned ccnet-server, pid 1633
[10/19/16 15:38:00] seafile-controller.c(555): ccnet daemon connected.
[10/19/16 15:38:00] seafile-controller.c(186): starting seaf-server ...
[10/19/16 15:38:00] seafile-controller.c(73): spawn_process: seaf-server -F /home/seafile/conf -c /home/seafile/ccnet -d /home/seafile/seafile-data -l /home/seafile/logs/seafile.log -P /home/seafile/pids/seaf-server.pid
[10/19/16 15:38:00] seafile-controller.c(88): spawned seaf-server, pid 1637
[10/19/16 15:38:00] seafile-controller.c(528): seafdav not enabled.
DL6ER commented 7 years ago

Check your seahub_settingy.py file. Do you have FILE_SERVER_ROOT = 'https://xxx.de/seafhttp set?