Azure / azure-iot-operations

The official repo for Azure IoT Operations.
MIT License
20 stars 16 forks source link

No connection could be made because the target machine actively refused it #33

Open BillmanH opened 5 months ago

BillmanH commented 5 months ago

Deploying in a Virtual Machine, for demo purpose.

**********************
Windows PowerShell transcript start
Start time: 20240118154935
Username: vm-demo-lam\lamadmin
RunAs User: vm-demo-lam\lamadmin
Configuration Name: 
Machine: vm-demo-lam (Microsoft Windows NT 10.0.20348.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Process ID: 4788
PSVersion: 5.1.20348.2227
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.20348.2227
BuildVersion: 10.0.20348.2227
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\Users\lamadmin\aksedgedlog-240118-1549.txt
Step 1 : Azure/AKS-Edge repo setup
Loading AksEdgeDeploy module from C:\Users\lamadmin\AKS-Edge-main\tools\modules..
HostOS  : Microsoft Windows Server 2022 Datacenter Azure Edition(407) 
Version : 10.0.20348.2227 
Lang    : en-US 
Name    : vm-demo-lam
Total CPUs      : 2
Free RAM / Total RAM    : 2 GB / 4 GB
Free Disk / Total Disk  : 114 GB / 126 GB
Running as a virtual machine
in Azure environment
(Name= vm-demo-lam
vmSize= Standard_B2s
offer= WindowsServer
sku= 2022-datacenter-azure-edition )
with Nested Hyper-V enabled
Network Adapters    :
Ethernet(Up),

VPN Profile     : None
AKS Edge Essentials - K3s 1.4.109.0 is installed.
AksEdge version         : 1.4.109.0
AksEdgeShell  version   : 1.0.230221.1000
AksEdgeDeploy version   : 1.0.231205.1000
Hyper-V is enabled
Step 2: Download, install and deploy AKS Edge Essentials
AksEdgeDeploy version: 1.0.231205.1000
HostOS  : Microsoft Windows Server 2022 Datacenter Azure Edition(407) 
Version : 10.0.20348.2227 
Lang    : en-US 
Name    : vm-demo-lam
Total CPUs      : 2
Free RAM / Total RAM    : 2 GB / 4 GB
Free Disk / Total Disk  : 114 GB / 126 GB
Running as a virtual machine
in Azure environment
(Name= vm-demo-lam
vmSize= Standard_B2s
offer= WindowsServer
sku= 2022-datacenter-azure-edition )
with Nested Hyper-V enabled
Network Adapters    :
Ethernet(Up),

VPN Profile     : None
AKS Edge Essentials - K3s 1.4.109.0 is installed.
AksEdge version         : 1.4.109.0
Running Install-AksEdgeHostFeatures
 - Checking host for required features
 - Checking the status of 'Microsoft-Hyper-V'
 - Checking the status of 'Microsoft-Hyper-V-Management-PowerShell'
 - Checking the status of 'VirtualMachinePlatform'
 - Checking the status of 'OpenSSH.Client*'
 - Checking power management settings of the Host
 - Checking HNS version of the Host
 - Checking OpenSSH version of the Host
 - Checking Nested Virtualization of the Host
 - This platform does not have Nested Virtualization supported.
 - Please use a virtual machine with Nested Virtualization supported.
SingleMachine cluster uses internal switch. Nothing to test.

--- Verifying AksEdge VM Deployment Configuration...
--- Verifying EULA...
* EULA accepted.
* Optional telemetry accepted.
*** No errors found in the Deployment Configuration.
Starting AksEdge VM deployment...
 - Checking host for required features
 - Checking the status of 'Microsoft-Hyper-V'
 - Checking the status of 'Microsoft-Hyper-V-Management-PowerShell'
 - Checking the status of 'VirtualMachinePlatform'
 - Checking the status of 'OpenSSH.Client*'
 - Checking power management settings of the Host
 - Checking HNS version of the Host
 - Checking OpenSSH version of the Host
 - Checking Nested Virtualization of the Host
 - This platform does not have Nested Virtualization supported.
 - Please use a virtual machine with Nested Virtualization supported.

[01/18/2024 15:50:04]
Host doesn't support AksEdge or is missing required features for deployment. Try to use the command: Install-AksEdgeHostFeatures.
Error: AksEdge VM deployment failed with the below error message.
Error message : .
Deployment Successful.
Step 3: Connect the cluster to Azure

Creating resource group: demo_lam
Registering the required resource providers for AIO

Arc enable the kubernetes cluster iot-demo-lam
Associate Custom location with iot-demo-lam cluster
Step 4: Prep for AIO workload deployment
Deploy local path provisioner
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
Successfully deployment the local path provisioner
Configuring firewall specific to AIO
firewall rule for AIO MQTT Broker exists, skip configuring firewall rule...
Configuring port proxy for AIO
PS>TerminatingError(): "C:\Program Files\AksEdge\nodectl.exe  compute vm list -o tsv --query "[?tags.keys(@).contains(@,'9f0ea5f3-5769-47e3-b504-2afacd1fef0f')].name" failed to execute [Error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:45000: connectex: No connection could be made because the target machine actively refused it."]"
>> TerminatingError(): "C:\Program Files\AksEdge\nodectl.exe  compute vm list -o tsv --query "[?tags.keys(@).contains(@,'9f0ea5f3-5769-47e3-b504-2afacd1fef0f')].name" failed to execute [Error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:45000: connectex: No connection could be made because the target machine actively refused it."]"
>> TerminatingError(): "C:\Program Files\AksEdge\nodectl.exe  compute vm list -o tsv --query "[?tags.keys(@).contains(@,'9f0ea5f3-5769-47e3-b504-2afacd1fef0f')].name" failed to execute [Error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:45000: connectex: No connection could be made because the target machine actively refused it."]"
>> TerminatingError(): "C:\Program Files\AksEdge\nodectl.exe  compute vm list -o tsv --query "[?tags.keys(@).contains(@,'9f0ea5f3-5769-47e3-b504-2afacd1fef0f')].name" failed to execute [Error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:45000: connectex: No connection could be made because the target machine actively refused it."]"

[01/18/2024 15:50:54]
Exception Caught!!!
 - C:\Program Files\AksEdge\nodectl.exe  compute vm list -o tsv --query "[?tags.keys(@).contains(@,'9f0ea5f3-5769-47e3-b504-2afacd1fef0f')].name" failed to execute [Error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:45000: connectex: No connection could be made because the target machine actively refused it."] (AksEdge-Core.psm1: line 5359)
Error: port proxy update for AIO failed
**********************
Windows PowerShell transcript end
End time: 20240118155054
**********************

Interestingly that's different from what's in the actual terminal out:

Registering the required resource providers for AIO
Arc enable the kubernetes cluster iot-demo-lam
E0118 15:50:31.700518    2268 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
E0118 15:50:34.103239    2268 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
E0118 15:50:36.436354    2268 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
E0118 15:50:38.769519    2268 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
E0118 15:50:41.112547    2268 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
WARNING: This operation might take a while...

How is it that a connection to localhost was actively refused? Any idea how to remedy?

meenag16 commented 5 months ago

@BillmanH we are investigating this and will get back to you ASAP

meenag16 commented 5 months ago

@BillmanH here are some suggestions from the team for this issue:

Let me know if this helps