-
Notifications
You must be signed in to change notification settings - Fork 653
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
Failed to open X display when running in docker #1285
Comments
I'm having the same problem. |
Does it work either of you with previous versions? what is the last version that worked for you? |
I am actually running: Tileserver-gl v4.4.10, and get this error. I am new to the project I'm working on so can't comment on the last version that worked. For me, it mostly doesn't work. However, every once in a while I'll try again and it works (where I didn't change anything). It is sort of hit and miss when it works. It happens when I run: docker-compose up When it doesn't work, I get: |
The docker image uses xvfb to provide X display. So the only thing i could think of is your cpu doesn't meet the requirements for it to emulate open-gl. What cpu and os are you running on? I ran into something like this running directly on windows 2022 when i ran on a vitual server, since it didn't support opengl. There I had to force it to use mesa3d, which is am emulated open-gl similar to xvfb the crash is likely happening when you visit the index page, where it needs to render thumbnails, or loading a rendered tiles. since this is when maplibre-native needs X display to render. |
We have found that when using xvfb in maplibre-native ci workflows, it does fail with that error sometimes. it seemed to be a known xvfb issue |
Are you able to test swapping these two packages around and see if it makes a difference Edit: I guess this is a slightly different error, so probably not it. |
I found that as long as there is a style.json file in the folder, starting the Docker container will result in this error. However, this issue almost never occurs on Windows. |
Specifically, this error does not appear locally. However, when previewing the raster, an error occurs: [error: failed to parse json: the document is empty. at offset 0] /GET xxxxx/xx512/0/0/0.png 500. |
I guess this is the same problem:
It's triggered by any call for a static map, for example: curl -I "http://localhost:30080/styles/elevation/static/9.051,48.228,10/1x1.png" I'm running the Docker v5.0.0 image in Kubernetes (which includes
Any suggestions, please? |
I'm experiencing the same issue, as in @docuracy #1285 (comment), when running latest maptiler/tileserver-gl:v5.1.3 from container on AKS cluster. I run the container with the following command containers:
- name: tileserver-gl
image: maptiler/tileserver-gl:v5.1.3
command:
- node
args:
- /usr/src/app
- "--verbose"
- "--public_url"
- "https://svc.example.com/test/mbtiles/" The container has tileserver-gl/docker-entrypoint.sh Lines 2 to 8 in 1d60dd6
|
FixedThis is a quick follow-up to my previous #1285 (comment) I think I have fixed or rather worked around the issue: I removed explicit execution of containers:
- name: tileserver-gl
image: maptiler/tileserver-gl:v5.1.3
args:
- "--verbose"
- "--public_url"
- "https://svc.example.com/test/mbtiles/" in order to ensure this tileserver-gl/docker-entrypoint.sh Lines 2 to 8 in 1d60dd6
Once that tweak is deployed, shell'ed to TileServer-GL container and Finally, TileServer-GL frontpage shows the the preview thumbnail and no more crashes logged by the server WorkaroundAbove, I referred to the solution as a workaround because, I think, the container entrypoint could be improved to make it harder for users to trip over explicit execution of |
As of @mloskot's issue is caused by an entrypoint overwrite ( @mloskot I like the approach of configuration by environment variables, but I'm not sure if this always fits every need. I mount a preconfigured file in the container. May be this is an option for you, too (see https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/). |
@okimiko What are config.json equivalents of the command line options e.g. No single solution fits every need, but the issue here boils down to having any solution available. Right now, those are only configurable via p.s. Some of my workflows use init containers to prepare and deploy my |
@mloskot AFAIK: None and in my opinion that is fine: I'm not a fan of long process calls. For simple needs it may help to have some more command line options, but for that I would preferer environment variables. But (as said before) that is just my opinion. PS: I just checked the source; next to UV_THREADPOOL_SIZE, there is already something for PORT/BIND and a development checks, I thinks it should be not that hard to extend this for non-list options. PPS: I think we are a bit offtopic, this may be something for a discussion (or a PR ;-)) |
You seem to be misunderstanding my suggestion. The fact command line options cannot be controlled in If users could stick to default entrypoint of the official container image in every scenario, they would have not experienced craches. I'm happy to learn I'm wrong about this. Having said that, with respect, but "how can we let users configure containers with all aspects of TileServer-GL without touching command line arguments" is absolutely in-topic here as addressing that question is part of solution of this issue here. |
Yes, you are right then, I misunderstood your suggestion. But then I have an even more opposit opinion: You already can append every command line option (using |
You cannot use the From https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
If users need to specify command: [ "node" ]
args: [ "/usr/src/app", "--public_url", "..." ] then, TileServer-GL will start crashing at them! If you can't see there is room for improvement around the configuration aspect here to help users avoid shooting their feet, then I can't help, but I feel like we are running in circles. So, I will to stop there. |
Then stop using args: [ "--public_url", "..." ] |
Hello there. I'm using
tileserver-gl v4.11.1
and I'm getting the classic:Normally this happens when the x display server is not running, however I'm running with docker... Are there any suggestions on how I can investigate this issue? I'm not sure where to start. This issue happened a few times on my local machine, but restarting would do the trick, but now it is hosted on a remote server and it is happening every time.
The text was updated successfully, but these errors were encountered: