Hopsworks-installer.sh kagent:defaut register host error

During my installation of Hopsworks with Hopsworks-installer.sh v2.4 on-prem on a Ubuntu 18.04.6 LTS server.
I got the following error during the kagent:default installation:

e[0m  * kagent_hopsify[Register Host] action register_host
    * bash[Register Host with Hopsworks] action run
      e[0m
      ================================================================================e[0m
      e[31mError executing action `run` on resource 'bash[Register Host with Hopsworks]'e[0m
      ================================================================================e[0m
      
e[0m      Mixlib::ShellOut::ShellCommandFailede[0m
      ------------------------------------e[0m
      Expected process to exit with [0], but received '1'
e[0m      ---- Begin output of "bash"  "/tmp/chef-script20211202-28854-rnoieg" ----
e[0m      STDOUT: time="2021-12-02T17:02:23Z" level=info msg="Executing host command"
e[0m      time="2021-12-02T17:02:23Z" level=info msg="Server url https://138.245.39.122:443"
e[0m      time="2021-12-02T17:02:24Z" level=info msg="Successfully logged in"
e[0m      time="2021-12-02T17:02:24Z" level=error msg="Failed to perform HTTP operation - status: 404 Retrying... {\"type\":\"restApiJsonResponse\",\"errorCode\":100025,\"errorMsg\":\"Host was not found.\",\"usrMsg\":\"hostname: srvchildre22\"}"
e[0m      time="2021-12-02T17:02:25Z" level=error msg="Failed to perform HTTP operation - status: 404 Retrying... {\"type\":\"restApiJsonResponse\",\"errorCode\":100025,\"errorMsg\":\"Host was not found.\",\"usrMsg\":\"hostname: srvchildre22\"}"
e[0m      time="2021-12-02T17:02:26Z" level=error msg="Failed to perform HTTP operation - status: 404 Retrying... {\"type\":\"restApiJsonResponse\",\"errorCode\":100025,\"errorMsg\":\"Host was not found.\",\"usrMsg\":\"hostname: srvchildre22\"}"

My /etc/hosts:

127.0.0.1 localhost
127.0.1.1 srvchildre22

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I am grateful for any hints. In a different Ubuntu VM 18.04, i didn’t get this error during the installation.

I figured it out, the host srvchidre22 was set to reach 127.0.0.1 and server runs on IP 138.245.39.122 but not localhost. So I change the host name to point to the local DNS name to be resolved to host ip, than it works.