Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when starting the emulator in Podman #21

Closed
kacety123 opened this issue Jun 26, 2024 · 6 comments
Closed

Errors when starting the emulator in Podman #21

kacety123 opened this issue Jun 26, 2024 · 6 comments

Comments

@kacety123
Copy link

Hi all,

Currently attempting to run this emulator on Podman desktop v 1.10.3 via Windows

After getting the containers up in podman and starting the run, the errors attached are received in the emulator logs:

PlatformNotSupportedException and NullReferenceException

Have attempted to uninstall and completely reinstall everything from podman through to the emulator. No success.
Unable to replicate the issue on another machine so far.

(sorry this thing won't let me input my screenshot of the errors)

@krishankumar95
Copy link
Contributor

krishankumar95 commented Jun 27, 2024

@kacety123 ;
Can you please share the console logs and file logs from the container at:

/home/app/EmulatorLogs/*.log

Also need few more details:
a) Windows Version
b) WSL Version
c) Emulator launch method.

If you are launching via the default bundling Windows script (LaunchEmulator.ps1) it requires updating few commands as:
Following docker compose commands change to podman compose commands :

docker compose -f $composeFile down
docker compose -f $composeFile up -d
podman compose -f $composeFile down
podman compose -f $composeFile up -d

With the above changes Emulator should launch successfully :

image

@kacety123
Copy link
Author

kacety123 commented Jun 27, 2024

Hi yes so no success at getting the logs from the file but here is the information you were asking for:

Windows 11 22H2
Wsl version is 2
Launch method: docker

Logs from the emulator running:

[12:38:45 WRN] <Trc Id="60006" Ch="Debug" Lvl="Warning" Kw="1000000000011110" UTC="2024-06-27T12:38:45.748Z" Msg="An exception was handled at TenantCacheComponent.OnEndRefresh. Exception message ExceptionId: 4e48e70c-55c1-4a17-8431-c0c92acce328-System.NullReferenceException: Object reference not set to an instance of an object.&#xA;   at a.a.aaX.z(IAsyncResult)." />
[12:38:45 WRN] <Trc Id="60000" Ch="Operational" Lvl="Warning" Kw="4000000000011110" UTC="2024-06-27T12:38:45.785Z" Msg="Exception occurred while creating performance counters. Exception message &amp;apos;System.PlatformNotSupportedException: Performance Counters are not supported on this platform.&#xA;   at System.Diagnostics.PerformanceData.CounterSet..ctor(Guid providerGuid, Guid counterSetGuid, CounterSetInstanceType instanceType)&#xA;   at h.hM.ad()&#xA;   at h.hM.ab()&#xA;   at h.hh.A(PerformanceCounterLevel)&amp;apos;." />
[12:38:46 WRN] <Trc Id="60000" Ch="Operational" Lvl="Warning" Kw="4000000000011110" UTC="2024-06-27T12:38:46.803Z" Msg="Exception occurred while creating performance counters. Exception message &amp;apos;System.PlatformNotSupportedException: Performance Counters are not supported on this platform.&#xA;   at System.Diagnostics.PerformanceData.CounterSet..ctor(Guid providerGuid, Guid counterSetGuid, CounterSetInstanceType instanceType)&#xA;   at h.hK.ab()&#xA;   at h.hh.A(PerformanceCounterLevel)&amp;apos;." />
[12:38:46 WRN] <Trc Id="60000" Ch="Operational" Lvl="Warning" Kw="4000000000011110" UTC="2024-06-27T12:38:46.835Z" Msg="Exception occurred while creating performance counters. Exception message &amp;apos;System.PlatformNotSupportedException: Performance Counters are not supported on this platform.&#xA;   at System.Diagnostics.PerformanceData.CounterSet..ctor(Guid providerGuid, Guid counterSetGuid, CounterSetInstanceType instanceType)&#xA;   at h.hK.ab()&#xA;   at h.hh.A(PerformanceCounterLevel)&amp;apos;." />
[12:38:46 WRN] <Trc Id="60006" Ch="Debug" Lvl="Warning" Kw="1000000000011110" UTC="2024-06-27T12:38:46.848Z" Msg="An exception was handled at TenantCacheComponent.OnEndRefresh. Exception message ExceptionId: 6ccf5f5f-2982-4f7f-af62-b362db018d3e-System.NullReferenceException: Object reference not set to an instance of an object.&#xA;   at a.a.aaX.z(IAsyncResult)." />
[12:38:46 WRN] <Trc Id="60000" Ch="Operational" Lvl="Warning" Kw="4000000000011110" UTC="2024-06-27T12:38:46.987Z" Msg="Exception occurred while creating performance counters. Exception message &amp;apos;System.PlatformNotSupportedException: Performance Counters are not supported on this platform.&#xA;   at System.Diagnostics.PerformanceData.CounterSet..ctor(Guid providerGuid, Guid counterSetGuid, CounterSetInstanceType instanceType)&#xA;   at h.hp.ac()&#xA;   at h.hp.ab()&#xA;   at h.hh.A(PerformanceCounterLevel)&amp;apos;." />

@krishankumar95
Copy link
Contributor

krishankumar95 commented Jun 27, 2024

@kacety123 ; PlatformNotSupportedException and NullReferenceException are internal warnings and should not impact the Emulator runtime.

In the console logs there will be following (From the Emulator container in Podman):

info: a.a.aap[0]
      Emulator Service is Launching On Platform:CBL-Mariner/Linux,X64
info: a.a.aap[0]
      Instantiating service components
info: a.a.aap[0]
      Creating namespace, entities and consumer groups
info: a.a.aaW[0]
      Emulator is launching with config : {"LoggingConfig":{"Type":"File"},"NamespaceConfig":[{"Type":"EventHub","Name":"emulatorns1","Entities":[{"Name":"eh1","PartitionCount":2,"ConsumerGroups":[{"Name":"cg1"},{"Name":"$default"}]},{"Name":"eh2","PartitionCount":2,"ConsumerGroups":[{"Name":"cg2"},{"Name":"$default"}]}]}]}
info: a.a.aap[0]
      Emulator Service is Successfully Up! ; Use connection string : "Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"

You can trying doing a Send-Receive with the bundled C# sample or any other official Event Hub SDK for other languages.

@krishankumar95
Copy link
Contributor

krishankumar95 commented Jun 27, 2024

@kacety123 ; Additionally while launching via direct docker/podman compose , following environment variable needs to be specified either as Full Path or Relative to the compose.yaml.

   volumes:
      - "${CONFIG_PATH}:/Eventhubs_Emulator/ConfigFiles/Config.json"

If this is not specified Emulator defaults to its internal logging and entity configuration. When initialised correctly these warning log lines will not be pushed to console and useful info level logs will pop up around Emulator launch.

Sample config file can be found here : https://github.com/Azure/azure-event-hubs-emulator-installer/blob/main/EventHub-Emulator/Config/Config.json

@krishankumar95
Copy link
Contributor

krishankumar95 commented Jul 8, 2024

@kacety123 ; Any updates here? Were you able to run the sample send receive application.

@krishankumar95
Copy link
Contributor

Closing due to inactivity. Validated that EH Emulator has no issues while launching with Podman. The errors mentioned above are warning level traces that ideally should not flow to console given Config.json is supplied to the Emulator. This does not impact any runtime operations with Emulator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants