Easy Installer from Local Web Server Announced via Zeroconf not working

I am trying to configure the Toradex Easy Installer to search images using avahi zeroconf. For this, I downloaded the Easy Installer version ToradexEasyInstaller_5.4.0+build.4. I followed the instructions pointed out in Detailed Manual | Toradex Developer Center.

When I start the VNC Viewer and click at the Feeds tab, following dialog gets displayed:

When hitting the OK Button, following error gets displayed (Error downloading image list: Connection refused):

What could be the reason for this issue?

This is the content of the image_list.json file:

emb-sys@ubuntu:~$ cat /var/www/html/image_list.json 
{ 
	"config_format": 1,
	"images": [
		"Tezi_1.0.0-devel-20211005065744+build.0/image.json"
		]
}

This is the directory structure:

emb-sys@ubuntu:~$ tree /var/www/html
/var/www/html
├── image_list.json
├── index.nginx-debian.html
└── Tezi_1.0.0-devel-20211005065744+build.0
    ├── embsys-connectivity-node.tar.xz
    ├── image.json
    ├── marketing.tar
    ├── prepare.sh
    ├── toradexlinux.png
    ├── u-boot.imx
    ├── u-boot-initial-env
    └── wrapup.sh

This is the content of the tezi.service file

emb-sys@ubuntu:~$ cat /etc/avahi/services/tezi.service 
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name replace-wildcards="yes">Custom Toradex Easy Installer Feed</name>
  <service>
    <type>_tezi._tcp</type>
    <port>12345</port>
    <txt-record>name=Custom Toradex Easy Installer Feed</txt-record>
    <txt-record>path=/var/www/html/image_list.json</txt-record>
    <txt-record>enabled=1</txt-record>
    <txt-record>https=0</txt-record>
  </service>
</service-group>

The host PC is Ubuntu 20.04.3 LTS.

The SOM is running on an custom carrier board, which is inherited from the Colibri Eval Board 3.2B. The processor is a Colibri iMX7D 1GB V1.1A and the OS is based on 5.2.0-devel-202103. The kernel version is 5.4.91-5.2.0-devel+git.c59b3c2da1e9.

One more hint: When setting up a nginx web server as described in Detailed Manual | Toradex Developer Center I am able to see the available images from this web server. So I believe, there is no firewall issue which rejects the requests.

Thanks on any hints you can provide.

Hello @Robbie,

Greetings!

We could try to isolate the source of the issue by trying a couple of things out.

Could you maybe serially log into the Easy Installer on the SOM and try to ping the local workstation? Could you try to maybe specify the port as 8080, as the default HTTP port is 8080?
One more thing to try would also be to download the files (image_list.json) from the http server to the module using wget ?

BR, Janani

Hello @saijanani.tx,

Thank your for the reply.

Could you maybe serially log into the Easy Installer on the SOM and try to ping the local workstation?

The ping to my local workstation works fine from the SOM.

/ # ping 192.168.11.200
PING 192.168.11.200 (192.168.11.200): 56 data bytes
64 bytes from 192.168.11.200: seq=0 ttl=64 time=0.539 ms
64 bytes from 192.168.11.200: seq=1 ttl=64 time=0.682 ms

I changed the port to 8080 and restarted the avahi-daemon with sudo systemctl restart avahi-daemon. The content of this file is now:

emb-sys@ubuntu:~$ cat /etc/avahi/services/tezi.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name replace-wildcards="yes">Custom Toradex Easy Installer Feed</name>
  <service>
    <type>_tezi._tcp</type>
    <port>8080</port>
    <txt-record>name=Custom Toradex Easy Installer Feed</txt-record>
    <txt-record>path=/var/www/html/image_list.json</txt-record>
    <txt-record>enabled=1</txt-record>
    <txt-record>https=0</txt-record>
  </service>
</service-group>

But still the same error gets displayed in the VNC Viewer.

I can not use wget on the uploaded TEZI image in the SOM as it is not installed.

/ # wget --help
sh: wget: not found

But using wget on the “normal” image in the SOM, following gets displayed:

root@colibri:~$ ping 192.168.80.12
PING 192.168.80.12 (192.168.80.12): 56 data bytes
64 bytes from 192.168.80.12: seq=0 ttl=64 time=1.070 ms
64 bytes from 192.168.80.12: seq=1 ttl=64 time=1.026 ms
…
— 192.168.80.12 ping statistics —
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 1.026/1.048/1.070 ms

root@colibri:~$ wget -S http://192.168.80.12:8080/var/www/html/image_list.json
Connecting to 192.168.80.12:8080 (192.168.80.12:8080)
wget: can’t connect to remote host (192.168.80.12): Connection refused

Any other ideas what is wrong? Maybe the path in the wget isn’t correct?

wget: can’t connect to remote host (192.168.80.12): Connection refused
Your HTTP server is down !
Search in the HTTP server settings (and logs)

1 Like

Thanks @MariusM for the reply.

According to this description, I assumed that it would be sufficient to configure and start only the avahi-daemon accordingly. Is that correct? Or do I need to run an additional web server (I thought that the avahi-daemon would do this).

I understand this sentence:
You need to set up a web server that self announces itself via Zeroconf.
like this:

  1. create http server
  2. create web page based on “path” from “XML”

very interesting technology, I have to check it out
“autoinstall” is especially interesting

I understand the following sentence from the document that the avahi-daemon will create implicitly a web server when adding an AVAHI service to /etc/avahi/services. But maybe I am wrong with my understanding…?

To announce a Toradex Easy Installer image server add an AVAHI service to /etc/avahi/services with the following content

Then the question is, why should I use an avahi-daemon, if a separate web server (e.g. nginx) could serve the same functionality?

nginx is HTTP server (listen on port 80 and send html to client)
avahi zeroconf help finds the HTTP server ( you don’t know the IP/hostname/dns_name but you can find it )

1 Like

@MariusM : Thank you for your inputs :slight_smile: :+1:

@Robbie : I would agree with what what MariusM has said above. I hope this helps you.

Thank you & BR, Janani

Thank you, @MariusM and @saijanani.tx for clarifying this. :+1: