Hi Support and Community:
I am trying to deploy an odk-central for testing and I am seeing various problems.
The main one and the one that I can't understand is this.
I manage to get it work locally on windows, the biggest issue was the lack of support for port other than 443 (mine is already taken by another container)
I update a bit the code and it works
git clone according to doc + recursive to get linked project
Hi @delcroip ,
Thanks for your comment.
I'm run the nectcat and any other process use this port . And i'm remove all docker container, images, network, etc.. with a docker system prune
$ sh netstat -nepal|grep 443
tcp 0 0 10.20.60.102:55940 45.77.97.47:443 ESTABLISHED 1000 75712888 2060892/firefox
tcp 0 0 10.20.60.102:46942 34.117.237.239:443 ESTABLISHED 1000 75714375 2060892/firefox
tcp 0 0 10.20.60.102:46624 44.239.205.250:443 ESTABLISHED 1000 73443521 2060892/firefox
I don't know if the problem is my version 1.3.3 or a miss something because is really complex to run odk-central for a developer environment.
My steps was :
I just wanted to note that we normally don't use Docker during local development. Locally, it's easiest to work on the backend or the frontend by cloning the individual repository and following the setup instructions in the readme. For example, you can find the backend at https://github.com/getodk/central-backend, and the readme there has instructions for setting up a development environment. You can also work with Enketo and pyxform-http locally: see the frontend readme for more information.
If you really must use Docker as part of development, I'll echo @yanokwa in recommending that you set up your environment as closely as possible to the typical production setup.
Hi @Matthew_White
Thanks for your tip and feedback. My principal problem is I have the same issue in my development, staging and production environment and I don't know what the problem is ( certificated, network, etc..).
I'm trying to find in the official forum this error and I'm try apply any solution like modifying my docker-compose, changing the dockerfile, add my local ip in /etc/host etc.. and nothing works.
But for me now it is that odk-central works in all respects in some environments (I've two Spanish red cross projects waiting for resolve this problem )for . I will continue fighting and have if I understand the problem.
Thanks for your tip . No only have one server for every environment. And testing your branch but for now, but I have the same problem.
I'm using your more or less configuration but my only difference is the ports and the host because host.docker.internal doesn't work in Linux.
The big problem is I don't have any errors in logs and I insert into containers and run a ping to servers and I've connectivity
root@9847f2f2dcf3:/usr/odk# ping enketo
PING enketo (192.168.48.5) 56(84) bytes of data.
64 bytes from odk-central_enketo_1.odk-central_default (192.168.48.5): icmp_seq=1 ttl=64 time=0.095 ms
root@34c586c9b471:/data# ping service
PING service (192.168.48.8) 56(84) bytes of data.
64 bytes from odk-central_service_1.odk-central_default (192.168.48.8): icmp_seq=1 ttl=64 time=0.166 ms
64 bytes from odk-central_service_1.odk-central_default (192.168.48.8): icmp_seq=2 ttl=64 time=0.089 ms
64 bytes from odk-central_service_1.odk-central_default (192.168.48.8): icmp_seq=3 ttl=64 time=0.089 ms
I never thought that with a docker-compose it would be so difficult to do a test. I'm still working on that .
Thanks
PD: I did a telnet server to enketo and enketo to server and works
equipoim@equipoim:~/Documentos/odk-central$ docker exec -it 9847f2f2dcf3 bash
root@9847f2f2dcf3:/usr/odk# telnet enketo 8005
Trying 192.168.48.5...
Connected to enketo.
Escape character is '^]'.
and
root@42dccfe0f742:/srv/src/enketo_express# telnet service 8383
Trying 192.168.48.8...
Connected to service.
Escape character is '^]'.
From the docker script, the form server address is defined by https://${DOMAIN} meaning that when you connect to enketo, you should be able to reach the "domain"
Normally the extra_hosts config from @yanokwa should have worked if you configured with the "docker host" IP
I am not sure why they bind this with domain instead of either nginx container or even the "form server" container (I guess it is the "service" one), maybe due to some certificate constraint.
Well in the end it keeps failing odk-central out-of-the-box. I don't know what the problem is, I'm going to leave this thread open in case someone knows how to solve the problem.
@sowe1 I wanted to follow up to see if I can understand the high-level problem. It sounds like you want to run multiple Central installs (e.g., dev, staging, prod) on a single machine?
OK. Let's focus on your production environment then. I'm assuming you have 1 Central install on 1 server. I'm also assuming you have a stock install with no changes besides what is required in the .env file.
What does your .env look like?
Have you mapped your fully qualified domain name to the server's external IP address?
Are all firewalls (e.g., ufw) on the server are disabled?
Are port 80s and port 443 on your server's external IP open and unfiltered?
Have you mapped your fully qualified domain name to the server's external IP address?
I did a test with local server IP address and the IP for the service container
10.98.20.119 is not a fully qualified domain, it's a private IP. The domain must be something like example.org and it must be mapped to a public IP like 93.184.216.34. Try a fully qualified domain and SSL_TYPE=letsencrypt and get that working first.
Thanks @yanokwa ,
Thanks that's right but for now, we don't have a domain because I need to run one odk-central and make tests .
is mandatory to have a domain for running odk-central?
Thanks