2

I'm trying to follow a series of tutorials:

visualizing-terrains-with-cesium-ii

visualizing-terrains-with-cesium

Some other useful posts here:

Unable to serve Cesium Terrain files

error-in-loading-terrain-files-terrain

Basically, I want to use my own terrain files within Cesium.

I'm stack in configuring the terrain server aspect,

I have a Node.js server running Cesium Apps in port 8080: http://localhost:8080/Apps/own_terrain.html

Path for the html file is:

C:/Users/username/Downloads/software/Cesium-1.53/Apps/own_terrain.html

The terrain files have been generated by using: cesium-terrain-builder-docker

Then, I want to run my terrain tiles using cesium-terrain-server in docker.

This is how I built it:

docker run -p 9000:8080 -v C:/Users/username/Downloads/software/Cesium-1.53/Apps/terrain:/data/tilesets/terrain \
geodata/cesium-terrain-server

So, Cesium running in 8080 and terrain server in 9000,

However when I try to access the terrain tiles, i.e:

http://localhost:9000/tilesets/tiles/0/0/0.terrain

Nothing happens, Chrome says:

localhost didn’t send any data. ERR_EMPTY_RESPONSE

And the same when integrating that into the own_terrain.html:

Cesium.js:445 GET http://localhost:9000/tilesets/tiles/layer.json net::ERR_EMPTY_RESPONSE

Definitely the terrain server is not running. What am I missing in these tutorials?

2

I know it is super old but faced a similar issue.

Turns out, the cesium-terrain-server was listening to Port 8000 inside docker. I verified it by running the image in interactive mode

docker run -p 4000:80 --rm -v $PWD:/data/tilesets/terrain -it --env WEB_DIR=/data/tilesets/terrain/ geodata/cesium-terrain-server bash

I mapped port 4000 to 80 in the beginning because the documentation instructed me to do so.

Then I ran cesium-terrain-server inside the docker and received:

NOTICE: server listening on port 8000

So, I just mapped my port 4000 to 8000 and it started serving the terrain tiles.

After Comment Suggestion

I was asked to also include how I mapped port 4000 to 8000. Here is how I did it.

docker run -p 4000:8000 --rm -v $PWD:/data/tilesets/terrain -it --env WEB_DIR=/data/tilesets/terrain/ geodata/cesium-terrain-server bash
1
  • 1
    Welcome to GIS SE! As a new user please take the tour to learn about our focused Q&A format. How did you map the port from 4000 to 8000? Can you edit your question to include those steps? – Midavalo Jul 10 '20 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.