AttributeError: 'ChannelPromise' object has no attribute '__value__' when running importer/load_dump

3,201 views
Skip to first unread message

riffd...@gmail.com

unread,
Nov 11, 2015, 7:53:17 PM11/11/15
to taigaio
Hey,

I've installed Taiga using the production setup on a digitalocean ubuntu 14.04 VM. Everything seems to be running smoothly except when I try to import a project (and probably a whole host of other pieces of functionality, judging by the error location) I get this error:

ERROR:2015-11-12 00:47:02,294: Internal Server Error: /api/v1/importer/load_dump
Traceback (most recent call last):
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/utils/__init__.py", line 420, in __call__
   
return self.__value__
AttributeError: 'ChannelPromise' object has no attribute '__value__'


I am using the stable branch of taiga-back. It may or may not be worth noting that I had no "mkvirtualenv" or "workon" commands throughout the install process, instead I used "virtualenv" to create the virtualenv and then "source taiga/bin/activate" to start working in it. Also, I did install on top of a botched previous attempt at executing the development instructions, but I did completely drop and recreate the postgres cluster so there shouldn't be anything overflowing as far as I know.


A full dump of the request repr() and associated stack trace (logged from running python manage.py runserver)

Request repr():
<WSGIRequest
path
:/api/v1/importer/load_dump,
GET
:<QueryDict: {}>,
POST
:<QueryDict: {}>,
COOKIES
:{'__cfduid': 'd0fab74d236eec1dd6f1105f521d51a0a1441372806'},
META
:{'CONTENT_LENGTH': '2772358',
 
'CONTENT_TYPE': 'multipart/form-data; '
                 
'boundary=----WebKitFormBoundarySxTjnOUf8YqJ8R18',
 
'DJANGO_SETTINGS_MODULE': 'settings',
 
'GATEWAY_INTERFACE': 'CGI/1.1',
 
'HOME': '/home/taiga',
 
'HTTP_ACCEPT': 'application/json',
 
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
 
'HTTP_AUTHORIZATION': 'Bearer '
                       
'eyJ1c2VyX2F1dGhlbnRpY2F0aW9uX2lkIjoxMH0:1Zwfon:fLhDdUE3PAqJsoe2gFK8OFPGcKg',
 
'HTTP_CONNECTION': 'close',
 
'HTTP_COOKIE': '__cfduid=d0fab74d236eec1dd6f1105f521d51a0a1441372806',
 
'HTTP_HOST': 'taiga.riff.us',
 
'HTTP_ORIGIN': 'http://taiga.riff.us',
 
'HTTP_REFERER': 'http://taiga.riff.us/projects/',
 
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) '
                   
'AppleWebKit/537.36 (KHTML, like Gecko) '
                   
'Chrome/46.0.2490.80 Safari/537.36',
 
'HTTP_X_FORWARDED_FOR': '73.171.123.172',
 
'HTTP_X_FORWARDED_PROTO': 'http',
 
'HTTP_X_REAL_IP': '73.171.123.172',
 
'HTTP_X_SCHEME': 'http',
 
'LANG': 'en_US.UTF-8',
 
'LC_CTYPE': 'en_US.UTF-8',
 
'LESSCLOSE': '/usr/bin/lesspipe %s %s',
 
'LESSOPEN': '| /usr/bin/lesspipe %s',
 
'LOGNAME': 'taiga',
 
'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:',
 
'MAIL': '/var/mail/taiga',
 
'OLDPWD': '/home/taiga/taiga-events',
 
'PATH': '/home/taiga/taiga-back/taiga/bin:/home/taiga/.gem/ruby/1.9.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games',
 
'PATH_INFO': '/api/v1/importer/load_dump',
 
'PS1': '(taiga)${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\$ ',
 
'PWD': '/home/taiga/taiga-back',
 
'QUERY_STRING': '',
 
'REMOTE_ADDR': '127.0.0.1',
 
'REMOTE_HOST': '',
 
'REQUEST_METHOD': 'POST',
 
'RUN_MAIN': 'true',
 
'SCRIPT_NAME': '',
 
'SERVER_NAME': 'localhost',
 
'SERVER_PORT': '8000',
 
'SERVER_PROTOCOL': 'HTTP/1.0',
 
'SERVER_SOFTWARE': 'WSGIServer/0.2',
 
'SHELL': '/bin/bash',
 
'SHLVL': '2',
 
'SSH_CLIENT': '73.171.123.172 55573 22',
 
'SSH_CONNECTION': '73.171.123.172 55573 104.131.237.205 22',
 
'SSH_TTY': '/dev/pts/0',
 
'TERM': 'xterm-256color',
 
'TZ': 'UTC',
 
'USER': 'taiga',
 
'VIRTUAL_ENV': '/home/taiga/taiga-back/taiga',
 
'XDG_RUNTIME_DIR': '/run/user/0',
 
'XDG_SESSION_ID': '2',
 
'_': '/home/taiga/taiga-back/taiga/bin/python',
 
'wsgi.errors': <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>,
 
'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 
'wsgi.input': <_io.BufferedReader name=7>,
 
'wsgi.multiprocess': False,
 
'wsgi.multithread': True,
 
'wsgi.run_once': False,
 
'wsgi.url_scheme': 'http',
 
'wsgi.version': (1, 0)}>
-------------------------------------------------------------------------------
ERROR
:2015-11-12 00:47:02,294: Internal Server Error: /api/v1/importer/load_dump
Traceback (most recent call last):
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/utils/__init__.py", line 420, in __call__
   
return self.__value__
AttributeError: 'ChannelPromise' object has no attribute '__value__'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 436, in _ensured
   
return fun(*args, **kwargs)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/messaging.py", line 177, in _publish
    channel
= self.channel
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/messaging.py", line 194, in _get_channel
    channel
= self._channel = channel()
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/utils/__init__.py", line 422, in __call__
    value
= self.__value__ = self.__contract__()
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/messaging.py", line 209, in <lambda>
    channel
= ChannelPromise(lambda: connection.default_channel)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 756, in default_channel
   
self.connection
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 741, in connection
   
self._connection = self._establish_connection()
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 696, in _establish_connection
    conn
= self.transport.establish_connection()
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
    conn
= self.Connection(**opts)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/amqp/connection.py", line 165, in __init__
   
self.transport = self.Transport(host, connect_timeout, ssl)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/amqp/connection.py", line 186, in Transport
   
return create_transport(host, connect_timeout, ssl)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/amqp/transport.py", line 299, in create_transport
   
return TCPTransport(host, connect_timeout)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/amqp/transport.py", line 95, in __init__
   
raise socket.error(last_err)
OSError: [Errno 111] Connection refused


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/django/core/handlers/base.py", line 132, in get_response
    response
= wrapped_callback(request, *callback_args, **callback_kwargs)
 
File "/home/taiga/taiga-back/taiga/base/api/viewsets.py", line 81, in view
   
return self.dispatch(request, *args, **kwargs)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
   
return view_func(*args, **kwargs)
 
File "/home/taiga/taiga-back/taiga/base/api/views.py", line 420, in dispatch
    response
= self.handle_exception(exc)
 
File "/home/taiga/taiga-back/taiga/base/api/views.py", line 417, in dispatch
    response
= handler(request, *args, **kwargs)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/django/utils/decorators.py", line 34, in _wrapper
   
return bound_func(*args, **kwargs)
 
File "/usr/lib/python3.4/contextlib.py", line 30, in inner
   
return func(*args, **kwds)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/django/utils/decorators.py", line 30, in bound_func
   
return func.__get__(self, type(self))(*args2, **kwargs2)
 
File "/home/taiga/taiga-back/taiga/export_import/api.py", line 211, in load_dump
    task
= tasks.load_project_dump.delay(request.user, dump)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/celery/app/task.py", line 453, in delay
   
return self.apply_async(args, kwargs)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/celery/app/task.py", line 555, in apply_async
   
**dict(self._get_exec_options(), **options)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/celery/app/base.py", line 353, in send_task
    reply_to
=reply_to or self.oid, **options
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/celery/app/amqp.py", line 305, in publish_task
   
**kwargs
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/messaging.py", line 172, in publish
    routing_key
, mandatory, immediate, exchange, declare)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 457, in _ensured
    interval_max
)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 369, in ensure_connection
    interval_start
, interval_step, interval_max, callback)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/utils/__init__.py", line 243, in retry_over_time
   
return fun(*args, **kwargs)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 237, in connect
   
return self.connection
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 741, in connection
   
self._connection = self._establish_connection()
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/connection.py", line 696, in _establish_connection
    conn
= self.transport.establish_connection()
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
    conn
= self.Connection(**opts)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/amqp/connection.py", line 165, in __init__
   
self.transport = self.Transport(host, connect_timeout, ssl)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/amqp/connection.py", line 186, in Transport
   
return create_transport(host, connect_timeout, ssl)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/amqp/transport.py", line 299, in create_transport
   
return TCPTransport(host, connect_timeout)
 
File "/home/taiga/taiga-back/taiga/lib/python3.4/site-packages/amqp/transport.py", line 95, in __init__
   
