Images not displaying

35 views
Skip to first unread message

James Montgomery

unread,
Oct 25, 2017, 4:09:36 PM10/25/17
to Lunaserv
Hi,

I've set up a Lunaserv server with the demo images that are provided, but none of them are actually being displayed properly. The server works and sees the yml files properly as per the log, but during the process of creating a tmpdir and combining the tiffs to a png something doesn't complete and the conversion of the tmp.png to an out.png results in a file not found error, and thus no image is displayed.

The attached files contain both the log output for an image failing to load as well as the lunaserv.yml configuration. The layers directory is located on a different partition than the server is, but the server appears to be reading the yml files properly.

Thank you
development.log
lunaserv.yml

Nick Estes

unread,
Oct 25, 2017, 4:22:25 PM10/25/17
to James Montgomery, Lunaserv
James,

Seeing an error from convert like that usually means the earlier command
from the rendering engine didn't work. Unfortunately, the error
reporting from the rendering engine components isn't as good as it
should be, so it's likely getting hidden. Did you compile and install
the rendering engine components in the map_utils directory? If you look
in the log, you'll see the map_utils command that was used to render the
requested tile, you can try running that by itself on the command line
to see if any errors are happening there. Note that the quotes around
the projection string aren't logged (in this particular case that
doesn't matter), but the command you should try based on your log file
is:

map_raster_layer -p +init=epsg:4326 -x -180.0 -X 180.0 -y -90.0 -Y 90.0
-W 769 -H 385 -o /tmp/lunaserv20171025-21370-1ee451f/image-0.png -b
/var/maps/lunamaps/layer/mars/viking/mars1.tif -b
/var/maps/lunamaps/layer/mars/viking/mars2.tif -b
/var/maps/lunamaps/layer/mars/viking/mars3.tif -b
/var/maps/lunamaps/layer/mars/viking/mars4.tif -b
/var/maps/lunamaps/layer/mars/viking/mars5.tif -b
/var/maps/lunamaps/layer/mars/viking/mars6.tif -b
/var/maps/lunamaps/layer/mars/viking/mars7.tif -b
/var/maps/lunamaps/layer/mars/viking/mars8.tif

When you run it, change the path for the -o option to a place you can
actually write the resulting tile. My guess is you'll see whatever the
problem is when you try to run that command. Let me know what you get.

--Nick
> --
> You received this message because you are subscribed to the Google
> Groups "Lunaserv" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lunaserv+u...@googlegroups.com.
> To post to this group, send email to luna...@googlegroups.com.
> Visit this group at https://groups.google.com/group/lunaserv.

James Montgomery

unread,
Oct 25, 2017, 5:29:04 PM10/25/17
to Lunaserv
I did make and make install in the map_utils directory, however I had to add -lm to the following line in order for it to compile:
GDLIBS=-lgd -lm
However, this didn't cause issues with a previous Lunaserv server I set up with the same Makefile.

Additionally, running the map_raster_layer command and changing the output to -o ~/image-0.png worked with no problem. 

Nick Estes

unread,
Oct 27, 2017, 8:09:07 PM10/27/17
to James Montgomery, Lunaserv
James,

That's good news that map_utils is working fine. The next suspect is
that perhaps the map_utils aren't in path where Lunaserv is running.
The default install location is /usr/local/bin, so that will need to be
in the PATH in the environment wherever Lunaserv is running so it can
find them.

--Nick
>>> Visit this group at https://groups.google.com/group/lunaserv [1].
>
> --
> You received this message because you are subscribed to the Google
> Groups "Lunaserv" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lunaserv+u...@googlegroups.com.
> To post to this group, send email to luna...@googlegroups.com.
> Visit this group at https://groups.google.com/group/lunaserv.
>
>
> Links:
> ------
> [1] https://groups.google.com/group/lunaserv

James Montgomery

unread,
Oct 30, 2017, 2:48:59 PM10/30/17
to Lunaserv

I have attached two images, one being of the PATH of the user of which the server is being ran. All of map_utils appears to be in the default path properly. So this leads to a few questions:


Is there a way to configure the path environment of the server, potentially using the lunaserv.yml file? 
Is there a way to inspect what path variable the server is using?
What is the significance of the Lunaserv.environment = *||*||*||* line in the second image? The top part of the image contains most of the lunaserv_application.rb file, which we noticed is where the environment for lunaserv is being set. However, running the server is defaulting to the 'development' environment, as seen at the bottom of the image. 

I'm located on the Tempe campus, so if it would be easier for you to see the server yourself I could walk over to your office.
ls1
ls2.png

Nick Estes

unread,
Oct 30, 2017, 2:57:30 PM10/30/17
to James Montgomery, Lunaserv
James,

Feel free to stop by, do you know where the LROC offices are? I'll be
around every day except for Tuesday this week.

It sounds like everything should be working for you, so we might have to
put a few debug statements in the code to find out where the problem is.
Once we find it, we'll see about improving the error reporting so if
anyone else runs into the same problem it's more obvious.

--Nick
>>> Visit this group at https://groups.google.com/group/lunaserv [1].
>>>
>>>
>>> Links:
>>> ------
>>> [1] https://groups.google.com/group/lunaserv [1]

James Montgomery

unread,
Oct 30, 2017, 3:03:01 PM10/30/17
to Lunaserv
Not precisely, which building exactly? I can head over in a few minutes if that's an okay time with you. Either that or Wednesday. 

Thanks

Nick Estes

unread,
Oct 30, 2017, 5:47:28 PM10/30/17
to Lunaserv
I hate it when I find an error I'm having in a forum somewhere and
there's no follow-up email with the solution, so if anyone runs into
this later, the solution was to install Imagemagick.

The convert command from imagemagick is used to composite the layers
together at the end of each map request, so convert must be available in
Lunaserv's path. At some point in the future, we may bring that step
into the rendering engine, but Imagemagick is reasonably fast and
efficient as well as highly available on many platforms, so that's
what's used currently.

We'll update the install documentation on the website today to reflect
that missing dependency.

--Nick
>>>>> [1] https://groups.google.com/group/lunaserv [1] [1]
Reply all
Reply to author
Forward
0 new messages