balena-io / open-balena

Open source software to manage connected IoT devices at scale
https://balena.io/open
GNU Affero General Public License v3.0
1.07k stars 166 forks source link

haproxy could not resolve address #128

Closed fuji246 closed 3 months ago

fuji246 commented 3 years ago

Tried to run open-balena but got error that "haproxy could not resolve address". And access to port 80 gives TCP reset.

balena@raspberrypi:~/open-balena $ ./scripts/compose up 
Starting openbalena_s3_1            ... done
Starting openbalena_redis_1         ... done
Starting openbalena_cert-provider_1 ... done
Starting openbalena_db_1            ... done
Starting openbalena_registry_1      ... done
Starting openbalena_api_1           ... done
Starting openbalena_vpn_1           ... done
Starting openbalena_haproxy_1       ... done
Attaching to openbalena_db_1, openbalena_s3_1, openbalena_cert-provider_1, openbalena_redis_1, openbalena_registry_1, openbalena_api_1, openbalena_vpn_1, openbalena_haproxy_1
api_1            | standard_init_linux.go:228: exec user process caused: exec format error
cert-provider_1  | [Error] ACTIVE variable is not enabled. Value should be "true" or "yes" to continue.
cert-provider_1  | [Error] Unable to continue due to misconfiguration. See errors above. [Stopping]
db_1             | standard_init_linux.go:228: exec user process caused: exec format error
haproxy_1        | Building certificate from environment variables...
openbalena_api_1 exited with code 1
registry_1       | standard_init_linux.go:228: exec user process caused: exec format error
openbalena_db_1 exited with code 1
s3_1             | standard_init_linux.go:228: exec user process caused: exec format error
redis_1          | 1:C 22 Aug 2021 16:23:10.141 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1          | 1:C 22 Aug 2021 16:23:10.141 # Redis version=6.2.5, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1          | 1:C 22 Aug 2021 16:23:10.141 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
vpn_1            | standard_init_linux.go:228: exec user process caused: exec format error
openbalena_s3_1 exited with code 1
redis_1          | 1:M 22 Aug 2021 16:23:10.145 * monotonic clock: POSIX clock_gettime
openbalena_registry_1 exited with code 1
haproxy_1        | Setting up watches.  Beware: since -r was given, this may take a while!
openbalena_vpn_1 exited with code 1
haproxy_1        | Watches established.
redis_1          | 1:M 22 Aug 2021 16:23:10.148 * Running mode=standalone, port=6379.
redis_1          | 1:M 22 Aug 2021 16:23:10.148 # Server initialized
redis_1          | 1:M 22 Aug 2021 16:23:10.148 # 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          | 1:M 22 Aug 2021 16:23:10.190 * Loading RDB produced by version 6.2.5
redis_1          | 1:M 22 Aug 2021 16:23:10.191 * RDB age 494 seconds
redis_1          | 1:M 22 Aug 2021 16:23:10.191 * RDB memory usage when created 0.80 Mb
redis_1          | 1:M 22 Aug 2021 16:23:10.191 * DB loaded from disk: 0.036 seconds
redis_1          | 1:M 22 Aug 2021 16:23:10.191 * Ready to accept connections
haproxy_1        | [ALERT] 233/162324 (16) : parsing [/usr/local/etc/haproxy/haproxy.cfg:76] : 'server balena_api_1' : could not resolve address 'api'.
haproxy_1        | [ALERT] 233/162324 (16) : parsing [/usr/local/etc/haproxy/haproxy.cfg:82] : 'server balena_registry_1' : could not resolve address 'registry'.
haproxy_1        | [ALERT] 233/162324 (16) : parsing [/usr/local/etc/haproxy/haproxy.cfg:88] : 'server balena_vpn_1' : could not resolve address 'vpn'.
haproxy_1        | [ALERT] 233/162324 (16) : parsing [/usr/local/etc/haproxy/haproxy.cfg:94] : 'server balena_s3_1' : could not resolve address 's3'.
haproxy_1        | [ALERT] 233/162324 (16) : parsing [/usr/local/etc/haproxy/haproxy.cfg:104] : 'server balena_vpn_1' : could not resolve address 'vpn'.
haproxy_1        | [ALERT] 233/162324 (16) : parsing [/usr/local/etc/haproxy/haproxy.cfg:114] : 'server balena_db_1' : could not resolve address 'db'.
haproxy_1        | [ALERT] 233/162324 (16) : parsing [/usr/local/etc/haproxy/haproxy.cfg:129] : 'server balena_vpn' : could not resolve address 'vpn'.
haproxy_1        | [ALERT] 233/162324 (16) : parsing [/usr/local/etc/haproxy/haproxy.cfg:134] : 'server balena_vpn' : could not resolve address 'vpn'.
haproxy_1        | [ALERT] 233/162324 (16) : Failed to initialize server(s) addr.
dfunckt commented 3 years ago

api_1 | standard_init_linux.go:228: exec user process caused: exec format error

This suggests there's an architecture mismatch. What sort of hardware are you deploying openBalena on?

fuji246 commented 3 years ago

I‘m using 64 bits Raspberrypi4, should I use x64?

On Tue, Aug 24, 2021 at 4:27 AM dfunckt @.***> wrote:

api_1 | standard_init_linux.go:228: exec user process caused: exec format error

This suggests there's an architecture mismatch. What sort of hardware are you deploying openBalena on?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/balena-io/open-balena/issues/128#issuecomment-904555915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIA463HTKIRPZTAZCU32OTT6N627ANCNFSM5CTDVPVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

MiroYld commented 8 months ago

Hello, I have the same problem on debian with x86_64 arch

atakantemizkan commented 7 months ago

I have the same issue and I use Raspberry Pi4. Did you solve this problem? @fuji246 @MiroYld @fisehara Is there a possibility that you know this problem and how to solve this problem?

fuji246 commented 7 months ago

No, I did not.

On Tue, Feb 27, 2024, 4:51 AM atakantemizkan @.***> wrote:

I have the same issue and I use Raspberry Pi4. Did you solve this problem? @fuji246 https://github.com/fuji246 @MiroYld https://github.com/MiroYld

— Reply to this email directly, view it on GitHub https://github.com/balena-io/open-balena/issues/128#issuecomment-1966478017, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIA467ZFJHDEBOZ2OBJV5LYVXJFTAVCNFSM5CTDVPVKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGY2DOOBQGE3Q . You are receiving this because you were mentioned.Message ID: @.***>

MiroYld commented 7 months ago

Hello the problem was solved for me. I switched to an Ubuntu 20.04 and DNS resolution works. Also think about your CNAMEs if you have a domain name

atakantemizkan commented 7 months ago

@MiroYld Hello What was your device? Raspberry Pi or something else?

MiroYld commented 7 months ago

@MiroYld Hello What was your device? Raspberry Pi or something else?

Ubuntu server 20.04

ab77 commented 4 months ago

Hello, can you please try again using the latest updates.