A remote resource is failing to fetch

Just moved to Linux (MX Linux) fully last weekend. With the adblock package enabled, this one instance fails when I run the hugo, hugo --gc or equivalent commands. I would like to know if this is something that is happening (or can be rectified) on Hugo’s end?

ERROR error calling resources.GetRemote: Get "https://gc.zgo.at/count.js": dial tcp connect: connection refused

This has nothing to do with Hugo, and the URL is fine. This works as expected:

{{ $url := "https://gc.zgo.at/count.js" }}
{{ with resources.GetRemote $url }}
  {{ with .Err }}
    {{ errorf "%s" . }}
  {{ else }}
    {{ .Content }}
  {{ end }}
{{ else }}
  {{ errorf "Unable to get remote resource %q" $url }}
{{ end }}

An IP address “” would make me suspicious. gz.zgo.at has two real IP-addresses, according to nslookup.

The adblock application that MX Linux has is pre-installed. So, it somehow blocks access to this remote resource only! Other remote resources work fine with resources.Get. Since the adblock uses a hosts file, I am unsure if somehow that is to blame.

Why would an “adblock” program change the IP address when you run Hugo? It should only block what a browser tries to download, not any URL it sees fit used by any other app. Not to mention that this tool has apparently not been updated in the last six years:

In my opinion, this stuff is bad. Nothing should modify /etc/hosts behind your back. And all that is, of course, not related to Hugo in any way. Just restore your old /etc/hosts file and stop using this program. If you want to block ads, install an ad blocker in your browser.

1 Like

They moved to Gitlab. This one blocks things for all apps (according to my understanding). So, I still prefer to use it.

I am also clueless. The issue does not occur every time, but when it does, it shows the error I posted failing the build. The adblock was the one to blame!

EDIT: I found the link was added to the etc/hosts and removed it!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.