Opened 13 years ago

Closed 13 years ago

#754 closed defect (fixed)

GeoMajas doesn't work on first click

Reported by: camerons Owned by: live-demo@…
Priority: critical Milestone:
Component: OSGeoLive Keywords: 5.0, geomajas
Cc:

Description

In osgeolive5.0beta5,

I click on the GeoMajas icon, a loading GeoMajas widget is shown, then the browser pops up at: http://localhost:3420/showcase

When this is first opened we get an error display, (as geomajas hasn't been set up yet).

If I wait ~ 10 to 20 secs, then reload the page, GeoMajas is displayed as you would expect.

I suggest adding a delay in the existing loading icon, to allow time to let the geomajas application to start up.

Attachments (1)

start_geomajas.sh (1.1 KB ) - added by pieterdg 13 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by hamish, 13 years ago

Keywords: 5.0 geomajas → 5.0, geomajas

start up script is provided from the upstream install zip file, it must be fixed there.

closing #767 as a dupe of this ticket.

Hamish

comment:2 by camerons, 13 years ago

Priority: minorcritical

Geomajas seems to be not working at all now on osgeo-live5.0rc3 mini iso edition.

I select the "Geospatial -> Browser Clients -> Start Geomajas" It opens a browser at: http://localhost:3420/showcase But reports "Unable to connect"

comment:3 by camerons, 13 years ago

Located the issue down to the startup script, which is downloaded as part of geomajas:

user@user:~$ /usr/local/bin/start_geomajas.sh awk: {print int(0.5+100*\$1/\$2)} awk: backslash not last character on line awk: {print int(0.5+100*\$1/\$2)} awk: backslash not last character on line failed to create drawable user@user:~$

Offending code is coming from the introduced delay clause:

DELAY=40

( for TIME in \seq \$DELAY\ ; do

sleep 1 echo "\$TIME \$DELAY" | awk '{print int(0.5+100*\$1/\$2)}'

done ) | zenity --progress --auto-close --text "Loading Geomajas"

comment:4 by camerons, 13 years ago

Testing further on 5.0rc3, booting from an ISO in Virtual Box VM:

I notice that the previous geomajas start code is still in the start_geomajas.sh. I tried commenting out new, and commenting in old, then from the command line, running /usr/local/bin/start_geomajas.sh . Geomajas logs start coming out when run start_geomajas.sh (after ~ 2 mins) but loading http://localhost:3420/showcase in the browser still returns "Unable to connect".

When running top, the CPU load is running at 50% to ~ 75% (quite high) and memory at ~ 15%.

in reply to:  3 comment:5 by hamish, 13 years ago

Replying to camerons:

Located the issue down to the startup script, which is downloaded as part of geomajas:

>  user@user:~$ /usr/local/bin/start_geomajas.sh 
>  awk: {print int(0.5+100*\$1/\$2)}
>  awk:                    ^ backslash not last character on line
>  awk: {print int(0.5+100*\$1/\$2)}
>  awk:                    ^ backslash not last character on line
>  failed to create drawable
>  user@user:~$ 

Offending code is coming from the introduced delay clause:

> DELAY=40
> 
> (
> for TIME in \`seq \$DELAY\` ; do
>   sleep 1
>   echo "\$TIME \$DELAY" | awk '{print int(0.5+100*\$1/\$2)}'
> done
> ) | zenity --progress --auto-close --text "Loading Geomajas"

right, the '\' were in there as part of the

cat << EOF > start.sh

code in the other install scripts, which need backticks and $ chars to the quoted. The 7 \ in that script should be removed.

the script comes in from the upstream installer package, so must be fixed in the http://files.geomajas.org/release/geomajas-$GEOMAJAS_VERSION-bin.zip file.

thanks, Hamish

ps- put code within {{{, }}} to stop trac from trying to interpret it as markup.

comment:6 by hamish, 13 years ago

5.0rc3 iso booted in qemu/kVM:

removing the 7 '\' from start_geomajas.sh corrects the startup timer problems, but when firefox does come up you get an "Unable to connect" ... "can't establish a connection to localhost:3420". url is http://localhost:3420/showcase/.

running start_geomajas.sh from a terminal prompt I see the following two messages:

failed to create drawtable

(firefox-bin:3973): GnomeUI-WARNING **: While connecting to session manager:
 Authentication Rejected, reason : None of the authentication protocols
 specified are supported and host-based authentication failed.

?? Maybe those are important, maybe not.

I'm not sure if it works on the 5.0rc3 VM or not; still downloading that.


ah. I think I see the problem--

the older timer that was commented out also included the startup!

need to add

 /usr/lib/geomajas-1.8.0-bin/bin/startup.sh &

on a line before DELAY=40 in the /usr/local/bin/geomajas_startup.sh script.

that startup script comes from upstream not our build scripts, so we've got to wait for upstream to fix it.

Hamish

comment:7 by pieterdg, 13 years ago

I have changed the online script again to:

/usr/lib/geomajas-1.8.0-bin/bin/startup.sh & (echo "10"; sleep 4; echo "20"; sleep 4; echo "30"; sleep 4; echo "40"; sleep 4; echo "50"; sleep 4; echo "60"; sleep 4; echo "70"; sleep 4; echo "80"; sleep 4; echo "90"; sleep 4; echo "100"; sleep 4) | zenity --progress --auto-close --text "Loading Geomajas" firefox "http://localhost:3420/showcase/"

This should give it 40 seconds to start up.

by pieterdg, 13 years ago

Attachment: start_geomajas.sh added

comment:8 by hamish, 13 years ago

great. the attached startup script w/ 60sec delay works for me!

Hamish

comment:9 by darkblueb, 13 years ago

this issue appears to be fixed in RC6

comment:10 by camerons, 13 years ago

Resolution: fixed
Status: newclosed

Also verified as fixed in 5.0rc6, ISO in a VM with 768 RAM. Issue closed.

Note: See TracTickets for help on using tickets.