Can’t establish a connection to the server at hostname:10000

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.3
Virtualmin version 6.17-3

I am recently returned to Virtualmin, the last time I used it was about 15 years ago, but with the whole GSuite Legacy accounts going away thing happening, it’s time for me to host my own email again. Virtualmin was what I used 15 years ago, and it’s what I’d like to use again, but I’ve been having some trouble.

I’m running into the error in the subject (Can’t establish a connection to the server at hostname:10000) on 100% of attempted page views in the Virtualmin web interface, but oddly, only if I open the page in the current tab, and not in a new tab. Middle clicking anything in the left hand menu, or right clicking anything and opening it in a new tab functions correctly 100% of the time, but then the navigation is missing, or there will be modules with multiple pages that I can’t use correctly, etc.

I’ve tried different browsers, on different operating systems, on different computers, from different networks, from inside and outside the network, with and without a router, on a managed switch and a dumb switch, with a crossed network cable between the host and client and no other hardware involved, but the issue remains the same.

I’ve even installed a GUI on the machine Virtualmin is installed on, and the error remains the same (except replace “hostname” in the error with 127.0.0.1)

I’ve tried on my other server, in case it was a RAM limitation (moving from a machine with 96GB of RAM to a machine with 256GB of RAM), but the issue didn’t go away, as well as installing Virtualmin as a VM on CentOS, and Debian, and Ubuntu, on HyperV, and ESXi, and Proxmox, but the issue remained the same.

I’ve installed Virtualmin on both of my servers using CentOS / Debian / Ubuntu to bare metal, with no hypervisor, still the same issue, “Can’t establish a connection to the server at…” when viewing any page in the web interface, opening the same pages in a new tab works.

My installation procedure each time has been “install OS, install package updates, install Virtualmin from the GPL install.sh”, so it’s always on a “clean” operating system install.

This has led me to believe that the common denominator here is me. That I am doing something wrong. If I’m installing the product on multiple servers, running several hypervisors (or no hypervisor), on several operating systems, and have the exact same issue every time, when searching for others with the same issue and finding nothing helpful has made me decide this is a problem with something I’m doing, and not a problem with something the Virtualmin software is doing. How do I figure out what I am doing wrong so I can use the web interface “normally”?


edit: I’m not against buying Virtualmin Pro if this is more of a “make a real support ticket” kind of thing, I’ve only used the GPL version before as I don’t use it for any “business” purposes, I’ve hosted email for some friends since the late 90s, so I own a bunch of $lastnameFamily.tld type domains that in 2007 or so I moved to GSuite, and now need to move off of GSuite.

Sounds like Virtualmin installed ok as otherwise it would not have displayed at all. You have tested without router etc. but how is your internet dns setup. Is it via router which then allocates internal IP’s and broadcasting dns? If you have used static internal IP, have you forwarded dns and ports. You have updated packages and general installs so obviously internet is there but ports like 80, 8080, 10000 etc may not be forwarded correctly. On your pc client, do you have any firewalls enabled. Any static routes or advance dns setupbthat may interfere?

I have a static internal and external address, and the issue happens even when viewing Virtualmin from the server Virtualmin is installed on, with no network cables even connected to it, when browsing https://127.0.0.1:10000

(network in that case would be Virtualmin installed on server, no network cable plugged in to server, xfce and a web browser installed, visiting localhost / 127.0.0.1 results in error in post title)

I don’t think I have have a firewall / security software issue as the issue is present even when no firewall / router / network connectivity exists.

When testing on client PCs, (a Windows machine, a macOS machine, a Debian machine, an Android phone, and an iPhone) all were tested in a “clean” state with nothing installed but the operating system.

This may or may not be useful, but on the same hardware, Usermin is working as intended, all of the time, and if I install Webmin instead of Virtualmin, that also functions as intended, but I like that Virtualmin makes handling several domains easy and would rather use that than Webmin.

That is odd. Webmin and Usermin work as intended but not Virtualmin. Anything in the server logs that may lead to identifying Virtualmin errors?. Does the server actually resolve to ip address/localhost.

I’m going to give you a “maybe”, because I don’t know what logs I should be looking at.

DNS resolves as I would expect it to, eg. if I do an nslookup inside the private network ‘server’ resolves to 10.10.1.1, which is it’s real address. If I do nslookups outside or inside the private network server.lastname.tld resolves to my correct external IP, all of the ports are forwarded as I’ve been running a family website for 20+ years, moving through several Debian / Ubuntu boxes running LAMP / Webmin (most recently on the same hardware that I’m now having trouble running Virtualmin on, with the probably unsafe practice of allowing ports 10000 and 20000 access from the outside world) so I feel like I “should” be able to use the web interface, as I’ve been using the Webmin interface successfully for literal decades, and have used Virtualmin previously, but now “can’t”, and I have no idea why.

/var/webmin/miniserv.error
/var/webmin/miniserv.log
/var/webmin/webmin.log

I dont use Ubuntu so not sure if the logs above are stored using same path. Perhaps we need to wait for one of the Ubuntu gurus. You should be able to use 10000/20000. Hopefully others can assist more.

DNS can’t have anything to do with anything if you’re connecting to 127.0.0.1:10000. That’s not a name, and no DNS lookup happens when you connect to an IP.

I have no idea what your problem is, but DNS is definitely not it.

My initial method for diagnosing something like this involves a bit of packet tracing…

  • Run Wireshark on your endpoint computer being used to access the v’min site
  • If necessary, use tcpdump from sh/ssh in the v’min server and/or your router

Look at the packet interaction and discover what is going where and what errors are taking place.

You mentioned you had tried different distros and even VMs but get the same ‘error’. Was going to point at the local network adapter or driver, but you have had services running fine on the same server before. Were you able to check the server logs, anything there in terms of errors? You dont have dual ethernet by any chance or multiple adapters bonded?

You don’t have some caching on server somewhere"

SSL ? Could be problem https, when using this in local envirements sometimes things not working as expected is my experience with some other not virtualmnin related testing code… ( some working not working, strange behaviour. ( as you described didn’t solved it then because the software itself didn’t had support for local and didn’t make any sense for my to solve then , if did test on external server than no problem)

So can’t help only pointing to some i did have seen before.

I think if you are sure you do things right, maybe some tests a vps external , if you can’t solve it local?

I also don’t understand this:
“I’ve tried on my other server, in case it was a RAM limitation (moving from a machine with 96GB of RAM to a machine with 256GB of RAM)”

Vmin should work with even less then 4GB internal memory RAM ? ( a looping redirect / repeating trying to (re)connect/sessions whatever somewhere and memory https or so could use up mem if things wrong , but don’t no after how many loops…, is one thing i have seen before also not vmin but a apllication)

And for the REAL local parts (connections) and using name resolution you can use the hosts file(s) to point names to ip’s

~jotst, I don’t have any caching happening (as far as I know), the testing I’m doing before setting up a bunch of imapsync jobs to move everything from GSuite accounts and back into Virtualmin is done on an isolated test network with no hardware other than the server running Virtualmin, and a workstation to log in to it with using a web browser. Both of them with previously blank drives that have nothing on them other than the OS. I’ve read the system requirements, and I’m aware that the amount of RAM I have is well above what is “required”, but when searching the forum, and doing google searches, people seem to have run into this issue because of out of memory problems, which was why I eventually also tried bare metal installs to rule out a hypervisor just not allocating memory to the VM correctly.

I’ve thought of a possible issue with the self signed cert, but the issue remains even if I disable SSL and connect to the server at http://127.0.0.1:10000 instead of with https. (using http instead of https, every page opened not in a new tab fails, every page opened in a new tab works, the same as when using https which is the default behavior)

~Whoops, it’s possible, but I feel unlikely that I have a network card issue, as the issue stayed the same even when installing on multiple servers. I’ve tried installing on an older Supermicro server I have that does have multiple nics (the one with 96GB of RAM), but this is the one that I’ve been running Webmin on for years without issue. (there’s 4 network cards, one was in use, I’d plug a cable into any card during OS install, ignore the other 3, and Webmin would “just work”), however the newer Dell server only has a single card, and I have the same problem.

I haven’t been able to check my logs yet, I went to bed before seeing replies, and we’re headed out of town on vacation, so I’ll take a peek at them on Monday, I do have until May before I really “need” to get things working.

~MrPete, I haven’t done anything with Wireshark, as I still have the issue when connecting to 127.0.0.1 / localhost, and zero packets have crossed a “network”, but I also haven’t touched Wireshark since it was called Ethereal, and only learned about the new name in this thread, so I’d probably have to brush up on what to actually do with it. :slight_smile:

~Joe, I’d agree with this, I know how everyone likes to joke about “it can’t be DNS… it was DNS”, but when using loopback connections to 127.0.0.1, DNS is definitely not in play here.

Better check if the 127.0.0.1:10000 should be working on a box local for Virtualmin, don’t know someone experience with this? ( with your GUI)

Maybe this isn’t suposed to work, or need extra’s , loopback adress is special !!!.. (socket)

Wen doing things local network i alway’s use my own local subnet ip’s but not this 127.0.0.1 , yea i know you can use as , localhost itself , but i don’t like it. :wink:
And hosts file for name’s to ip’s local.

With cache i mean opcache phpfpm combinations as example or other configs like that.
And webbrowsers use sessions like caching things on their own often

LOGS are so important here!

If things in virtualmin are ( hard) coded to use “localhost” somewhere or even domainname, hostname there could be problem then if you use also other ip’s ( in setup) then a internal resolving to the 127.0.0.1. Partly also look in the hosts file. httpd.conf and named,bind and so on

127.0.0.1 is not always the same ip as names are used and resolving local

Could be even a internal conflict internal aplications used to use localhost and 127.0.0.1 combi with the virtualmin interface on port 10000 and browser then, but don’t know about that

Not related maybe but here you have a better english explanation for my first reply here writing about yes no https: and using localhost , ip problems
https://bugs.webkit.org/show_bug.cgi?id=171934#c96

IN VM kinds of configs / installations then better not using the loopback ip , better have routable ip’s then

So maybe the problem are different separate problems and one is that you can’s use att all 127.0.0.1 :10000 and putting things on the wrong path to go for looking for solution for the basic problem

As here ?

Offtopic but i had some webmin virtualmin things related with hsts:
For others not knowing this is related, but if you use some browsers they expect https and if HSTS configured is on now, sometimes the first redirect is not known by the browser and seems not working , try it manually if a https is there next time then browser remember it . (www.nonwww and so on)
(i.e. the first time the request is made, before HSTS can override the request)

I also think newer installations default Virtualmin / Webmin are on port 10000 expecting https / ssl is this correct?

OK, so, I’ve taken a look at the logs mentioned by @Whoops and nothing in them seemed “out of the ordinary”. Log entries for when I look at a page in the same tab and it doesn’t work look the same as log entries as when I open something in a new tab and it does work.

I also noticed, when getting home, logging in, and then clicking on anything to make it break so I could take a look at logs, when walking away to grab a drink and then sit back down, if I just sit there looking at the red “Can’t establish a connection to…” error message, for several minutes, and don’t do anything at all, the box changes to green, says it’s reconnected, and then the page I attempted to click on loads.

This behavior has stayed the same in these circumstances:

  • HTTPS being on or off
  • Using self signed vs LetsEncrypt certificate while HTTPs is on
  • Connecting to my virtualmin host over the internet
  • Connecting to my virtualmin host over a LAN
  • Connecting to it in a “single PC” environment, with a hypervisor running Virtualmin in one VM, and a client with a web browser on another VM, both connected to the same virtual switch with no other network connectivity.
  • Using two PCs on an unmanaged switch (no internet), both bare metal, with a Windows client for the web browser, and a Debian, Ubuntu, and CentOS host running virtualmin
  • Using a single PC for the Virtualmin install and connecting to 127.0.0.1 (with HTTPS both on and off), with a desktop GUI installed from tasksel during the OS installation before Virtualmin installation
  • Using a single PC for the Virtualmin install and connecting to 127.0.0.1 (with HTTPS both on and off), with a desktop GUI installed from tasksel after Virtualmin installation

In every one of these cases, opening links in new tabs works, clicking a link “normally” doesn’t work, UNLESS I sit there and don’t do anything for a couple minutes, in which case the red error banner turns green, that one page works correctly, and then I get another red error banner on the next page, unless I sit there for a few minutes, in which case it turns green and the next page loads, etc.

Also, I only have this issue using Authentic theme, if I switch to Gray Framed Theme (or any other “not Authentic” theme from the past few years, everything works fine.

@joe or @Ilia , would either of you have some suggestions about things I should look for specifically in my logs, I’ve read them all in their entirety, and did “| grep err” in case it made finding errors easier, but everything in my logs, to me at least, seems to say “everything is fine”

Please take care to check in browser console what you see there in all situations.

Sessions, (cookies), and so on

Use some extra tools there as web developer and so.
Some headers and security things i think,
(if settings must be working on (host)name then hostname must no be same as localhost or that loopback ip ( loopbackip could be other then localhostname somewhere…), or such kind of things)

Sometimes header security things “looping” retries, errors, warnings, then nothing blank screen , or partly seems working, but not all, is what i know

Does the old theme work (grey theme, blue theme, or Virtualmin Framed Theme)? None of those do backend JavaScript page and element loading.

Yes, seemingly any “not Authentic” theme seems fine, but it’s very odd that I’d have the issue on so many clients, even cell phones, especially if I install just Webmin (using Authentic) it works as expected. Gray Theme / Blue Theme / the “I’ve uninstalled all of my themes theme” all work. (edit: when using Virtualmin)

On the client browsers it’s just the browser (no extensions), all default settings, right after OS install. I haven’t touched any kind of security or browser settings that should stop Javascript from “being Javascript”.

Even while at a family members house this past weekend on vacation I installed Virtualbox on their PC, set up a quick Debian VM, installed Virtualmin, went to the webui on their PCs browser, and I get the red “no” banner from post title. I then deleted that VM and made a new Debian VM, installed Webmin, opened Webmin in the same browser and everything works.

edit 2: I thought" Virtualmin Framed Theme" was the “I’ve uninstalled every Webmin theme” theme, but was wrong, so I installed the webmin-virtual-server-theme package, and switched to that, and that one is also working.

edit 3: I’ve also just installed Authentic Theme 19.91.1 from github on both my Virtualmin and Webmin test VMs that I have up while asking for help in this thread. Both VMs running Debian 10, same RAM / CPU allotments, using the browser I’m making this post from (MS Edge 100.0.1185.29, no extensions installed) the Webmin host VM has a completely working webui, the Virtualmin host has the issue in the post title.

I don’t mean browser problem, but you can propably see the problem in browser if you look in console devoloper option from browser.

Security headers and such kind are settings on (server) side in combination with browsers and the stuff is used on website if frontend VMIN GUI and theme, as scripts and so.
Same if using HSTS or is set this somewhere.

Sometimes a browser has to remember , and first visit is then wrong for as example hsts and some redirects gives known problem, only first visit. ( also ssl, nonssl or other certs)

EDIT:
The names on loopback ip (localhost is name) are mostly different to the realip where hostname is the name see under network that could give some trouble depening how paths and names in scripts are handle also the security parts.

127.0.0.1 Yes localhost.localdomain , localhost
::1 Yes localhost6.localdomain6 , localhost6

Where then on the real routable ip from box the hostname is the name.

Clearing the theme cache on host not helping?

@ilia it sounds like there’s maybe some assumptions about networking built into Authentic that aren’t correct? I don’t know anything about how connections to the backend are made, but if all other themes work, something is awry.

@ferd.turguson can you show us network errors and javascript errors from the web developer console in your browser? That will tell us what it’s trying to do, and give hints about why it’s failing.

I’ve never used it before, so I had to look up how to use the browser console, but, it shows nothing in the console when the red “Can’t establish a connection to…” banner shows up, and nothing if I just sit there and wait for it to change to green and say…whatever the message in the green box is, it’s there for like a quarter of a second when the page “works”.

The console gets one entry, in the “info” category

> Welcome to Authentic Theme 19.91.1
> https://github.com/authentic-theme/authentic-theme

But no errors, no warnings.