Closed sharlinsingh2812 closed 1 month ago
Tested on Windows 11
Starting your example works fine:
PS C:\Dev\GitHub\WireMock.Net-docker\Docker Compose Examples\Linux - Alpine 2> docker compose up
[+] Running 1/1
✔ Container fake-service Recreated 0.1s
Attaching to fake-service
fake-service | 05/24/2024 08:57:32 [Info] : By Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)
fake-service | 05/24/2024 08:57:32 [Debug] : Server settings {
fake-service | "Port": 9009,
fake-service | "UseSSL": null,
fake-service | "HostingScheme": null,
fake-service | "UseHttp2": false,
fake-service | "StartAdminInterface": true,
fake-service | "ReadStaticMappings": true,
fake-service | "WatchStaticMappings": false,
fake-service | "WatchStaticMappingsInSubdirectories": false,
fake-service | "ProxyAndRecordSettings": null,
fake-service | "Urls": null,
fake-service | "StartTimeout": 10000,
fake-service | "AllowPartialMapping": false,
fake-service | "AdminUsername": null,
fake-service | "AdminPassword": null,
fake-service | "AdminAzureADTenant": null,
fake-service | "AdminAzureADAudience": null,
fake-service | "RequestLogExpirationDuration": null,
fake-service | "MaxRequestLogCount": null,
fake-service | "CorsPolicyOptions": 0,
fake-service | "AllowCSharpCodeMatcher": false,
fake-service | "AllowBodyForAllHttpMethods": false,
fake-service | "AllowOnlyDefinedHttpStatusCodeInResponse": false,
fake-service | "DisableJsonBodyParsing": false,
fake-service | "DisableRequestBodyDecompressing": false,
fake-service | "DisableDeserializeFormUrlEncoded": false,
fake-service | "HandleRequestsSynchronously": false,
fake-service | "CertificateSettings": null,
fake-service | "CustomCertificateDefined": false,
fake-service | "ClientCertificateMode": 0,
fake-service | "AcceptAnyClientCertificate": false,
fake-service | "WebhookSettings": null,
fake-service | "UseRegexExtended": true,
fake-service | "SaveUnmatchedRequests": false,
fake-service | "DoNotSaveDynamicResponseInLogEntry": false,
fake-service | "QueryParameterMultipleValueSupport": null,
fake-service | "ProtoDefinitions": null,
fake-service | "GraphQLSchemas": null
fake-service | }
fake-service | 05/24/2024 08:57:32 [Info] : Server using .NET 6.0
fake-service | 05/24/2024 08:57:32 Press Ctrl+C to shut down
fake-service | 05/24/2024 08:57:32 WireMock.Net server running
Calling Health Point works:
fake-service | 05/24/2024 08:58:02 [DebugRequestResponse] : Admin[False] {
fake-service | "Guid": "2917092b-1407-46c6-9bcf-36c1291988fa",
fake-service | "Request": {
fake-service | "ClientIP": "::1",
fake-service | "DateTime": "2024-05-24T08:58:02.5466137Z",
fake-service | "Path": "/healthz",
fake-service | "AbsolutePath": "/healthz",
fake-service | "Url": "http://localhost:9009/healthz",
fake-service | "AbsoluteUrl": "http://localhost:9009/healthz",
fake-service | "ProxyUrl": null,
fake-service | "Query": {},
fake-service | "Method": "GET",
fake-service | "HttpVersion": "1.1",
fake-service | "Headers": {
fake-service | "Connection": [
fake-service | "close"
fake-service | ],
fake-service | "Host": [
fake-service | "localhost:9009"
fake-service | ],
fake-service | "User-Agent": [
fake-service | "Wget"
fake-service | ]
fake-service | },
fake-service | "Cookies": {},
fake-service | "Body": null,
fake-service | "BodyAsJson": null,
fake-service | "BodyAsBytes": null,
fake-service | "BodyEncoding": null,
fake-service | "DetectedBodyType": null,
fake-service | "DetectedBodyTypeFromContentType": null
fake-service | },
fake-service | "Response": {
fake-service | "StatusCode": 404,
fake-service | "Headers": {
fake-service | "Content-Type": [
fake-service | "application/json"
fake-service | ]
fake-service | },
fake-service | "BodyDestination": null,
fake-service | "Body": null,
fake-service | "BodyAsJson": {
fake-service | "Guid": null,
fake-service | "Status": "No matching mapping found",
fake-service | "Error": null
fake-service | },
fake-service | "BodyAsBytes": null,
fake-service | "BodyAsFile": null,
fake-service | "BodyAsFileIsCached": null,
fake-service | "BodyOriginal": null,
fake-service | "BodyEncoding": null,
fake-service | "DetectedBodyType": 2,
fake-service | "DetectedBodyTypeFromContentType": null,
fake-service | "FaultType": null,
fake-service | "FaultPercentage": null
fake-service | },
fake-service | "MappingGuid": null,
fake-service | "MappingTitle": null,
fake-service | "RequestMatchResult": null,
fake-service | "PartialMappingGuid": null,
fake-service | "PartialMappingTitle": null,
fake-service | "PartialRequestMatchResult": null
fake-service | }
fake-service | 05/24/2024 08:58:02 WireMock.Net server running
GET via Chrome works fine:
Thanks Stef Heyenrat
Looks like a newer/updated image for v1.5.54 was pushed to Docker Hub. (May 22, 2024). I was using the image v1.5.54 that was pushed on May 19,2024)
Not getting the issue anymore.
Fixed with this indeed:
I am getting the following error:
reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response when trying to get the _/_admin/mappings after composing up a docker container with the following image sheyenrath/wiremock.net-alpine:latest. (As of 22 May 2024, the latest was - 1.5.54)
The expected behavior is that a list of mappings should be returned.
Other information:
docker-compose.yaml
GET request
Response