-
Notifications
You must be signed in to change notification settings - Fork 29
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
Getting Required configuration value MS_MAP_PATTERN not set when we changed our base image from 7.6 to 8.0 #805
Comments
It's more a MapServer issue than a Docker packaging issue, but ar you sure that the MS_MAP_PATTERN is set? docker run <your_image> env | grep MS_ |
Here's the result of that: [email protected]@RDENN-LNX-19235:~$ docker run 2616358f20b4 env | grep MS_ The WARNING is due to the fact that I executed that command on my local machine. In reality, the image is run using AWS ECS and the templates are found in S3. |
The error message didn't say that, but your MS_MAP_PATTERN looks wrong, shouldn't it be |
Well, it's supposed to match both /my_mapfiles/xxx.map and /mapfiles/xxx.map That said, I am not quite sure why it currently works with /(.?)mapfiles/(.?).map instead of /(.?)+mapfiles/(.?)+.map also, I am running this locally with bind mounts to some local directories and all I did was change the base image from 7.6 to 8.0 and it's working fine. We're looking into that and will close this if appropriate. |
My template links were pointed back at production instead of my local environment which is why it was working. I fixed it to use localhost and now I am getting the expected error |
My C is kind of rusty, but the MapServer code appears to throw the error I see when ms_map_pattern is null. It's retrieved in mapservutil.c at this line: const char *ms_map_pattern = CPLGetConfigOption("MS_MAP_PATTERN", NULL); From https://gdal.org/api/cpl.html#_CPPv418CPLGetConfigOptionPKcPKc, we see that function searches for a key/value pair set with CPLSetConfigOption() or in the list of environment variables. when I exec into my local docker container and run env | grep MS_ I get MS_ERRORFILE=stderr |
We modified the base image in our Dockerfile from 7.6 to 8.0
msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set.
Our Dockerfile sets both MS_MAP_PATTERN and MS_MAPFILE, btw.
What causes this?
The text was updated successfully, but these errors were encountered: