Groups | Search | Server Info | Login | Register


Groups > comp.mobile.android > #148533

Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry

From Marion <marion@facts.com>
Newsgroups alt.comp.os.windows-11, alt.comp.os.windows-10, comp.mobile.android
Subject Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry
Date 2025-05-20 20:01 +0000
Organization BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID <100in27$19j9$1@nnrp.usenet.blueworldhosting.com> (permalink)
References (3 earlier) <m8p9faFl317U2@mid.individual.net> <10085cf$g9p$1@nnrp.usenet.blueworldhosting.com> <m8qq4qFsg3dU1@mid.individual.net> <100b9e7$2upp$1@nnrp.usenet.blueworldhosting.com> <m8u3aiFf0v5U1@mid.individual.net>

Cross-posted to 3 groups.

Show all headers | View raw


On Wed, 21 May 2025 02:16:23 +0800, Mr. Man-wai Chang wrote :


> Did you activate Hyper-V in that PC? Or was it someone else? Maybe you 
> or that person forgot what had done....

Thanks for caring enough to ask for an explanation, which only came to me
belatedly once I had finally figured out what was screwing up the boots
over the years.

The problem won't affect most people I think 'cuz most people don't have a
need to reserve specific ports, but I had that need so it affected me.

Every once in a while either adb or stunnel would have its ports locked up.
This only happened after a boot. And it went away after a reboot.

What frustrated me is I *hate* when I don't know why something is
happening. I strive to understand what's the reason for such things.

Most people would blame Aliens, God or the (insert desired minority here).

I had blamed Microsoft Update because my machine boots after MS updates,
but it had nothing to do with the Microsoft Update, per se (other than my
machine boots after a MS update).

What I didn't know, for years, was each time my machine booted, winnat
reserved 13 random blocks of 100 ports for Hyper-V but these ports were
NEVER used (since I don't use Hyper-V).

The main reason it took me a couple of years to figure this out was simply
that a reboot almost always fixed the problem, and two reboots always did.

Another reason for it having taken years to debug is there is no debugging
command you can possibly run that tells you who is "using" those ports -
since nobody is using them - they're only excluded - they're never used.

Looking back, there's no doubt I must have enabled Hyper-V when doing some
testing, perhaps of Docker (which I find to be an abomination) or WSL
(where I wrote a couple of tutorials to help people set up WSL on Windows).

Having enabled Hyper-V, I didn't know it at the time but that locks up 1300
random ports, which only sometimes conflict with the ports set for Stunnel.

If you ask why I need to use Stunnel, it's simply because my "newsreader"
is gVIM as a front end, and a bunch of telnet scripts as the back end. 

For encryption, it uses Stunnel (but I probably should port it to OpenSSL).
And with Stunnel, you need to explicitly set the port for each server.
 C:\> telnet localhost 55563
      [Mixmin]
      client = yes
      accept = localhost:55563
      connect = news.mixmin.net:563
      CAfile = ca-certs.pem
      verifyChain = yes
      checkHost = news.mixmin.net
      OCSPaia = yes
The reason for all this is simply that I want to use gVIM as my editor.

The adb port of 55555 was reserved for a different reason, which I had
forgotten about, when I was valiantly trying to work around Android
security.

While ADB used port 5555 for years (and more recently port 5037) over USB,
around Android 10 or 11 time frame ADB allowed Wi-Fi using ports in the
35000 to 55000 range (or so - I forget the actual range that it used).

I love using adb with Android (because it enables Windows & Android to be
one filesystem much as dual booting with Ubuntu manages to do the same).

So I was valiantly trying to get around the inconvenience of having to LOOK
at the Android phone to set the port for adb over Wi-Fi - but since that's
a security measure - even I was unable to get around that Android security.

Since I changed the port that adb uses (from 5037 to 55555) and it still
worked after many reboots, I eventually forgot I had changed the adb port.

The only time the problem came up was during these random port assignments.
And that port lockup only happened once every month or so.
And since that port lockup was already happening with Stunnel after
reboots, I didn't think that the adb issue was a separate problem.

And it wasn't.
In the end, the solution for the NEXT PERSON (which is what Usenet is all
about), is if you need to use a port, then you probably should reserve it
first. Then set it. 

If you reserve it first, then winnat will choose a different set of ports.
But if you do not reserve it, and if you ever set Hyper-V, then winnat will
eventually clobber the port you wanted to use.

Lesson learned.
Who knew?
Not me.

The moral of the story is if you turn on Hyper-V and if you need to use
select ports, then you will want to reserve those ports ahead of time.

Back to comp.mobile.android | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Marion <marion@facts.com> - 2025-05-06 22:24 +0000
  Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Arno Welzel <usenet@arnowelzel.de> - 2025-05-09 09:05 +0200
    Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Marion <marion@facts.com> - 2025-05-09 10:12 +0000
      Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Arno Welzel <usenet@arnowelzel.de> - 2025-05-16 19:03 +0200
        Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Marion <marion@facts.com> - 2025-05-16 19:58 +0000
          Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Arno Welzel <usenet@arnowelzel.de> - 2025-05-17 08:54 +0200
            Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Marion <marion@facts.com> - 2025-05-18 00:25 +0000
              Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Arno Welzel <usenet@arnowelzel.de> - 2025-05-18 14:49 +0200
                Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Marion <marion@facts.com> - 2025-05-20 20:01 +0000
                Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Marion <marion@facts.com> - 2025-05-21 04:13 +0000
                Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Marion <marion@facts.com> - 2025-05-21 04:21 +0000
                Re: Warning: If you use adb or stunnel & if you enable Hyper-V (e.g., WSL, Docker, VMs, etc.) you will be sorry Andy Burns <usenet@andyburns.uk> - 2025-05-21 07:57 +0100

csiph-web