Bug #1960

500 Internal server error

Added by Vangelis Koukis about 12 years ago. Updated about 11 years ago.

Status:Closed Start date:01/30/2012
Priority:Medium Due date:
Assignee:Antony Chazapis % Done:

0%

Category:Pithos Spent time: -
Target version:-

Description

Trying to list objects on pithos:

It's probably a misconfiguration somewhere, but the server shouldn't HTTP 500.


$ pithos-sh list -v --host 62.217.120.67:8100 --user vkoukis@grnet.gr --token 0100

500 INTERNAL SERVER ERROR
Content-length: 2077
Content-language: en-us
Vary: Accept-Language, Cookie
Server: WSGIServer/0.1 Python/2.6.6
Date: Mon, 30 Jan 2012 14:26:12 GMT
Content-type: text/html; charset=utf-8

500 Unexpected error

Traceback (most recent call last):
  File "/home/vkoukis/git/pithos/snf-pithos-app/pithos/api/util.py", line 884, in wrapper
    response = func(request, *args, **kwargs)
  File "/home/vkoukis/git/pithos/snf-pithos-app/pithos/api/functions.py", line 266, in container_list
    marker, limit, shared, until)
  File "/home/vkoukis/git/pithos/snf-pithos-backend/pithos/backends/modular.py", line 72, in fn
    ret = func(self, *args, **kw)
  File "/home/vkoukis/git/pithos/snf-pithos-backend/pithos/backends/modular.py", line 273, in list_containers
    return [x[0] for x in self._list_objects(node, account, '', '/', marker, limit, False, None, [], until)]
  File "/home/vkoukis/git/pithos/snf-pithos-backend/pithos/backends/modular.py", line 839, in _list_objects
    objects, prefixes = self.node.latest_version_list(parent, prefix, delimiter, start, limit, before, CLUSTER_DELETED, allowed, domain, filterq, sizeq)
  File "/home/vkoukis/git/pithos/snf-pithos-backend/pithos/backends/lib/sqlalchemy/node.py", line 880, in latest_version_list
    rp = self.conn.execute(s, start=start)
  File "/home/vkoukis/venv/lib/python2.6/site-packages/SQLAlchemy-0.7.5-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1405, in execute
    params)
  File "/home/vkoukis/venv/lib/python2.6/site-packages/SQLAlchemy-0.7.5-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/vkoukis/venv/lib/python2.6/site-packages/SQLAlchemy-0.7.5-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1639, in _execute_context
    context)
  File "/home/vkoukis/venv/lib/python2.6/site-packages/SQLAlchemy-0.7.5-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 330, in do_execute
    cursor.execute(statement, parameters)
  File "/home/vkoukis/venv/lib/python2.6/encodings/iso8859_7.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\uffff' in position 17: character maps to <undefined>

History

#1 Updated by Vangelis Koukis about 12 years ago

Relevant configuration items:

BACKEND_DB_MODULE = 'pithos.backends.lib.sqlalchemy'
BACKEND_DB_CONNECTION = 'postgresql://synnefo:password@host:5400/pithosbackend'
BACKEND_BLOCK_MODULE = 'pithos.backends.lib.hashfiler'
BACKEND_BLOCK_PATH = '/srv/okeanos/pithos/data'

# Pithos authentication

<valid AUTHENTICATION_USERS here>

#2 Updated by Vangelis Koukis about 12 years ago

Also tried with SQLAlchemy==0.6.3.
Could it be an issue with the way the DB was created in PostgreSQL?

#3 Updated by Vangelis Koukis about 12 years ago

  • Status changed from Assigned to Closed

Vangelis Koukis wrote:

Could it be an issue with the way the DB was created in PostgreSQL?

I hadn't included the UTF8-specific options when creating the DB,
I should have used the charset-specific options:

CREATE DATABASE pithosbackend WITH ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' TEMPLATE=template0;

per the installation guide.

#4 Updated by Vangelis Koukis about 11 years ago

  • Project changed from Pithos to Synnefo

#5 Updated by Vangelis Koukis about 11 years ago

  • Category set to Pithos

Also available in: Atom PDF