2

I am using ubuntu 16.04.2 server, I recently upgraded my Geoserver 2.10.5 to 2.12.0. When I was using 2.10.5 everything was working... including the init script. My original update plan was to download the newest geoserver and create a symbolic link to the new version and change all references of 2.10.5 to "cur". example:

GEOSERVER_DATA_DIR=/usr/share/geoserver/geoserver-2.10.5/data_dir

to

GEOSERVER_DATA_DIR=/usr/share/geoserver/cur/data_dir

This way I could switch between versions easier. Later after having trouble getting the update working I changed all references directly to 2.12.0 example:

GEOSERVER_DATA_DIR=/usr/share/geoserver/geoserver-2.12.0/data_dir

I am using the init script from the geoserver website here, but for 2.10.5 I had changed the following variables to match my system:

USER=geoserver
GEOSERVER_DATA_DIR=/usr/share/geoserver/geoserver-2.12.0/data_dir
GEOSERVER_HOME=/usr/share/geoserver/geoserver-2.12.0/geoserver
JAVA_HOME=/usr/lib/jvm/java-8-oracle
JAVA_OPTS="-Xms128m -Xmx512m"

while in the init.d directory I have run the following commands:

sudo update-rc.d -f geoserver remove
sudo update-rc.d geoserver defaults

On starting up my server geoserver seems to be running but the website is not up. But if I run startup.sh the website works normally.

I am able to start stop and restart the service.

How do I get my updated geoserver to start when my server starts up?

****** Edit 12/11/2017 ******

If I get the status of the geoserver service I get the following:

● geoserver.service - LSB: GeoServer OGC server
   Loaded: loaded (/etc/init.d/geoserver; bad; vendor preset: enabled)
   Active: active (exited) since Mon 2017-12-11 16:01:24 UTC; 3min 24s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1289 ExecStart=/etc/init.d/geoserver start (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
      CPU: 0

Dec 11 16:01:23 ubuntu-xenial systemd[1]: Starting LSB: GeoServer OGC server...
Dec 11 16:01:24 ubuntu-xenial geoserver[1289]:  * Starting GeoServer daemon geoserver
Dec 11 16:01:24 ubuntu-xenial geoserver[1289]: start-stop-daemon: user 'geoserver' not found
Dec 11 16:01:24 ubuntu-xenial geoserver[1289]:    ...done.
Dec 11 16:01:24 ubuntu-xenial systemd[1]: Started LSB: GeoServer OGC server.

I then changed the USER in the init script to the following:

USER=ubuntu

I ran the following commands:

sudo update-rc.d -f geoserver remove
sudo update-rc.d geoserver defaults

When I restart the server I get the same error. Somehow the user geoserver is still being used.

I have also deleted /etc/init.d/geoserver and recreated it with the ubuntu as the user, and I still get the same error.

  • what does the log file say? – Ian Turton Dec 11 '17 at 8:51
  • @IanTurton I couldn't find the log file. Where is it? – user908759 Dec 11 '17 at 14:14
  • 1
    the log file is in /usr/share/geoserver/geoserver-2.12.0/data_dir/log/geoserver.log - or look in the tomcat logs – Ian Turton Dec 11 '17 at 14:21
  • @IanTurton Thanks for your help. The init does not trigger the geoserver log. I can't find the tomcat log. – user908759 Dec 11 '17 at 14:46
  • Check out my edit on the results from sudo service geoserver status. – user908759 Dec 11 '17 at 16:24

Your Answer

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

Browse other questions tagged or ask your own question.