Closed MenaceSan closed 3 years ago
I think you need to speak to the authors of that container.
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked
Actual behavior
calls to INetworkListManager GetConnectivity in mcr.microsoft.com/windows:20H2 fail INetworkListManager Network calls are not working in Docker: mcr.microsoft.com/windows:20H2 https://hub.docker.com/_/microsoft-windows
INetworkListManager GetConnectivity returns 0x80070422 = The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
netprofm service is not running by default in this image. setting its status to Automatic Set-Service 'netprofm' -StartupType Automatic now fails differently. 0x8007042c = ERROR_SERVICE_DEPENDENCY_FAIL = The dependency service or group failed to start.
Expected behavior
INetworkListManager GetConnectivity should return a value > 3 to indicate ipv4 or ipv6 is available.
Information
Steps to reproduce the behavior
optionally i can call: (in a powershell connection to the VM)
Set-Service 'wmiApSrv' -StartupType Automatic Set-Service 'nlasvc' -StartupType Automatic Set-Service 'netprofm' -StartupType Automatic Start-Service 'netprofm' Start-Service 'wmiApSrv' Start-Service 'nlasvc'
rem re-run TestNetStatus and we now get 3 (NLM_CONNECTIVITY_IPV4_NOTRAFFIC). (Still no connectivity)
Tests:
wget google.com REM this will fail since it uses ie ?
rem prevent possible IE popup from blocking us.
$keyPath = 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main' if (!(Test-Path $keyPath)) { New-Item $keyPath -Force | Out-Null } Set-ItemProperty -Path $keyPath -Name "DisableFirstRunCustomize" -Value 1
rem OK but does not fix status problem
wget google.com rem wget now works but its possibly unrelated to INetworkListManager failure.
Test a different docker image: docker run --rm mcr.microsoft.com/dotnet/framework/samples:dotnetapp rem stops immediately with no messages.
docker pull mcr.microsoft.com/powershell/test-deps rem fails with: Error response from daemon: manifest for mcr.microsoft.com/powershell/test-deps:latest not found: manifest unknown: manifest tagged by "latest" is not found
TestNetStatus Sources:
// TestNetStatus.cpp : This file contains the 'main' function. Program execution begins and ends there. // This tests the network connectivity the same way that UDC does. // This currently fails in Docker using image mcr.microsoft.com/windows:20H2
include // HRESULT
include // std::cout
include // std::to_string
include
include
include // CComPtr
include // INetworkListManager
include
HANDLE g_hLogFile = NULL;
void LogLine(std::string s) { ::OutputDebugStringA(s.c_str()); ::OutputDebugStringA("\n");
}
template< typename T > std::string to_hexstr(T i) { std::stringstream stream; stream << "0x" << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex << i; return stream.str(); }
int main() { g_hLogFile = ::CreateFileA("c:\temp\TestNetStatus.log", GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL ) ; if (g_hLogFile != NULL) { ::SetFilePointer(g_hLogFile, 0, nullptr, SEEK_END); }
if 1
endif
}