[Geoserver-users] Failed to load the GDAL native libs (GDAL PLUGIN cannot be enabled)

Hi,
I'm trying to install the GDAL plugin in Geoserver but failed to do so after
following the steps here
<http://docs.geoserver.org/latest/en/user/data/raster/gdal.html&gt;

Tomcat logs:
WARNING: Failed to load the GDAL native libs. This is not a problem unless
you need to use the GDAL plugins: they won't be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path

I am using;
Ubuntu 14.04.3 LTS
Tomcat7
Geoserver as WAR
GDAL 1.11.2, released 2015/02/10
Geoserver 2.7.2

I copied the jars to the WEB-INF directory on my windows machine and it
works fine.

Thanks in advance.
Pritimoy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-the-GDAL-native-libs-GDAL-PLUGIN-cannot-be-enabled-tp5222384.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I would double and triple check your binary path and library path.

I wonder if it is worth adding the library path to the geoserver status page for these kind of issues?

···

On 2 September 2015 at 15:08, prpp <pritimoy.podder@anonymised.com> wrote:

Hi,
I’m trying to install the GDAL plugin in Geoserver but failed to do so after
following the steps here
<http://docs.geoserver.org/latest/en/user/data/raster/gdal.html>

Tomcat logs:
WARNING: Failed to load the GDAL native libs. This is not a problem unless
you need to use the GDAL plugins: they won’t be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path

I am using;
Ubuntu 14.04.3 LTS
Tomcat7
Geoserver as WAR
GDAL 1.11.2, released 2015/02/10
Geoserver 2.7.2

I copied the jars to the WEB-INF directory on my windows machine and it
works fine.

Thanks in advance.
Pritimoy


View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-the-GDAL-native-libs-GDAL-PLUGIN-cannot-be-enabled-tp5222384.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Jody Garnett

Hello, I had similar problems with GDAL libraries not being accessed by
Geoserver.
Like you I was using GDAL 1.11.
The solution for me was to use the GDAL library package put together by the
Geoserver team here
http://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.10/native/gdal
which is the link on that Geoserver instructions web page.
In my case (Windows Server 2008 64 bit, JRE7 64 bit, Tomcat 7, Geoserver
2.7.2) I was trying use the GDAL libraries installed by OSGEO4W which are
GDAL 1.11 and no amount fiddling around with environment paths would allow
Geoserver to pick up the required libraries.
Only when I removed all traces of GDAL 1.11 from my system and then used
only the GDAL libraries (which are GDAL 1.9.2) from geo-solution did the
GDAL extensions work. With the correct paths to GDAL_DATA and GDAL
everything suddenly worked perfectly including raster types ECW and MrSID.
Hope this helps. David

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-the-GDAL-native-libs-GDAL-PLUGIN-cannot-be-enabled-tp5222384p5222426.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Pritimoy,
I see you have installed GDAL 1.11.2.
The current GeoServer versions depend on GDAL 1.9.2. We didn’t test more recent GDAL versions yet so we are not sure they will work fine (potential differences in JNI bindings or functions/methods).

Therefore I would recommend to use that one as indicated in the documentation.
http://docs.geoserver.org/stable/en/user/data/raster/gdal.html#installing-gdal-native-libraries
http://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.10/native/gdal/linux/

Although we don’t have specific libraries for Ubuntu 14.04, it seems other users successfully get them working:
http://osgeo-org.1560.x6.nabble.com/Problem-about-GDAL-extension-with-Geoserver-2-7-1-td5213994.html

Please, let us know.
Best Regards,
Daniele

···

On Thu, Sep 3, 2015 at 1:17 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I would double and triple check your binary path and library path.

I wonder if it is worth adding the library path to the geoserver status page for these kind of issues?


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Jody Garnett

On 2 September 2015 at 15:08, prpp <pritimoy.podder@anonymised.com> wrote:

Hi,
I’m trying to install the GDAL plugin in Geoserver but failed to do so after
following the steps here
<http://docs.geoserver.org/latest/en/user/data/raster/gdal.html>

Tomcat logs:
WARNING: Failed to load the GDAL native libs. This is not a problem unless
you need to use the GDAL plugins: they won’t be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path

I am using;
Ubuntu 14.04.3 LTS
Tomcat7
Geoserver as WAR
GDAL 1.11.2, released 2015/02/10
Geoserver 2.7.2

I copied the jars to the WEB-INF directory on my windows machine and it
works fine.

Thanks in advance.
Pritimoy


View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-the-GDAL-native-libs-GDAL-PLUGIN-cannot-be-enabled-tp5222384.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Hi David,
thanks for your feedbacks. Not sure why I have received your email in my box after I sent my 2 mails about the topic.
Thanks again.

Cheers,
Daniele

···

On Thu, Sep 3, 2015 at 9:53 AM, Daniele Romagnoli <daniele.romagnoli@anonymised.com> wrote:

Hi Pritimoy,
I see you have installed GDAL 1.11.2.
The current GeoServer versions depend on GDAL 1.9.2. We didn’t test more recent GDAL versions yet so we are not sure they will work fine (potential differences in JNI bindings or functions/methods).

Therefore I would recommend to use that one as indicated in the documentation.
http://docs.geoserver.org/stable/en/user/data/raster/gdal.html#installing-gdal-native-libraries
http://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.10/native/gdal/linux/

Although we don’t have specific libraries for Ubuntu 14.04, it seems other users successfully get them working:
http://osgeo-org.1560.x6.nabble.com/Problem-about-GDAL-extension-with-Geoserver-2-7-1-td5213994.html

Please, let us know.
Best Regards,
Daniele

On Thu, Sep 3, 2015 at 1:17 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I would double and triple check your binary path and library path.

I wonder if it is worth adding the library path to the geoserver status page for these kind of issues?


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Jody Garnett

On 2 September 2015 at 15:08, prpp <pritimoy.podder@anonymised.com> wrote:

Hi,
I’m trying to install the GDAL plugin in Geoserver but failed to do so after
following the steps here
<http://docs.geoserver.org/latest/en/user/data/raster/gdal.html>

Tomcat logs:
WARNING: Failed to load the GDAL native libs. This is not a problem unless
you need to use the GDAL plugins: they won’t be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path

I am using;
Ubuntu 14.04.3 LTS
Tomcat7
Geoserver as WAR
GDAL 1.11.2, released 2015/02/10
Geoserver 2.7.2

I copied the jars to the WEB-INF directory on my windows machine and it
works fine.

Thanks in advance.
Pritimoy


View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-the-GDAL-native-libs-GDAL-PLUGIN-cannot-be-enabled-tp5222384.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Hi Daniele,
I removed GDAL 1.11.2 from the system. And installed gdal-1.9.2.tar.gz
executing following command:
./configure --with-python
make
sudo make install

Now gdalinfo --version gives me GDAL 1.9.2, released 2012/10/08.

Then I set LD_LIBRARY_PATH and GDAL_DATA respectively as follows:

/var/lib/gdal-lib
/var/lib/gdal-data

Still I am getting the same error message:
Failed to load the GDAL native libs. This is not a problem unless you need
to use the GDAL plugins: they won't be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path

I didn't understand the solution suggested by CartoonMed from the link you
gave for Ubuntu 14.04:

"I would like to say that I got this working, it's because I used docker to
run geoserver and the variables wasn't exported properly when it run the
geoserver startup script.
I just fixed this by manually run the startup script after I confirmed that
environments are exported in docker container."

What is docker container?

Thanks.
Pritimoy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-the-GDAL-native-libs-GDAL-PLUGIN-cannot-be-enabled-tp5222384p5222457.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Pritimoy,

···

On Thu, Sep 3, 2015 at 11:41 AM, prpp <pritimoy.podder@anonymised.com> wrote:

Hi Daniele,
I removed GDAL 1.11.2 from the system. And installed gdal-1.9.2.tar.gz
executing following command:
./configure --with-python
make
sudo make install

Now gdalinfo --version gives me GDAL 1.9.2, released 2012/10/08.

Then I set LD_LIBRARY_PATH and GDAL_DATA respectively as follows:

/var/lib/gdal-lib
/var/lib/gdal-data

Still I am getting the same error message:
Failed to load the GDAL native libs. This is not a problem unless you need
to use the GDAL plugins: they won’t be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path

Please, note that GeoServer/GeoTools needs the GDAL Java bindings.
Therefore you have to use SWIG to generate the JAVA part too.
(Your previous commands only generated the main libs)

You can take a look to chapter 3.7.3.1 of
https://java.net/downloads/imageio-ext/Documentation/ImageioExt-SetupGuide-1.1.pdf

(although it hasn’t been updated recently)

A few adds to this tips:

  • I would recommend using SWIG 1.3.36 since other versions seem generating issues
  • You should reconfigure GDAL with additional --with-threads option
  • Not sure the C(XX)_OPTFLAGS changes are still required.

I didn’t understand the solution suggested by CartoonMed from the link you
gave for Ubuntu 14.04:

I have provided a link to that thread since it seems that CartoonMed was able to use prebuilt Ubuntu 12 GDAL libs from GeoSolutions downloadable on his Ubuntu 14.04. If Ubuntu 12.04 libs work on 14.04 as CartoonMed said, you could avoid building GDAL and related java bindings on your side. However, I think this also depends on which GCC version he had on his machine.
That being said, please, ignore the Docker container topic from that discussion.

“I would like to say that I got this working, it’s because I used docker to
run geoserver and the variables wasn’t exported properly when it run the
geoserver startup script.
I just fixed this by manually run the startup script after I confirmed that
environments are exported in docker container.”

What is docker container?

Thanks.
Pritimoy

Hope this helps.
Regards,
Daniele


View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-the-GDAL-native-libs-GDAL-PLUGIN-cannot-be-enabled-tp5222384p5222457.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Hi Daniele,
Thanks for your help. At last the gdal plugin has been loaded.

Pritimoy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-the-GDAL-native-libs-GDAL-PLUGIN-cannot-be-enabled-tp5222384p5222558.html
Sent from the GeoServer - User mailing list archive at Nabble.com.