Closed wellcaffeinated closed 6 years ago
Just to note the nearly-obvious, this appears to be an error on the CORS "preflight" request before the true API method call. Strange...
Yes, odd. But it was working last week. No changes...
We did redeploy the back-end server software this week, so that is the likely culprit...
@bredelings , can you look into this?
It looks like there may be some problem with the formatting of the JSON you were sending. I think I've fixed it to give a reasonable response:
$ curl -X POST https://api.opentreeoflife.org/v3/tree_of_life/subtree -d '{"yo' [/v3/tree_of_life/subtree] Error: Could not parse body of call as JSON.
I guess this raises the question: do you think your JSON is OK?
-BenRI
On 09/13/2018 06:04 PM, Mark T. Holder wrote:
We did redeploy the back-end server software this week, so that is the likely culprit...
@bredelings https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_bredelings&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=yDQgdhRIVlGWlo1dehDX4FDHdLhgFHI_XNBo6vRcIuw&m=-917dFNSkAENPyKsb02Ab0bD9u9pj8-AdDJ5OuiW_fQ&s=_rJuXH6w1xdxaGjEkuojDU7aW-DLZ08Wn7gnwUxUw_k&e= , can you look into this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenTreeOfLife_feedback_issues_420-23issuecomment-2D421167800&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=yDQgdhRIVlGWlo1dehDX4FDHdLhgFHI_XNBo6vRcIuw&m=-917dFNSkAENPyKsb02Ab0bD9u9pj8-AdDJ5OuiW_fQ&s=FKc7QS_pRhNCIvdhFwoX7c8NSYAgBiTHB4nvulzGZOE&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAIj7NMpubFVgcrRaUmfQx9J8wYmMrCHks5uatZegaJpZM4WoH3b&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=yDQgdhRIVlGWlo1dehDX4FDHdLhgFHI_XNBo6vRcIuw&m=-917dFNSkAENPyKsb02Ab0bD9u9pj8-AdDJ5OuiW_fQ&s=yhbRp_EukkD7_QsPseWyjnJ46wJuz__6qPgPaUAmTd4&e=.
We should be catching this exception and reporting some 400-type error, or 200 if we want to allow incorrect JSON with the OPTIONS verb. Treemachine was probably just more lenient and allowed it. I don't see the harm in doing that...
It seems to be working now. I'm not sure about the json. It should be correct though...
On Fri, Sep 14, 2018, 12:55 Mark T. Holder notifications@github.com wrote:
We should be catching this exception and reporting some 400-type error, or 200 if we want to allow incorrect JSON with the OPTIONS verb. Treemachine was probably just more lenient and allowed it. I don't see the harm in doing that...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenTreeOfLife/feedback/issues/420#issuecomment-421420180, or mute the thread https://github.com/notifications/unsubscribe-auth/ABE552zSZzHHaBlZtkoYWVEKqgabmF26ks5ua9-JgaJpZM4WoH3b .
OK, glad to here things are working. In retrospect, I don't think there was any reason to think the JSON is bad.
Let us know if you have any more questions! :-)
-BenRI
On 09/14/2018 07:00 PM, Jasper wrote:
It seems to be working now. I'm not sure about the json. It should be correct though...
On Fri, Sep 14, 2018, 12:55 Mark T. Holder notifications@github.com wrote:
We should be catching this exception and reporting some 400-type error, or 200 if we want to allow incorrect JSON with the OPTIONS verb. Treemachine was probably just more lenient and allowed it. I don't see the harm in doing that...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub
https://github.com/OpenTreeOfLife/feedback/issues/420#issuecomment-421420180, or mute the thread
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenTreeOfLife_feedback_issues_420-23issuecomment-2D421505480&d=DwMFaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=yDQgdhRIVlGWlo1dehDX4FDHdLhgFHI_XNBo6vRcIuw&m=_OC1QYgXkBeS6OzxJOVQKeiavF-DLwi-wG3WUZux4_Q&s=e7cfs4U7v8KsIFiCNDfAMm2ddIApreXl2wT0EfUtNh4&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAIj7IHoF3MMwlh5FiDj9xJCJK73xVIPks5ubDTygaJpZM4WoH3b&d=DwMFaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=yDQgdhRIVlGWlo1dehDX4FDHdLhgFHI_XNBo6vRcIuw&m=_OC1QYgXkBeS6OzxJOVQKeiavF-DLwi-wG3WUZux4_Q&s=68IozxWKWrONTkGcDc-0OzQT7x0DG6yYaEIvAOFN_NI&e=.
Thanks!
On Sat, Sep 15, 2018, 12:03 Benjamin Redelings notifications@github.com wrote:
OK, glad to here things are working. In retrospect, I don't think there was any reason to think the JSON is bad.
Let us know if you have any more questions! :-)
-BenRI
On 09/14/2018 07:00 PM, Jasper wrote:
It seems to be working now. I'm not sure about the json. It should be correct though...
On Fri, Sep 14, 2018, 12:55 Mark T. Holder notifications@github.com wrote:
We should be catching this exception and reporting some 400-type error, or 200 if we want to allow incorrect JSON with the OPTIONS verb. Treemachine was probably just more lenient and allowed it. I don't see the harm in doing that...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub
< https://github.com/OpenTreeOfLife/feedback/issues/420#issuecomment-421420180 , or mute the thread
.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenTreeOfLife_feedback_issues_420-23issuecomment-2D421505480&d=DwMFaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=yDQgdhRIVlGWlo1dehDX4FDHdLhgFHI_XNBo6vRcIuw&m=_OC1QYgXkBeS6OzxJOVQKeiavF-DLwi-wG3WUZux4_Q&s=e7cfs4U7v8KsIFiCNDfAMm2ddIApreXl2wT0EfUtNh4&e=>,
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenTreeOfLife/feedback/issues/420#issuecomment-421591788, or mute the thread https://github.com/notifications/unsubscribe-auth/ABE557kZ_2Ehc9HMHItnQI8JHEsSDIxBks5ubSTmgaJpZM4WoH3b .
Hmm... it started doing the same thing again just now.
Request URL: https://api.opentreeoflife.org/v3/tree_of_life/node_info
Request Method: OPTIONS
Status Code: 500 Internal Server Error
Remote Address: 34.221.232.64:443
Referrer Policy: no-referrer-when-downgrade
Connection: close
Content-Length: 78
Content-Type: text/html; charset=UTF-8
Date: Mon, 17 Sep 2018 18:12:41 GMT
Server: waitress
Provisional headers are shown
Access-Control-Request-Headers: content-type
Access-Control-Request-Method: POST
Origin: http://localhost:8080
Referer: http://localhost:8080/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3554.0 Safari/537.36
Response
Error: could not connect to 'http://localhost:1984/v3/tree_of_life/node_info'
We had some issues with the deployment of the fix (and the redirections on the servers side were not working for a few minutes). I think it is fixed and the deployment is now working... sorry for the repeated errors.
It is still a 500 error, but not for the same reason.
Port 1984 is where the otcetera server runs. When we restart it, you'll see this message for a minute until if reloads. If you see this for longer than about a minute, then if might actually be down.
Hmm... I suppose we could add an explanation to the "can't connect" message, like "Please wait for a minute and try again, you might have caught us in the middle of restarting the API server."
Sounds like 503 would be the machine readable version of that situation. But human readable is good too.
I've been getting 500 errors recently (within the last week). I haven't changed anything on my end.
Here's the request/response data from chrome devtools: