IDEMSInternational / parenttext-china

0 stars 0 forks source link

No response from goals API #13

Closed fagiothree closed 9 months ago

fagiothree commented 10 months ago

We need to be able to use webhook calls as in https://github.com/IDEMSInternational/parenttext-goals-webhooks for defining program variables. RapidPro is hosted on a server in China so there might be problems connecting to external services that are not hosted in China. When running a test flow in the simulator there is no response, without getting any error code image

Since this feature is necessary for testing user experience, we should solve this by December 8th

istride commented 10 months ago

I have tried to contact the API from a server in China. Not sure what the problem is. Have asked our partner in China for suggestions.

curl -v 'https://X.X/get_goals_list'
*   Trying X.X.X.X:443...
* Connected to <something, something> (X.X.X.X) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.0 (OUT), TLS header, Unknown (21):
* TLSv1.3 (OUT), TLS alert, decode error (562):
* error:0A000126:SSL routines::unexpected eof while reading
* Closing connection 0
curl: (35) error:0A000126:SSL routines::unexpected eof while reading
istride commented 10 months ago

The prevailing view is that it may simply not be possible to access any Google-hosted service from within China, and we will have to consider hosting the API within China.

We can package the API as a Docker container, which will allow us to deploy the API without dependence on Google services. We will need to publish the container image to a Container Registry (e.g. Docker Hub). In preparation for that, we should make sure that the container image we create is free of elements that should not or cannot be made public.

istride commented 10 months ago

A container image has been created and is available from two locations:

The Github Container Registry has very poor performance from our server in China, but Docker Hub is better. Github's registry is free, but Docker Hub is not for organizations, so my personal account is being used for the time being. Perhaps a better solution can be found in future.

The Goals API has been deployed to our server in China.