#1 2018-05-14 09:15:55

Trusted Member
Registered: 2015-01-09
Posts: 11

HAProxy script error debian 9 at GestionDBI les vps

This error has been reported previously for debian 8 in this thread https://forum.lowendspirit.com/viewtopic.php?id=3424

Believe the error is present with debian 9 as well.

./NATreverseProxy.sh proxy list
curl: (6) Could not resolve host: .5

As far as I can debug the error is in the awk statement that extracts the venet ip using ifconfig. It returns an empty string with the tralling constant '.5' which doesn't resolve.

near the start of proxy.sh

# Setting of basic variables
# HOSTNODE_ADDRESS=localhost:8000
HOSTNODE_ADDRESS="$(ifconfig venet0:0 | awk -F: '/inet addr:/ { split($2,a,"."); print a[1]"."a[2]"."a[3]; }').5"

for reference o/p of ifconfig venet0:0 (IP redacted)

ifconfig venet0:0
venet0:0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP>  mtu 1500
        inet xxx.xx.xx.xx  netmask  broadcast xxx.xx.xx.xx  destination xx.xx.xx.xx
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 0  (UNSPEC)


Board footer

Powered by FluxBB