API 400 Bad Request during PATCH Request

1,733 views
Skip to first unread message

ganchun...@gmail.com

unread,
Mar 24, 2016, 9:35:30 AM3/24/16
to taigaio
Hi,

I installed taiga on my own Ubuntu 14.04 server following instructions here: https://taigaio.github.io/taiga-doc/dist/setup-production.html

Everything was working fine until 3 days ago where Taiga's oompa-loompas suddenly acting up on almost all request to update projects, user story and tasks. Creating and loading of projects/user stories/tasks are working fine though. My nginx access logs shows that all PATCH, PUT and DELETE request ends with error 400.
 
 
211.25.204.99 - - [24/Mar/2016:21:28:11 +0800] "DELETE /api/v1/userstories/1 HTTP/1.1" 400 0 "http://taiga.iamgan.com/project/ganchunhow-giant-dynamic-form-builder/us/1?no-milestone=1" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"

221.133.35.204 - - [24/Mar/2016:20:57:40 +0800] "PATCH /api/v1/userstories/1 HTTP/1.1" 400 0 "http://taiga.iamgan.com/project/ganchunhow-giant-dynamic-form-builder/backlog" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
 

gunicorn.stderr.log doesn't give anything useful to help troubleshooting. Please help. 

regards,
Gan 

Alejandro Alonso

unread,
Mar 28, 2016, 2:35:45 AM3/28/16
to ganchun...@gmail.com, taigaio
Hello Gan,

In the developer console of your browser you could check the content of those 400 error requests, could you paste here the reason of the error?.

Regards!,

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
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/d84d915b-a28e-4428-bc53-7081a114c61a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

  
Alejandro Alonso Fernández  
CIO & Co-founder

www.kaleidos.net/FC8EAC/

ganchun...@gmail.com

unread,
Mar 28, 2016, 3:36:02 AM3/28/16
to taigaio, ganchun...@gmail.com
Hi Alejandro,

The weird thing is that client side never complaint about a HTTP 400 error, I'm getting a connection reset instead. this is what I get from browser console:

PATCH http://taiga.iamgan.com/api/v1/projects/1 net::ERR_CONNECTION_RESET
    (anonymous function)    @   angular.js:10722
    sendReq @   angular.js:10515
    serverRequest   @   angular.js:10222
    processQueue    @   angular.js:14745
    (anonymous function)    @   angular.js:14761
    Scope.$eval @   angular.js:15989
    Scope.$digest   @   angular.js:15800
    (anonymous function)    @   angular.js:16028
    completeOutstandingRequest  @   angular.js:5507

XHR failed loading: PATCH "http://taiga.iamgan.com/api/v1/projects/1".
    (anonymous function)    @   angular.js:10722
    sendReq @   angular.js:10515
    serverRequest   @   angular.js:10222
    processQueue    @   angular.js:14745
    (anonymous function)    @   angular.js:14761
    Scope.$eval @   angular.js:15989
    Scope.$digest   @   angular.js:15800
    (anonymous function)    @   angular.js:16028
    completeOutstandingRequest  @   angular.js:5507
    (anonymous function)    @   angular.js:5784

TypeError: Cannot read property '_error_message' of null
    at app.js:17639
    at processQueue (angular.js:14745)
    at angular.js:14761
    at Scope.$eval (angular.js:15989)
    at Scope.$digest (angular.js:15800)
    at Scope.$apply (angular.js:16097)
    at angular.js:16392
    at completeOutstandingRequest (angular.js:5507)
    at angular.js:5784

I have set my nginx's log level to info, and logs/nginx.error.log logged something similar:

2016/03/25 20:20:35 [info] 4869#0: *112 recv() failed (104: Connection reset by peer), client: 211.25.204.99, server: taiga.iamgan.com, request: "PATCH /api/v1/projects/1 HTTP/1.1", host: "taiga.iamgan.com", referrer: "http://taiga.iamgan.com/project/ganchunhow-giant-dynamic-form-builder/admin/project-profile/details"


If i tried adding X-HTTP-Method-Override to the request and it seemed to work 
curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer eyJ1c2VyX2F1dGhlbnRpY2F0aW9uX2lkIjo1fQ:1aj1Su:Q4FskqXBQj7SvYVHm8ND_XPhfhY" \
-H "Content-Type: application/json" \
-H "X-HTTP-Method-Override: PATCH" \
-d '{"status": "3", "version": "2"}' \

Seems to me nginx has issue with PATCH, PUT or even DELETE request? 

regards,
Gan 

Alejandro Alonso

unread,
Mar 28, 2016, 7:49:39 AM3/28/16
to Chun How Gan, taigaio
It's a bit strange, did you update anything in the server?, could it be something in your network manipulating those requests?

Regards


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

ganchun...@gmail.com

unread,
Mar 29, 2016, 8:30:26 AM3/29/16
to taigaio, ganchun...@gmail.com
Hi Alejandro,

Yes it is, I have double confirmed the firewall is disabled before posting. We are checking with the hosting provider if they are blocking these HTTP requests, will keep you posted. Worse case we'll do a self sign SSL cert and move taiga to https and see if there is any difference. 

regards,
Gan

Alejandro Alonso

unread,
Mar 29, 2016, 8:45:56 AM3/29/16
to Chun How Gan, taigaio
Ok Gan! ;)


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

ganchun...@gmail.com

unread,
Mar 30, 2016, 7:35:46 AM3/30/16
to taigaio, ganchun...@gmail.com
Hi Alejandro,

Got confirmation from service provider they have recently hardened their WAF rules which affected PATCH, PUT and DELETE requests. They have fixed this on their end and now taiga is running fine in our server. One thing to note is that the project timeline seems to take forever to load in project timeline page, the spinning circle is there forever. Any idea?

regards,
Gan

Alejandro Alonso

unread,
Mar 30, 2016, 8:08:00 AM3/30/16
to Chun How Gan, taigaio
Hello Gan,

It should load properly...did you check if there is any error in your javascript console?.

Regards,


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

ganchun...@gmail.com

unread,
Mar 30, 2016, 1:37:23 PM3/30/16
to taigaio, ganchun...@gmail.com
Hi Alejandro,

Nope, no error in the javascript console. However I do notice the call to ws://taiga.iamgan.com/events is stalled, is it possible that firewall is blocking websocket request?


regards,
Gan

Alejandro Alonso

unread,
Mar 31, 2016, 2:10:08 AM3/31/16
to Chun How Gan, taigaio
It could be but it doesn't seem related to the timeline issue.

What kind of user are you using to access that project?, a superuser one or a real team member for that project?.

Regards,


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages