Thanks this worked.
dig +short api.test.domain.com
dig +short registry.test.domain.com
dig +short vpn.test.domain.com
dig +short s3.test.domain.com
When I start the openBalena instance with:
./scripts/compose up
I get this log:
root@machine:/home/root/open-balena# ./scripts/compose up
Starting openbalena_s3_1_4fbc1fd9053b ... done
Starting openbalena_db_1_a31c9cfcac3f ... done
Starting openbalena_redis_1_41d5143bd969 ... done
Starting openbalena_cert-provider_1_65dd3f2ad90d ... done
Starting openbalena_api_1_c26c293fcb23 ... done
Starting openbalena_registry_1_fdeb54d92860 ... done
Starting openbalena_vpn_1_2cdf91b9b5d9 ... done
Starting openbalena_haproxy_1_7e5b800840ab ... done
Attaching to openbalena_db_1_a31c9cfcac3f, openbalena_cert-provider_1_65dd3f2ad90d, openbalena_redis_1_41d5143bd969, openbalena_s3_1_4fbc1fd9053b, openbalena_api_1_c26c293fcb23, openbalena_vpn_1_2cdf91b9b5d9, openbalena_registry_1_fdeb54d92860, openbalena_haproxy_1_7e5b800840ab
db_1_a31c9cfcac3f | 2019-05-18 09:38:51.823 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1_a31c9cfcac3f | 2019-05-18 09:38:51.823 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1_a31c9cfcac3f | 2019-05-18 09:38:51.835 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1_a31c9cfcac3f | 2019-05-18 09:38:51.884 UTC [21] LOG: database system was shut down at 2019-05-18 09:23:23 UTC
db_1_a31c9cfcac3f | 2019-05-18 09:38:51.931 UTC [1] LOG: database system is ready to accept connections
cert-provider_1_65dd3f2ad90d | [Error] ACTIVE variable is not enabled. Value should be "true" or "yes" to continue.
cert-provider_1_65dd3f2ad90d | [Error] Unable to continue due to misconfiguration. See errors above. [Stopping]
redis_1_41d5143bd969 | 1:C 18 May 2019 09:38:52.310 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1_41d5143bd969 | 1:C 18 May 2019 09:38:52.311 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1_41d5143bd969 | 1:C 18 May 2019 09:38:52.311 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1_41d5143bd969 | 1:M 18 May 2019 09:38:52.314 * Running mode=standalone, port=6379.
redis_1_41d5143bd969 | 1:M 18 May 2019 09:38:52.315 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1_41d5143bd969 | 1:M 18 May 2019 09:38:52.315 # Server initialized
redis_1_41d5143bd969 | 1:M 18 May 2019 09:38:52.315 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1_41d5143bd969 | 1:M 18 May 2019 09:38:52.315 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1_41d5143bd969 | 1:M 18 May 2019 09:38:52.316 * DB loaded from disk: 0.001 seconds
redis_1_41d5143bd969 | 1:M 18 May 2019 09:38:52.316 * Ready to accept connections
s3_1_4fbc1fd9053b | Systemd init system enabled.
api_1_c26c293fcb23 | Systemd init system enabled.
vpn_1_2cdf91b9b5d9 | Systemd init system enabled.
registry_1_fdeb54d92860 | Systemd init system enabled.
haproxy_1_7e5b800840ab | Building certificate from environment variables...
haproxy_1_7e5b800840ab | Setting up watches. Beware: since -r was given, this may take a while!
haproxy_1_7e5b800840ab | Watches established.
haproxy_1_7e5b800840ab | [NOTICE] 137/093856 (15) : New worker #1 (17) forked
haproxy_1_7e5b800840ab | [WARNING] 137/093856 (17) : Server backend_api/resin_api_1 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
haproxy_1_7e5b800840ab | [ALERT] 137/093856 (17) : backend 'backend_api' has no server available!
haproxy_1_7e5b800840ab | [WARNING] 137/093856 (17) : Server backend_registry/resin_registry_1 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
haproxy_1_7e5b800840ab | [ALERT] 137/093856 (17) : backend 'backend_registry' has no server available!
haproxy_1_7e5b800840ab | [WARNING] 137/093856 (17) : Server backend_vpn/resin_vpn_1 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
haproxy_1_7e5b800840ab | [ALERT] 137/093856 (17) : backend 'backend_vpn' has no server available!
haproxy_1_7e5b800840ab | [WARNING] 137/093857 (17) : Server vpn-tunnel/balena_vpn is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
haproxy_1_7e5b800840ab | [ALERT] 137/093857 (17) : proxy 'vpn-tunnel' has no server available!
db_1_a31c9cfcac3f | 2019-05-18 09:39:00.509 UTC [28] ERROR: relation "uniq_model_model_type_vocab" already exists
db_1_a31c9cfcac3f | 2019-05-18 09:39:00.509 UTC [28] STATEMENT: CREATE UNIQUE INDEX "uniq_model_model_type_vocab" ON "model" ("is of-vocabulary", "model type");
haproxy_1_7e5b800840ab | [WARNING] 137/093900 (17) : Server backend_registry/resin_registry_1 is UP, reason: Layer4 check passed, check duration: 0ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
haproxy_1_7e5b800840ab | [WARNING] 137/093900 (17) : Server backend_vpn/resin_vpn_1 is UP, reason: Layer4 check passed, check duration: 0ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
haproxy_1_7e5b800840ab | [WARNING] 137/093903 (17) : Server vpn-tunnel/balena_vpn is UP, reason: Layer4 check passed, check duration: 0ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
haproxy_1_7e5b800840ab | [WARNING] 137/093906 (17) : Server backend_api/resin_api_1 is UP, reason: Layer4 check passed, check duration: 0ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
And then I tried to open api.test.domain.com
on google chrome it gave me an error This site can’t be reached
So I wrote a small flask server and I opened api.test.domain.com
and I was able to successfully get the response.
I think something is going wrong for this command ./scripts/compose up