Oompa Loompas are sad and WebSocket 502

1,396 views
Skip to first unread message

jpsi...@gmail.com

unread,
Jul 31, 2015, 1:20:56 PM7/31/15
to taigaio
Hello, 

First let me say thank you for developing this awesome system. 

I tried to search around to see if I could solve these issues myself but no luck so I am here to ask the community.

My issues: 

I am having websocket issues with the events system and cannot seem to figure out why this is happening.
Console shows:
WebSocket connection to 'ws://projects.domain.com/events' failed: Error during WebSocket handshake: Unexpected response code: 502

Checking the `nginx.error.log` I see this error:
2015/07/31 16:36:37 [error] 13809#0: *249 connect() failed (111: Connection refused) while connecting to upstream, client: 50.253.xxx.xxx, server: _, request: "GET /events HTTP/1.1", upstream: "http://127.0.0.1:8888/events", host: "projects.domain.com"

Also, the Oompa Loompas seem to get sad a lot... When I try to add/manage an issue I see the Oompa Loompas are sad message. The issues are successfully created and all my edits do save. I do have my email configured properly (I validated this by changing my email in the admin user and I did receive the change email properly.)

I see this in the `gunicorn.stderr.log` when this happens:
ERROR:2015-07-31 17:09:41,847: Internal Server Error: /api/v1/issues
Traceback (most recent call last):
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/core/handlers/base.py", line 111, 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/.virtualenvs/taiga/lib/python3.4/site-packages/django/views/decorators/csrf.py", line 57, 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/base/api/mixins.py", line 72, in create
    self.object = serializer.save(force_insert=True)
  File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 1055, in save
    self.object = super().save(**kwargs)
  File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 614, in save
    self.save_object(self.object, **kwargs)
  File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 1073, in save_object
    obj.save(**kwargs)
  File "/home/taiga/taiga-back/taiga/projects/issues/models.py", line 93, in save
    return super().save(*args, **kwargs)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/base.py", line 589, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/base.py", line 626, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/dispatch/dispatcher.py", line 198, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/taiga/taiga-back/taiga/projects/references/models.py", line 92, in attach_sequence
    instance.save(update_fields=['ref'])
  File "/home/taiga/taiga-back/taiga/projects/issues/models.py", line 93, in save
    return super().save(*args, **kwargs)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/base.py", line 589, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/base.py", line 626, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/dispatch/dispatcher.py", line 198, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/taiga/taiga-back/taiga/events/signal_handlers.py", line 43, in on_save_any_model
    connection.on_commit(emit_event)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/transaction_hooks/mixin.py", line 31, in on_commit
    func()
  File "/home/taiga/taiga-back/taiga/events/signal_handlers.py", line 42, in <lambda>
    emit_event = lambda: events.emit_event_for_model(instance, sessionid=sesionid, type=type)
  File "/home/taiga/taiga-back/taiga/events/events.py", line 78, in emit_event_for_model
    data=data)
  File "/home/taiga/taiga-back/taiga/events/events.py", line 47, in emit_event
    channel=channel)
  File "/home/taiga/taiga-back/taiga/events/backends/rabbitmq.py", line 51, in emit_event
    connection = _make_rabbitmq_connection(self.url)
  File "/home/taiga/taiga-back/taiga/events/backends/rabbitmq.py", line 43, in _make_rabbitmq_connection
    password=password, virtual_host=vhost[1:])
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/amqp/connection.py", line 180, in __init__
    (10, 30),  # tune
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/amqp/abstract_channel.py", line 67, in wait
    self.channel_id, allowed_methods)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/amqp/connection.py", line 240, in _wait_method
    self.method_reader.read_method()
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/amqp/method_framing.py", line 189, in read_method
    raise m
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/amqp/method_framing.py", line 107, in _next_method
    frame_type, channel, payload = read_frame()
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/amqp/transport.py", line 154, in read_frame
    frame_header = read(7, True)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/amqp/transport.py", line 277, in _read
    s = recv(n - len(rbuf))
ConnectionResetError: [Errno 104] Connection reset by peer

I'm very new to python so I am clueless what to do here...


I installed this on AWS EC2 instance and my current inbound rules are: 
Custom TCP Rule
TCP
8888
0.0.0.0/0
Custom TCP Rule
TCP
8002 - 8003
0.0.0.0/0
All traffic
All
All
0.0.0.0/0
Custom TCP Rule
TCP
9000 - 9002
0.0.0.0/0

HTTP
TCP
80
HTTPS
TCP
443


As you can see, I opened all ports. I also disabled the firewall on the server until I can get this working. So I am not thinking this is a port issue but perhaps a missed Listen? 

I setup Taiga by using the Setup Production Environment guide.

I only had an issue when running 
npm install

as gyp was throwing errors  and I had to `sudo` the command to get it to install.

Thanks for your time.

Regards,
Jeremy


Alejandro Alonso

unread,
Aug 3, 2015, 2:27:40 AM8/3/15
to jpsi...@gmail.com, taigaio
Hello Jeremy,

It seems you are having problems with your rabbitmq connection. Did you follow this instructions for configuring the service? -> http://taigaio.github.io/taiga-doc/dist/setup-production.html#_events_installation

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/0f4e2cba-8d6e-44fc-a212-a13734509c4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

  
Alejandro Alonso Fernández  
CIO & Co-founder

www.kaleidos.net/FC8EAC/

Jeremy Simkins

unread,
Aug 3, 2015, 10:03:23 AM8/3/15
to taigaio, jpsi...@gmail.com
Hello Alejandro,

Thanks for your assistance.

Yes, I followed that exactly. I did figure out that special characters seem to be to culprit in my case. By changing the password I was able to get that working. (I was using a $ and !, by removing them it works)

Now I get this when loading the Issues page:
GET /api/v1/user-storage/3632e6ff1d72a92b5baa31e024734f27f1b027c5
HTTP 404 NOT FOUND Content-Type: application/json Vary: Accept Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
{
   
"_error_message": "No StorageEntry matches the given query."
}

This is my console when I load the Issues page:
angular.js:12221 Initialize navigation urls
angular.js:12221 Initialize api urls
angular.js:12221 Using the default logging exception handler.
angular.js:12221 Initialize resources
angular.js:12221 Initialize application
angular.js:12221 Analytics: no acount id provided. Disabling.
events.coffee:44 WebSocket connection to 'ws://projects.olympusat.com/events' failed: Error during WebSocket handshake: Unexpected response code: 502
angular.js:12221 WebSocket error: [object Event](anonymous function) @ angular.js:12221EventsService.onError @ events.coffee:154bound @ lodash.js:729
angular.js:12221 WebSocket closed.
angular.js:10413 GET http://projects.olympusat.com/api/v1/user-storage/3632e6ff1d72a92b5baa31e024734f27f1b027c5 404 (NOT FOUND)startSymbol @ angular.js:10413sendReq @ angular.js:10232$get.serverRequest @ angular.js:9944processQueue @ angular.js:14454(anonymous function) @ angular.js:14470$get.Scope.$eval @ angular.js:15719$get.Scope.$digest @ angular.js:15530$get.Scope.$apply @ angular.js:15824(anonymous function) @ angular.js:16119completeOutstandingRequest @ angular.js:5370(anonymous function) @ angular.js:5642


Thanks,
Jeremy



Alejandro Alonso

unread,
Aug 4, 2015, 1:46:11 AM8/4/15
to Jeremy Simkins, taigaio
Don't worry about the storage error, it sounds like you are using the autocreated admin user instead of a registered one, is it possible?. issues should be working anyway and the error shouldn't appear with a registered user.

About the events error, it seems the problem is nginx can't proxypass to "http://127.0.0.1:8888/events", I think there are two options or events app isn't running correctly (you could check if that port is open on localhost and try to access) or the nginx configuration isn't ok.

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.

For more options, visit https://groups.google.com/d/optout.

Jeremy Simkins

unread,
Aug 4, 2015, 11:09:30 AM8/4/15
to taigaio, jpsi...@gmail.com
Thanks again Alejandro.

Yes, I just renamed the default admin to my user. 

I went ahead and created a new user and gave them admin access. 
I noticed I still get the same error:
GET /api/v1/user-storage/f250e66cf068b06e308298a1bac5052c9e18eca9
HTTP 404 NOT FOUND Content-Type: application/json
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept
{
   
"_error_message": "No StorageEntry matches the given query."
}


As for the proxypass, this is my first time dealing with nginx so I may be missing something. 
I had my firewall disabled but I did turn it back on. I have this for my firewall:
$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
8001/tcp                                            ALLOW             Anywhere
8002/tcp                                            ALLOW             Anywhere
8003/tcp                   ALLOW       Anywhere
8888/tcp                   ALLOW       Anywhere
9000/tcp                   ALLOW       Anywhere
9001/tcp                   ALLOW       Anywhere
9002/tcp                   ALLOW       Anywhere
8001/tcp                   ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)
8001/tcp (v6)                                     ALLOW              Anywhere    ( v6 )
8002/tcp (v6)              ALLOW       Anywhere (v6)
8003/tcp (v6)              ALLOW       Anywhere (v6)
8888/tcp (v6)              ALLOW       Anywhere (v6)
9000/tcp (v6)              ALLOW       Anywhere (v6)
9001/tcp (v6)              ALLOW       Anywhere (v6)
9002/tcp (v6)              ALLOW       Anywhere (v6)

I have not enabled 443 yet, waiting to fix the normal HTTP before I use HTTPS. 

My nginx file is:
server {
    listen 80 default_server;
    server_name _;

    large_client_header_buffers 4 32k;
    client_max_body_size 50M;
    charset utf-8;

    access_log /home/taiga/logs/nginx.access.log;
    error_log /home/taiga/logs/nginx.error.log;

    # Frontend
    location / {
        root /home/taiga/taiga-front-dist/dist/;
        try_files $uri $uri/ /index.html;
    }

    # Backend
    location /api {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8001/api;
        proxy_redirect off;
    }

    # Django admin access (/admin/)
    location /admin {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8001$request_uri;
        proxy_redirect off;
    }

    # Static files
    location /static {
        alias /home/taiga/taiga-back/static;
    }

    # Media files
    location /media {
        alias /home/taiga/taiga-back/media;
    }
    
    # Events
    location /events {
       proxy_pass http://127.0.0.1:8888/events;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       proxy_connect_timeout 7d;
       proxy_send_timeout 7d;
       proxy_read_timeout 7d;
    }

}


When I run 
curl: (7) Failed to connect to 127.0.0.1 port 8888: Connection refused

I do get connection refused. I am not sure what would be blocking this.

Any suggestions?

Thanks,
Jeremy

Jeremy Simkins

unread,
Aug 4, 2015, 11:16:17 AM8/4/15
to taigaio, jpsi...@gmail.com
It looks like nothing is listening to 8888
$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      932/sshd        
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1049/postgres   
tcp        0      0 127.0.0.1:8001          0.0.0.0:*               LISTEN      1989/python3.4  
tcp        0      0 0.0.0.0:48038           0.0.0.0:*               LISTEN      1164/beam       
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      1308/redis-server 1
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3917/nginx      
tcp        0      0 127.0.0.1:5555          0.0.0.0:*               LISTEN      741/python      
tcp        0      0 127.0.0.1:5556          0.0.0.0:*               LISTEN      741/python      
tcp        0      0 127.0.0.1:5557          0.0.0.0:*               LISTEN      1025/python     
tcp6       0      0 :::22                   :::*                    LISTEN      932/sshd        
tcp6       0      0 :::5672                 :::*                    LISTEN      1164/beam       
tcp6       0      0 :::4369                 :::*                    LISTEN      1137/epmd       
udp        0      0 0.0.0.0:42526           0.0.0.0:*                           602/dhclient    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           602/dhclient    
udp        0      0 0.0.0.0:12027           0.0.0.0:*                           741/python      
udp6       0      0 :::26638                :::*                                602/dhclient    


My config.json is: 
{
    "url": "amqp://taiga:my_password@localhost:5672/taiga",
    "secret": "MY_SECRET_KEY",
    "webSocketServer": {
        "port": 8888
    }
}



Alejandro Alonso

unread,
Aug 5, 2015, 1:53:47 AM8/5/15
to Jeremy Simkins, taigaio
So it seems taiga events isn't running correctly. Can you manually launch it executing "coffee index.coffee" ?

You should finish with something like (executed from another shell):

netstat -na | grep 8888
tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN     

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.

For more options, visit https://groups.google.com/d/optout.

Jeremy Simkins

unread,
Aug 5, 2015, 9:26:05 AM8/5/15
to taigaio, jpsi...@gmail.com
Thanks again Alejandro.

That seems to make it work.

$ netstat -na | grep 8888
tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN 

Now I no longer have the websocket errors but when I exit out, obviously it kills the script so the errors come back.

It seems this is the last issue I have asides from the user-storage issue that I get for all users.

So it seems it has an issue auto-starting. Any suggestions? 

Thanks,
Jeremy

David Barragán

unread,
Aug 5, 2015, 10:27:44 AM8/5/15
to Jeremy Simkins, taigaio
The user-storage error is a "valid" one: when you access to the issues list view taiga-front ask to taiga-back if the user has some custom filter (saved in user-storage). This error means the user hasn't custom filters saved.


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.

For more options, visit https://groups.google.com/d/optout.



--

---

 
David Barragán Merino  
Engineer

www.kaleidos.net/FFF8E7

Jeremy Simkins

unread,
Aug 5, 2015, 11:42:47 AM8/5/15
to taigaio, jpsi...@gmail.com
Thank you for the explanation David. That makes a lot of sense. 

So it looks like my only issue is to get the events to autostart.
Running:
coffee index.coffee

Works perfectly but I just need it to auto-start.

Thanks,
Jeremy

Alejandro Alonso

unread,
Aug 6, 2015, 1:11:33 AM8/6/15
to Jeremy Simkins, taigaio
Hello Jeremy, 

If you can run it with "coffee index.coffee" command the problem should be in the circus part, Could you please show us your circusd config file?

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.

For more options, visit https://groups.google.com/d/optout.



--

Jeremy Simkins

unread,
Aug 6, 2015, 4:54:37 PM8/6/15
to taigaio, jpsi...@gmail.com
My circus.ini is:
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
statsd = true

[watcher:taiga]
working_dir = /home/taiga/taiga-back
cmd = gunicorn
args = -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/gunicorn.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/gunicorn.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4

[env:taiga]
PATH = /home/taiga/.virtualenvs/taiga/bin:$PATH
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/taiga
PYTHONPATH=/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages

[watcher:taiga-celery]
working_dir = /home/taiga/taiga-back
cmd = celery
args = -A taiga worker -c 4
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/celery.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/celery.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4

[env:taiga-celery]
PATH = /home/taiga/.virtualenvs/taiga/bin:$PATH
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/taiga
PYTHONPATH=/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages

[watcher:taiga-events]
working_dir = /home/taiga/taiga-events
cmd = /usr/lib/node_modules/coffee-script/bin/coffee
args = index.coffee
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/taigaevents.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 12
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/taigaevents.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 12

[env:taiga-events]
PATH = /home/taiga/.virtualenvs/taiga/bin:$PATH
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/taiga
PYTHONPATH=/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages

[watcher:taiga-celery]
working_dir = /home/taiga/taiga-back
cmd = celery
args = -A taiga worker -c 4
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/celery.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/celery.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4

[env:taiga-celery]
PATH = /home/taiga/.virtualenvs/taiga/bin:$PATH
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/taiga
PYTHONPATH=/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages



Jeremy Simkins

unread,
Aug 6, 2015, 4:58:20 PM8/6/15
to taigaio, jpsi...@gmail.com
My /etc/init/circus.conf is:
start on filesystem and net-device-up IFACE=lo
stop on runlevel [016]

respawn
exec /usr/local/bin/circusd /home/taiga/circus.ini


Alejandro Alonso

unread,
Aug 7, 2015, 1:55:46 AM8/7/15
to Jeremy Simkins, taigaio
The configuration related to taiga-events is:

[watcher:taiga-events]
working_dir = /home/taiga/taiga-events
cmd = /usr/lib/node_modules/coffee-script/bin/coffee
args = index.coffee
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/taigaevents.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 12
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/taigaevents.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 12
 
[env:taiga-events]
PATH = /home/taiga/.virtualenvs/taiga/bin:$PATH
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/taiga
PYTHONPATH=/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages

But it seems to be ok, could you simulate the circusctl behaviour?:

cd /home/taiga/taiga-events
/usr/lib/node_modules/coffee-script/bin/coffee index.coffee

Did you check the files  /home/taiga/logs/taigaevents.stderr.log and /home/taiga/logs/taigaevents.stdout.log? and the circus log? 
Did you try reloading the circus config and restarting taiga-events?:
circusctl reloadconfig
circusctl restart taiga-events

Why did you add the entry [env:taiga-events]?, we don't use it in our instances, may be it's related to your problem. You could also try removing it from the file, reloading circus and restarting taiga-events.

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.

For more options, visit https://groups.google.com/d/optout.

Jeremy Simkins

unread,
Aug 7, 2015, 11:22:58 AM8/7/15
to taigaio, jpsi...@gmail.com
Thanks again Alejandro!

I added the env because I noticed it for all the others and I was just seeing what it would do as I had this issue from the start.

My error taiga events error log is empty.

nginx does show:
2015/08/07 14:03:50 [error] 1198#0: *70 connect() failed (111: Connection refused) while connecting to upstream, client: 50.253.135.181, server: _, request: "GET /events HTTP/1.1", upstream: "http://127.0.0.1:8888/events", host: "projects.olympusat.com"


When I ran 
cd /home/taiga/taiga-events
/usr/lib/node_modules/coffee-script/bin/coffee index.coffee

I saw:
-bash: /usr/lib/node_modules/coffee-script/bin/coffee: No such file or directory

did a
whereis coffee

I noticed my pathing is different.

I updated my pathing for the cmd and it works now!

My config for events is:
[watcher:taiga-events]
working_dir = /home/taiga/taiga-events
cmd = /usr/local/bin/coffee
args = index.coffee
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/taigaevents.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 12
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/taigaevents.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 12


Thanks for all your assistance for my issues.  Very much appriciated :)

Thank You

Jeremy 

Alejandro Alonso

unread,
Aug 10, 2015, 2:37:15 AM8/10/15
to Jeremy Simkins, taigaio
Great!

I'm very glad it's finally working ;)

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.

For more options, visit https://groups.google.com/d/optout.

thanhdu...@gmail.com

unread,
Nov 20, 2015, 3:19:41 AM11/20/15
to taigaio, jpsi...@gmail.com
Hi Jeremy Simkins can you show me how to configure  your taiga-events because i have the same your problem about web socket ...can you show me your files that you configured. because i followed document it doesnt work  

thanhdu...@gmail.com

unread,
Nov 20, 2015, 3:23:40 AM11/20/15
to taigaio, jpsi...@gmail.com, thanhdu...@gmail.com
i have problem . when i create issue . i found log said:

Trying import local.py settings...
Raven is not configured (logging is disabled). Please see the documentation for more information.
ERROR:2015-11-20 15:21:39,628: Internal Server Error: /api/v1/issues
Traceback (most recent call last):
  File "/home/taiga/taiga-back/taiga/events/backends/rabbitmq.py", line 32, in _make_rabbitmq_connection
    (authdata, host) = parse_result.netloc.split("@")
ValueError: too many values to unpack (expected 2)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/taiga/.virtualenvs/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/.virtualenvs/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/base/api/mixins.py", line 72, in create
    self.object = serializer.save(force_insert=True)
  File "/home/taiga/taiga-back/taiga/projects/notifications/mixins.py", line 243, in save
    obj = super(EditableWatchedResourceModelSerializer, self).save(**kwargs)
  File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 1055, in save
    self.object = super().save(**kwargs)
  File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 614, in save
    self.save_object(self.object, **kwargs)
  File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 1073, in save_object
    obj.save(**kwargs)
  File "/home/taiga/taiga-back/taiga/projects/issues/models.py", line 93, in save
    return super().save(*args, **kwargs)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/base.py", line 734, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/base.py", line 771, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/dispatch/dispatcher.py", line 201, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/taiga/taiga-back/taiga/projects/references/models.py", line 101, in attach_sequence
    instance.save(update_fields=['ref'])
  File "/home/taiga/taiga-back/taiga/projects/issues/models.py", line 93, in save
    return super().save(*args, **kwargs)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/base.py", line 734, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/db/models/base.py", line 771, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/django/dispatch/dispatcher.py", line 201, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/taiga/taiga-back/taiga/events/signal_handlers.py", line 45, in on_save_any_model
    connection.on_commit(emit_event)
  File "/home/taiga/.virtualenvs/taiga/lib/python3.4/site-packages/transaction_hooks/mixin.py", line 31, in on_commit
    func()
  File "/home/taiga/taiga-back/taiga/events/signal_handlers.py", line 44, in <lambda>
    emit_event = lambda: events.emit_event_for_model(instance, sessionid=sesionid, type=type)
  File "/home/taiga/taiga-back/taiga/events/events.py", line 78, in emit_event_for_model
    data=data)
  File "/home/taiga/taiga-back/taiga/events/events.py", line 47, in emit_event
    channel=channel)
  File "/home/taiga/taiga-back/taiga/events/backends/rabbitmq.py", line 51, in emit_event
    connection = _make_rabbitmq_connection(self.url)
  File "/home/taiga/taiga-back/taiga/events/backends/rabbitmq.py", line 34, in _make_rabbitmq_connection
    raise RuntimeError("Invalid url") from e
RuntimeError: Invalid url


i hope you can help me

Alejandro Alonso

unread,
Nov 20, 2015, 6:33:23 AM11/20/15
to thanhdu...@gmail.com, taigaio, Jeremy Simkins
Hello!,

It sounds like your settings in local.py for connecting to rabbit aren't correct, could you show us your local.py file?

Regards,
Reply all
Reply to author
Forward
0 new messages