<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.elementtoproof
{mso-style-name:elementtoproof;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
{mso-style-name:x_msonormal;
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.xelementtoproof
{mso-style-name:x_elementtoproof;}
span.xcontentpasted1
{mso-style-name:x_contentpasted1;}
span.EmailStyle27
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Based on that error message you’re not running MapServer 8.0 though. That was an area that changed between v.7 and v.8 and the error message was updated. V.8 outputs something like:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> msLoadMap(): Regular expression error. Filename validation failed.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">--Steve<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Marcin Niemyjski <mniemyjski@cloudferro.com> <br>
<b>Sent:</b> Friday, December 2, 2022 9:33 AM<br>
<b>To:</b> Lime, Steve D (MNIT) <steve.lime@state.mn.us>; Marcin Niemyjski via MapServer-users <mapserver-users@lists.osgeo.org><br>
<b>Subject:</b> Re: Mapserver on k8s weird behaviour<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span class="elementtoproof"><span style="font-size:12.0pt;color:black;background:white">Steve,</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="elementtoproof"><span style="font-size:12.0pt;color:black;background:white">I'm using Mapserver 8 from camptocamp/mapserver
<a href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Fr%2Fcamptocamp%2Fmapserver&data=05%7C01%7Csteve.lime%40state.mn.us%7Ceabd7fa6ebbc4966680908dad47a7ab2%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638055919758219015%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SuPGI7u3eZOZXcYObRQL011G8FxPgk2TNbCipYb9OPY%3D&reserved=0">
https://hub.docker.com/r/camptocamp/mapserver</a></span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Best,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Marcin<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us">steve.lime@state.mn.us</a>><br>
<b>Sent:</b> Friday, December 2, 2022 4:23 PM<br>
<b>To:</b> Marcin Niemyjski <<a href="mailto:mniemyjski@cloudferro.com">mniemyjski@cloudferro.com</a>>; Marcin Niemyjski via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>
<b>Subject:</b> RE: Mapserver on k8s weird behaviour</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal">Hi Marcin: Are you using FastCGI? Which version of MapServer? We ran into something similar w/FastCGI and version 8 during development where you’d see the first instance of an error message but then the server error subsequently. It was
consistent on some setups but never happened on others. You could try applying the fix (see
<a href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMapServer%2FMapServer%2Fpull%2F6577&data=05%7C01%7Csteve.lime%40state.mn.us%7Ceabd7fa6ebbc4966680908dad47a7ab2%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638055919758219015%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Af2O5Gg%2F4FPh%2BaokhLJZ1pWR9sGgpxBWR3bvzlRacYk%3D&reserved=0">
https://github.com/MapServer/MapServer/pull/6577</a>) locally and see if that fixes things. It will be backported to the 7.6 branch in the near future.<o:p></o:p></p>
<p class="xmsonormal"> <o:p></o:p></p>
<p class="xmsonormal">--Steve<o:p></o:p></p>
<p class="xmsonormal"> <o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="xmsonormal"><b>From:</b> MapServer-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>Marcin Niemyjski via MapServer-users<br>
<b>Sent:</b> Friday, December 2, 2022 8:46 AM<br>
<b>To:</b> Marcin Niemyjski via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>
<b>Subject:</b> [MapServer-users] Mapserver on k8s weird behaviour<o:p></o:p></p>
</div>
</div>
<p class="xmsonormal"> <o:p></o:p></p>
<div>
<div>
<p class="xmsonormal"><span class="xelementtoproof">Hello,</span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
<div>
<p class="xmsonormal"><span class="xelementtoproof">I am using Mapserver on Kubernetes (LoadBalancer). Everything works great - GetMap, GetCapabilities, layers load correctly in QGIS and Leaflet.</span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal">However, what caught my attention is that when passing the mapfile's url using LoadBalancer/Kubernetes IP, only the first time the message is<o:p></o:p></p>
</div>
<div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
<div>
<p class="xmsonormal">msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed<o:p></o:p></p>
</div>
<div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
<div>
<p class="xmsonormal">and every time thereafter <o:p></o:p></p>
</div>
<div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
<div>
<p class="xmsonormal">Internal Server Error<o:p></o:p></p>
</div>
<div>
<p class="xmsonormal">The server encountered an internal error or misconfiguration and was unable to complete your request.<o:p></o:p></p>
</div>
<div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
<div>
<p class="xmsonormal">By refreshing a few times, you may get the expected message again, but this is random. As I mentioned - layers and requests load correctly everywhere (also after repeated refreshing). Should I be concerned? I would love to understand why
is this happening ^^<o:p></o:p></p>
</div>
<div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-size:12.0pt;color:black">Sample mapfile (but problem occured on all those tested):</span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span class="xcontentpasted1"><span style="font-size:12.0pt;color:black"><a href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpastecode.io%2Fs%2Fpfaudfef&data=05%7C01%7Csteve.lime%40state.mn.us%7Ceabd7fa6ebbc4966680908dad47a7ab2%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638055919758219015%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WVKFMxZO%2Bb8tJPcyfPiQctXL62e4M1eiuWuhZbhqk5Q%3D&reserved=0">https://pastecode.io/s/pfaudfef</a></span></span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-size:12.0pt;color:black">As always - thank you,</span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-size:12.0pt;color:black">Marcin</span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>