Wednesday, August 16, 2023

Doing winget install fails with a message "Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a15005e : The server certificate did not match any of the expected values."

Doing winget install fails with a message "Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a15005e : The server certificate did not match any of the expected values."

I tried to install Windows Terminal using the command below -
C:\>winget install Microsoft.WindowsTerminal
But got the following error message instead.
Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a15005e : The server certificate did not match any of the expected values.
The following packages were found among the working sources.
Please specify one of them using the --source option to proceed.
Name             Id                        Source
-------------------------------------------------
Windows Terminal Microsoft.WindowsTerminal winget
Reason:
This is normally caused by SSL inspection used in enterprise environments.
Workaround:
C:\>winget settings --enable BypassCertificatePinningForMicrosoftStore

See below for details:
https://github.com/microsoft/winget-cli/issues/2879

Monday, August 14, 2023

Minimal OPC UA client that auto generates self signed certificate on startup in C#

Minimal OPC UA client that auto generates self signed certificate on startup in C#

This is minimal OPC UA client in C# that demonstrates self signed certificate auto generation on startup.
Pre-Req

Steps
Full working code can be found here.

Saturday, August 12, 2023

OPC UA Read service using C#

OPC UA Read service using C#

This is a sample bare bones OPC UA C# application performing a Read service.
Pre-Req

Steps
Full working code can be found here.

Batch convert file line ending from Windows to Linux using Notepad++

Batch convert file line ending from Windows to Linux using Notepad++

Working on cross-platform project means you have to be careful with file line endings. If for some reason the files were not using the correct line endings Notepad++ can be used to do batch conversion of the files. To do so, open Find in Files (Ctrl+Shift+F) and use the following options:
Find what: (\r\n)
Replace with : \n
Filters : *.*
Directory : C:\Temp
Search Mode: (o) Regular expression

ESXi 6.5.0 fails to start a VM with a message "Maximum virtual machines limit reached: ## (#### worlds)"

Maximum virtual machines limit reached: ## (##### worlds)

ESXi 6.5.0 by default determines the maximum number of VMs dynamically at runtime. In certain scenarios this might be too conservative and you will not be able to start a virtual machine. If you are observing a message like below when starting a VM then you have hit the limit.
Maximum virtual machines limit reached: ## (##### worlds).
This behavior is controlled by VMkernel.Boot.maxVMs in Advanced settings. Change this to a value that might be reasonable based on CPU, memory and network capacity. The same setting can be changed from SSH shell like below:
[root@localhost:~] esxcli system settings kernel set -s maxVMs -v 1024
Reboot the server for this change to take effect.
Tag: ESXi

Saturday, July 15, 2023

Running OPC UA .Net Standard PubSub reference server on Ubuntu 22.04 using dotnet-sdk-6.0

Running OPC UA .Net Standard PubSub reference server on Ubuntu 22.04 using dotnet-sdk-6.0

System info:
OS: Ubuntu 22.04
OPC UA .Net Standard under test: 1.4.371.96

Install MQTT broker

$: sudo apt install mosquitto

Install dotnet-sdk-6.0

$: sudo apt install dotnet-sdk-6.0

Install git as needed

$: sudo apt install git

Clone OPC UA .Net Standard git repo

$: mkdir ~/prj
$: cd ~/prj
$: git clone https://github.com/OPCFoundation/UA-.NETStandard.git
$: cd UA-.NETStandard
$: git checkout refs/tags/1.4.371.96

Run publisher

$: dotnet run --project Applications/ConsoleReferencePublisher/ConsoleReferencePublisher.csproj --framework net6.0

Run subscriber (on another terminal)

$: cd ~/prj/UA-.NETStandard
$: dotnet run --project Applications/ConsoleReferenceSubscriber/ConsoleReferenceSubscriber.csproj --framework net6.0

Installing QNX 6.4.1 on Ubuntu 20.04

Installing QNX 6.4.1 on Ubuntu 20.04 Install pre-requisites $: sudo dpkg --add-architecture i386 $: sudo apt update $: sudo apt install li...