raise socket.error(last_err)
OSError: [Errno 111] Connection refused
[12/Nov/2015 00:47:02] "POST /api/v1/importer/load_dump HTTP/1.0" 500 27



Also, my pip freeze:

Django==1.8.6
Jinja2==2.8
Markdown==2.6.4
MarkupSafe==0.23
Pillow==2.9.0
Pygments==2.0.2
Unidecode==0.04.18
amqp
==1.4.7
anyjson
==0.3.3
billiard
==3.3.0.21
bleach
==1.4.2
celery
==3.1.17
cssselect
==0.9.1
cssutils
==1.0.1
diff
-match-patch==20121119
django
-ipware==1.1.2
django
-jinja==1.4.1
django
-pgjson==0.3.1
django
-pglocks==1.0.2
django
-picklefield==0.3.2
django
-sampledatahelper==0.3
django
-sites==0.8
django
-sr==0.0.4
django
-transaction-hooks==0.2
django
-transactional-cleanup==0.1.15
djmail
==0.11.0
djorm
-pgarray==1.2
easy
-thumbnails==2.2.1
fn
==0.4.3
future
==0.15.2
gunicorn
==19.3.0
html5lib
==0.9999999
kombu
==3.0.29
lxml
==3.5.0b1
premailer
==2.9.6
psycopg2
==2.6.1
pycrypto
==2.6.1
pyjwkest
==1.0.7
pytz
==2015.7
raven
==5.8.1
redis
==2.10.3
requests
==2.8.1
sampledata
==0.3.7
six
==1.10.0

Alejandro Alonso

unread,
Nov 12, 2015, 12:20:32 AM11/12/15
to riffd...@gmail.com, taigaio
It sounds like your instance can't connect correctly to celery, did you configure Taiga to use async tasks? (https://taigaio.github.io/taiga-doc/dist/setup-production.html#_async_tasks_optional), if that's the point probably your BROKER_URL or CELERY_RESULT_BACKEND aren't set correctly, could you show us your local.py?

Regards,

--
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/taigaio/98336fd2-965e-4582-99d5-a1d0bcc9fff7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

  
Alejandro Alonso Fernández  
CIO & Co-founder

www.kaleidos.net/FC8EAC/

Dennis Lysenko

unread,
Nov 12, 2015, 12:09:41 PM11/12/15
to Alejandro Alonso, taigaio
Alejandro, thanks for the quick response! My celery section in local.py is as follows:

from .celery import *

BROKER_URL = 'amqp://guest:guest@localhost:5672/'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_ENABLED = True


I checked celery.stderr.log and this was logged:

ImportError: No module named billiard.exceptions
Traceback (most recent call last):
  File "/usr/local/bin/celery", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/celery/__main__.py", line 29, in main
    from celery.bin.celery import main
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/__init__.py", line 3, in <module>
    from .base import Option
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 86, in <module>
    from celery import VERSION_BANNER, Celery, maybe_patch_concurrency
  File "/usr/local/lib/python2.7/dist-packages/celery/five.py", line 306, in __getattr__
    module = __import__(self._object_origins[name], None, None, [name])
  File "/usr/local/lib/python2.7/dist-packages/celery/app/__init__.py", line 14, in <module>
    from celery import _state
  File "/usr/local/lib/python2.7/dist-packages/celery/_state.py", line 20, in <module>
    from celery.utils.threads import LocalStack
  File "/usr/local/lib/python2.7/dist-packages/celery/utils/__init__.py", line 27, in <module>
    from celery.exceptions import CPendingDeprecationWarning, CDeprecationWarning
  File "/usr/local/lib/python2.7/dist-packages/celery/exceptions.py", line 15, in <module>
    from billiard.exceptions import (  # noqa
ImportError: No module named billiard.exceptions

Also, when I did a ps aux |grep celery, it came up with one celery process marked [defunct]. Though `circusctl status celery` returns "active", I think celery is failing to start. 

Dennis Lysenko

unread,
Nov 12, 2015, 12:18:32 PM11/12/15
to Alejandro Alonso, taigaio
It definitely seems that circus is running the wrong python executable. It is currently running python2.7 (/usr/bin/python) instead of what is specified in [env:taiga-celery].

Dennis Lysenko

unread,
Nov 12, 2015, 12:57:09 PM11/12/15
to Alejandro Alonso, taigaio
Fixed! I remade my virtualenv and reinstalled requirements.txt and it now works. Thanks for the pointer.

Alejandro Alonso

unread,
Nov 12, 2015, 1:16:54 PM11/12/15
to Dennis Lysenko, taigaio
Great! :)
Reply all
Reply to author
Forward
0 new messages