Am 2021-05-27 um 11:52 schrieb Mark Thomas:
Michael,

I think we need to step back a bit.

I am unable to recreate the issue you describe. I am using:

- Windows Server 2019
- IPv6 enabled (and IPv4 and both have addresses)
- Apache Tomcat 9.0.46
- Apache Tomcat Native 1.2.28
- AprLifecycleListener is enabled
- No address configured for Connector
- Logs confirm http-apr-8080

I can access the default home page via both IPv4 and IPv6 from both the local machine and remotely.

<snip/>

On 25/05/2021 18:23, Michael Osipov wrote: >>> * Windows 8+ or Windows Server 2016/2019
* Have at least IPv6 available, no IP addresses necessary, ::1 is sufficient * Any Tomcat with libtcnative 1.2.28 with the DLL compiled by Mark Thomas. * Start Tomcat with the AprLifecycleListener and make sure that no address (hostname) is set.

I think I have replicated the above but obviously I have missed something. What do I need to do to recreate your results?

Please try my simple program from this gist: https://gist.github.com/michael-o/dfb86df472f62d2b2dff6ef12ee3758e

Vanilla DLL on Windows 10:
PS Z:\> java "-cp" 
".;C:\Entwicklung\Projekte\tomcat-native\dist\tomcat-native-1.2.29-dev.jar" 
"-Djava.library.path=C:\Entwicklung\Programme\apache-tomcat-9.0.46\bin" AprTest
libtcnative version: 1.2.28, libapr version 1.7.0
hostname: null, family: 2, next: 522994096
setsockopt IPV6_V6ONLY status: 70023
socket bind status: 0
socket listen status: 0

An IPv6 only socket is bound because default is 1 on the socket option and one cannot set to 0:
PS C:\Users\osipovmi> netstat -a  | Select-String -Pattern 8888

  TCP    [::]:8888              md2pcvtc:0             ABHÖREN


then compiled with patches:
PS Z:\> java "-cp" 
".;C:\Entwicklung\Projekte\tomcat-native\dist\tomcat-native-1.2.29-dev.jar" 
"-Djava.library.path=C:\Entwicklung\Projekte\tomcat-native\native\WIN7_X64_DLL_RELEASE" AprTest
libtcnative version: 1.2.29-dev, libapr version 1.7.1-dev
hostname: null, family: 2, next: 523321776
setsockopt IPV6_V6ONLY status: 0
socket bind status: 0
socket listen status: 0

An IPv6 socket with dual-stack has been bound:
PS C:\Users\osipovmi> netstat -a  | Select-String -Pattern 8888

  TCP    0.0.0.0:8888           md2pcvtc:0             ABHÖREN
  TCP    [::]:8888              md2pcvtc:0             ABHÖREN


Please note that I have IPv6 enabled, but no IP addresses configured. By default only ::1 is present.

Addresses:
PS C:\Users\osipovmi> Get-NetIPAddress | Format-Table

ifIndex IPAddress                                       PrefixLength 
PrefixOrigin SuffixOrigin AddressState PolicyStore
------- ---------                                       ------------ 
------------ ------------ ------------ -----------
1       ::1                                                      128 WellKnown  
  WellKnown    Preferred    ActiveStore
20      169.254.228.218                                           16 WellKnown  
  Link         Tentative    ActiveStore
32      192.168.58.193                                            28 Manual     
  Manual       Preferred    ActiveStore
15      169.254.26.74                                             16 WellKnown  
  Link         Tentative    ActiveStore
18      169.254.76.82                                             16 WellKnown  
  Link         Tentative    ActiveStore
22      169.254.155.142                                           16 WellKnown  
  Link         Tentative    ActiveStore
21      192.168.1.23                                              24 Dhcp       
  Dhcp         Preferred    ActiveStore
1       127.0.0.1                                                  8 WellKnown  
  WellKnown    Preferred    ActiveStore

Does this help?

M


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to