Tiny issues with the .deb package on Ubuntu 12.04 LTS


(Radu Gheorghe) #1

Hi,

We currently use Elasticsearch 0.19.3 from the .deb package on the
website. I would like to report a few niggles we got when turning to
Ubuntu 12.04:

  1. Elasticsearch doesn't work out-of-the box anymore:

/etc/init.d/elasticsearch start

  • no JDK found - please set JAVA_HOME

This gets fixed with something like:

ln -s /usr/lib/jvm/java-6-openjdk-amd64/ /usr/lib/jvm/java-6-openjdk

As apparently the location for Java changed. Another option would be
to change this line in the startup script:

The first existing directory is used for JAVA_HOME (if JAVA_HOME is

not defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/java-7-oracle /usr/lib/jvm/java-6-sun /usr/lib/
jvm/java-7-openjdk /usr/lib/jvm/java-6-openjdk"

  1. Linitan gives quite a lot of errors and warnings on the .deb
    package for a while now:

lintian elasticsearch-0.19.3.deb

BFD: /tmp/temp-lintian-lab-aAvf5svdM1/pool/e/elasticsearch/
elasticsearch_0.19.3_all_binary/unpacked/usr/share/elasticsearch/lib/
sigar/libsigar-ia64-linux.so: warning: sh_link not set for section
`.IA_64.unwind'
E: elasticsearch: arch-independent-package-contains-binary-or-object
usr/share/elasticsearch/lib/sigar/libsigar-amd64-linux.so
E: elasticsearch: arch-dependent-file-in-usr-share usr/share/
elasticsearch/lib/sigar/libsigar-amd64-linux.so
E: elasticsearch: unstripped-binary-or-object usr/share/elasticsearch/
lib/sigar/libsigar-amd64-linux.so
E: elasticsearch: arch-independent-package-contains-binary-or-object
usr/share/elasticsearch/lib/sigar/libsigar-ia64-linux.so
E: elasticsearch: arch-dependent-file-in-usr-share usr/share/
elasticsearch/lib/sigar/libsigar-ia64-linux.so
E: elasticsearch: unstripped-binary-or-object usr/share/elasticsearch/
lib/sigar/libsigar-ia64-linux.so
E: elasticsearch: arch-independent-package-contains-binary-or-object
usr/share/elasticsearch/lib/sigar/libsigar-x86-linux.so
E: elasticsearch: arch-dependent-file-in-usr-share usr/share/
elasticsearch/lib/sigar/libsigar-x86-linux.so
E: elasticsearch: unstripped-binary-or-object usr/share/elasticsearch/
lib/sigar/libsigar-x86-linux.so
E: elasticsearch: missing-dependency-on-libc needed by usr/share/
elasticsearch/lib/sigar/libsigar-amd64-linux.so and 2 others
E: elasticsearch: control-file-has-bad-permissions conffiles 0755 !=
0644
E: elasticsearch: no-copyright-file
W: elasticsearch: possible-unindented-list-in-extended-description
W: elasticsearch: extended-description-line-too-long
W: elasticsearch: extended-description-line-too-long
W: elasticsearch: extra-license-file usr/share/elasticsearch/
LICENSE.txt
W: elasticsearch: executable-not-elf-or-script usr/share/elasticsearch/
bin/elasticsearch.in.sh
W: elasticsearch: maintainer-script-needs-depends-on-adduser postinst

If there's something I can help with (especially the first issue seems
trivial to fix), I would gladly do. Just please point me to the
"regular" way of doing that.

Thanks and best regards,
Radu


(Shay Banon) #2

Yea, regarding 1, that would be great, if you can send a pull request that
includes the new locations that would be great. Can you also install Java 7
on 12.04 while you are at it and see if its path has changed as well? Just
send a pull request would be happy to get it in.

On Fri, May 4, 2012 at 10:23 AM, Radu Gheorghe radu0gheorghe@gmail.comwrote:

Hi,

We currently use Elasticsearch 0.19.3 from the .deb package on the
website. I would like to report a few niggles we got when turning to
Ubuntu 12.04:

  1. Elasticsearch doesn't work out-of-the box anymore:

/etc/init.d/elasticsearch start

  • no JDK found - please set JAVA_HOME

This gets fixed with something like:

ln -s /usr/lib/jvm/java-6-openjdk-amd64/ /usr/lib/jvm/java-6-openjdk

As apparently the location for Java changed. Another option would be
to change this line in the startup script:

The first existing directory is used for JAVA_HOME (if JAVA_HOME is

not defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/java-7-oracle /usr/lib/jvm/java-6-sun /usr/lib/
jvm/java-7-openjdk /usr/lib/jvm/java-6-openjdk"

  1. Linitan gives quite a lot of errors and warnings on the .deb
    package for a while now:

lintian elasticsearch-0.19.3.deb

BFD: /tmp/temp-lintian-lab-aAvf5svdM1/pool/e/elasticsearch/
elasticsearch_0.19.3_all_binary/unpacked/usr/share/elasticsearch/lib/
sigar/libsigar-ia64-linux.so: warning: sh_link not set for section
`.IA_64.unwind'
E: elasticsearch: arch-independent-package-contains-binary-or-object
usr/share/elasticsearch/lib/sigar/libsigar-amd64-linux.so
E: elasticsearch: arch-dependent-file-in-usr-share usr/share/
elasticsearch/lib/sigar/libsigar-amd64-linux.so
E: elasticsearch: unstripped-binary-or-object usr/share/elasticsearch/
lib/sigar/libsigar-amd64-linux.so
E: elasticsearch: arch-independent-package-contains-binary-or-object
usr/share/elasticsearch/lib/sigar/libsigar-ia64-linux.so
E: elasticsearch: arch-dependent-file-in-usr-share usr/share/
elasticsearch/lib/sigar/libsigar-ia64-linux.so
E: elasticsearch: unstripped-binary-or-object usr/share/elasticsearch/
lib/sigar/libsigar-ia64-linux.so
E: elasticsearch: arch-independent-package-contains-binary-or-object
usr/share/elasticsearch/lib/sigar/libsigar-x86-linux.so
E: elasticsearch: arch-dependent-file-in-usr-share usr/share/
elasticsearch/lib/sigar/libsigar-x86-linux.so
E: elasticsearch: unstripped-binary-or-object usr/share/elasticsearch/
lib/sigar/libsigar-x86-linux.so
E: elasticsearch: missing-dependency-on-libc needed by usr/share/
elasticsearch/lib/sigar/libsigar-amd64-linux.so and 2 others
E: elasticsearch: control-file-has-bad-permissions conffiles 0755 !=
0644
E: elasticsearch: no-copyright-file
W: elasticsearch: possible-unindented-list-in-extended-description
W: elasticsearch: extended-description-line-too-long
W: elasticsearch: extended-description-line-too-long
W: elasticsearch: extra-license-file usr/share/elasticsearch/
LICENSE.txt
W: elasticsearch: executable-not-elf-or-script usr/share/elasticsearch/
bin/elasticsearch.in.sh
W: elasticsearch: maintainer-script-needs-depends-on-adduser postinst

If there's something I can help with (especially the first issue seems
trivial to fix), I would gladly do. Just please point me to the
"regular" way of doing that.

Thanks and best regards,
Radu


(Jordi Boggiano) #3

I have just done a setup on Ubuntu 12.04 and did not run into issues. I
suspect the problem is that Ubuntu does not come with Java anymore because
of Oracle policies.

Using https://github.com/flexiondotorg/oab-java6 to install the java
package worked well for me, and the latest ES deb installed/runs smoothly.

Cheers


(Radu Gheorghe) #4

@Shay:

  • thanks for your reply!
  • I've sent the pull request. I hope it's allright, because it's my
    first
  • regarding the errors and warnings of lintian, is there something I
    can help with?

@Jordi: yes, I saw that Ubuntu doesn't come with Java, but the ES
debian package has a dependency on openjdk-6-jre-headless, so it
should work out of the box. The problem is that the path has changed
from 11.10.

If you didn't experience this issue (eg: ES started without having
Java installed before), then maybe this only happens on 64-bit
installations? Or did you have JAVA_HOME set already?

Best regards,
Radu

On May 8, 2:31 pm, Jordi Boggiano j.boggi...@seld.be wrote:

I have just done a setup on Ubuntu 12.04 and did not run into issues. I
suspect the problem is that Ubuntu does not come with Java anymore because
of Oracle policies.

Usinghttps://github.com/flexiondotorg/oab-java6to install the java
package worked well for me, and the latest ES deb installed/runs smoothly.

Cheers


(Jordi Boggiano) #5

On Wednesday, May 9, 2012 3:18:45 PM UTC+2, Radu Gheorghe wrote:

@Jordi: yes, I saw that Ubuntu doesn't come with Java, but the ES
debian package has a dependency on openjdk-6-jre-headless, so it
should work out of the box. The problem is that the path has changed
from 11.10.

If you didn't experience this issue (eg: ES started without having
Java installed before), then maybe this only happens on 64-bit
installations? Or did you have JAVA_HOME set already?

I had JAVA_HOME set I guess since I installed the sun-java6-jre package
before the ES one. I'm on 64bit too by the way.

Cheers


(Shay Banon) #6

Maybe we should remove the dep on: openjdk-6-jre-headless | sun-java6-jre?
As they seem to change names, and just require people to install the JDK
before?

On Wed, May 9, 2012 at 4:56 PM, Jordi Boggiano j.boggiano@seld.be wrote:

On Wednesday, May 9, 2012 3:18:45 PM UTC+2, Radu Gheorghe wrote:

@Jordi: yes, I saw that Ubuntu doesn't come with Java, but the ES
debian package has a dependency on openjdk-6-jre-headless, so it
should work out of the box. The problem is that the path has changed
from 11.10.

If you didn't experience this issue (eg: ES started without having
Java installed before), then maybe this only happens on 64-bit
installations? Or did you have JAVA_HOME set already?

I had JAVA_HOME set I guess since I installed the sun-java6-jre package
before the ES one. I'm on 64bit too by the way.

Cheers


(Radu Gheorghe) #7

It seems like an option, indeed. Besides, if you want to use Java 7
you will end up with both installed...

On May 9, 10:58 pm, Shay Banon kim...@gmail.com wrote:

Maybe we should remove the dep on: openjdk-6-jre-headless | sun-java6-jre?
As they seem to change names, and just require people to install the JDK
before?

On Wed, May 9, 2012 at 4:56 PM, Jordi Boggiano j.boggi...@seld.be wrote:

On Wednesday, May 9, 2012 3:18:45 PM UTC+2, Radu Gheorghe wrote:

@Jordi: yes, I saw that Ubuntu doesn't come with Java, but the ES
debian package has a dependency on openjdk-6-jre-headless, so it
should work out of the box. The problem is that the path has changed
from 11.10.

If you didn't experience this issue (eg: ES started without having
Java installed before), then maybe this only happens on 64-bit
installations? Or did you have JAVA_HOME set already?

I had JAVA_HOME set I guess since I installed the sun-java6-jre package
before the ES one. I'm on 64bit too by the way.

Cheers


(Jordi Boggiano) #8

On 09.05.2012 21:58, Shay Banon wrote:

Maybe we should remove the dep on: openjdk-6-jre-headless |
sun-java6-jre? As they seem to change names, and just require people to
install the JDK before?

I think the best way would be to add a dependency on java-runtime,
because that is provided by all the java/openjdk packages I've checked.
Then if nothing is installed it will install the system default, but if
you have something already it should use it happily.

Cheers

--
Jordi Boggiano
@seldaek - http://nelm.io/jordi


(Shay Banon) #9

Where have you seen java-runtime? I missed that I think... . I added
dependency on openjdk-7 first, and then 6 later, one of the main problems
we have is that the openjdk 6 version is really old...

On Thu, May 10, 2012 at 10:47 AM, Jordi Boggiano j.boggiano@seld.be wrote:

On 09.05.2012 21:58, Shay Banon wrote:

Maybe we should remove the dep on: openjdk-6-jre-headless |
sun-java6-jre? As they seem to change names, and just require people to
install the JDK before?

I think the best way would be to add a dependency on java-runtime,
because that is provided by all the java/openjdk packages I've checked.
Then if nothing is installed it will install the system default, but if
you have something already it should use it happily.

Cheers

--
Jordi Boggiano
@seldaek - http://nelm.io/jordi


(Jordi Boggiano) #10

On 10.05.2012 22:24, Shay Banon wrote:

Where have you seen java-runtime? I missed that I think... . I added
dependency on openjdk-7 first, and then 6 later, one of the main
problems we have is that the openjdk 6 version is really old...

java-runtime is not a real package, it's just a virtual package, if you
require it it should select & view a package that provides it as valid.
Both those package list java-runtime as provided:

$ aptitude show sun-java6-jre
Package: sun-java6-jre
[...]
Provides: java-runtime, java-runtime-headless, java-virtual-machine,
java2-runtime, java2-runtime-headless, java5-runtime,
java5-runtime-headless, java6-runtime, ...

$ aptitude show openjdk-7-jre
Package: openjdk-7-jre
[...]
Provides: java-runtime, java2-runtime, java5-runtime, java6-runtime,
java7-runtime

Cheers

--
Jordi Boggiano
@seldaek - http://nelm.io/jordi


(Shay Banon) #11

I see, and which actual package does it default to on different Ubuntu
versions? i.e. which one will be installed? (
http://packages.ubuntu.com/precise/java-runtime).

On Fri, May 11, 2012 at 10:29 AM, Jordi Boggiano j.boggiano@seld.be wrote:

On 10.05.2012 22:24, Shay Banon wrote:

Where have you seen java-runtime? I missed that I think... . I added
dependency on openjdk-7 first, and then 6 later, one of the main
problems we have is that the openjdk 6 version is really old...

java-runtime is not a real package, it's just a virtual package, if you
require it it should select & view a package that provides it as valid.
Both those package list java-runtime as provided:

$ aptitude show sun-java6-jre
Package: sun-java6-jre
[...]
Provides: java-runtime, java-runtime-headless, java-virtual-machine,
java2-runtime, java2-runtime-headless, java5-runtime,
java5-runtime-headless, java6-runtime, ...

$ aptitude show openjdk-7-jre
Package: openjdk-7-jre
[...]
Provides: java-runtime, java2-runtime, java5-runtime, java6-runtime,
java7-runtime

Cheers

--
Jordi Boggiano
@seldaek - http://nelm.io/jordi


(Jordi Boggiano) #12

On 13.05.2012 13:57, Shay Banon wrote:

I see, and which actual package does it default to on different Ubuntu
versions? i.e. which one will be installed?
(http://packages.ubuntu.com/precise/java-runtime).

I believe it uses default-jre which is a virtual package they can point
to anything that's deemed the best choice at the time. At the moment it
seems to be openjdk6 http://packages.ubuntu.com/precise/default-jre

In any case, it gives the choice to the end user to install whatever
java they want before installing your package. While if you require one
package explicitly, you take this away.

Cheers

--
Jordi Boggiano
@seldaek - http://nelm.io/jordi


(Shay Banon) #13

If thats the behavior, then it sounds better. Can you send a pull request
with the change?

On Sun, May 13, 2012 at 3:04 PM, Jordi Boggiano j.boggiano@seld.be wrote:

On 13.05.2012 13:57, Shay Banon wrote:

I see, and which actual package does it default to on different Ubuntu
versions? i.e. which one will be installed?
(http://packages.ubuntu.com/precise/java-runtime).

I believe it uses default-jre which is a virtual package they can point
to anything that's deemed the best choice at the time. At the moment it
seems to be openjdk6 http://packages.ubuntu.com/precise/default-jre

In any case, it gives the choice to the end user to install whatever
java they want before installing your package. While if you require one
package explicitly, you take this away.

Cheers

--
Jordi Boggiano
@seldaek - http://nelm.io/jordi


(Radu Gheorghe) #14

I know this message wasn't for me, but I have a related question.

I'd like to contribute with fixes for the .deb package (see issue 2
from the original post), but I don't know how to do it (as in "where
to submit patches"). I've seen on github at Elasticsearch that
the .deb packages was "moved to maven" or something. Even with
Google's help, I couldn't find how to contribute to the
Elasticsearch .deb package.

Excuse my noobness, do you have any hints? I'd really love to help.

Best regards,
Radu

On 15 mai, 22:11, Shay Banon kim...@gmail.com wrote:

If thats the behavior, then it sounds better. Can you send a pull request
with the change?

On Sun, May 13, 2012 at 3:04 PM, Jordi Boggiano j.boggi...@seld.be wrote:

On 13.05.2012 13:57, Shay Banon wrote:

I see, and which actual package does it default to on different Ubuntu
versions? i.e. which one will be installed?
(http://packages.ubuntu.com/precise/java-runtime).

I believe it uses default-jre which is a virtual package they can point
to anything that's deemed the best choice at the time. At the moment it
seems to be openjdk6http://packages.ubuntu.com/precise/default-jre

In any case, it gives the choice to the end user to install whatever
java they want before installing your package. While if you require one
package explicitly, you take this away.

Cheers

--
Jordi Boggiano
@seldaek -http://nelm.io/jordi


(Shay Banon) #15

Here is the location of hte deb package on github:
https://github.com/elasticsearch/elasticsearch/tree/master/src/deb. If you
want, you can send patches or attache them as gists to an issue you can
open on github, but the best is to send pull requests.

On Wed, May 16, 2012 at 5:51 PM, Radu Gheorghe radu0gheorghe@gmail.comwrote:

I know this message wasn't for me, but I have a related question.

I'd like to contribute with fixes for the .deb package (see issue 2
from the original post), but I don't know how to do it (as in "where
to submit patches"). I've seen on github at Elasticsearch that
the .deb packages was "moved to maven" or something. Even with
Google's help, I couldn't find how to contribute to the
Elasticsearch .deb package.

Excuse my noobness, do you have any hints? I'd really love to help.

Best regards,
Radu

On 15 mai, 22:11, Shay Banon kim...@gmail.com wrote:

If thats the behavior, then it sounds better. Can you send a pull request
with the change?

On Sun, May 13, 2012 at 3:04 PM, Jordi Boggiano j.boggi...@seld.be
wrote:

On 13.05.2012 13:57, Shay Banon wrote:

I see, and which actual package does it default to on different
Ubuntu

versions? i.e. which one will be installed?
(http://packages.ubuntu.com/precise/java-runtime).

I believe it uses default-jre which is a virtual package they can point
to anything that's deemed the best choice at the time. At the moment it
seems to be openjdk6http://packages.ubuntu.com/precise/default-jre

In any case, it gives the choice to the end user to install whatever
java they want before installing your package. While if you require one
package explicitly, you take this away.

Cheers

--
Jordi Boggiano
@seldaek -http://nelm.io/jordi


(Radu Gheorghe) #16

OK, thanks! I'll take a look and ask further questions if I have them.

Best regards,
Radu

On 16 mai, 21:43, Shay Banon kim...@gmail.com wrote:

Here is the location of hte deb package on github:https://github.com/elasticsearch/elasticsearch/tree/master/src/deb. If you
want, you can send patches or attache them as gists to an issue you can
open on github, but the best is to send pull requests.

On Wed, May 16, 2012 at 5:51 PM, Radu Gheorghe radu0gheor...@gmail.comwrote:

I know this message wasn't for me, but I have a related question.

I'd like to contribute with fixes for the .deb package (see issue 2
from the original post), but I don't know how to do it (as in "where
to submit patches"). I've seen on github at Elasticsearch that
the .deb packages was "moved to maven" or something. Even with
Google's help, I couldn't find how to contribute to the
Elasticsearch .deb package.

Excuse my noobness, do you have any hints? I'd really love to help.

Best regards,
Radu

On 15 mai, 22:11, Shay Banon kim...@gmail.com wrote:

If thats the behavior, then it sounds better. Can you send a pull request
with the change?

On Sun, May 13, 2012 at 3:04 PM, Jordi Boggiano j.boggi...@seld.be
wrote:

On 13.05.2012 13:57, Shay Banon wrote:

I see, and which actual package does it default to on different
Ubuntu

versions? i.e. which one will be installed?
(http://packages.ubuntu.com/precise/java-runtime).

I believe it uses default-jre which is a virtual package they can point
to anything that's deemed the best choice at the time. At the moment it
seems to be openjdk6http://packages.ubuntu.com/precise/default-jre

In any case, it gives the choice to the end user to install whatever
java they want before installing your package. While if you require one
package explicitly, you take this away.

Cheers

--
Jordi Boggiano
@seldaek -http://nelm.io/jordi


(Eric Jain) #17

On May 4, 12:23 am, Radu Gheorghe radu0gheor...@gmail.com wrote:

We currently use Elasticsearch 0.19.3 from the .debpackageon the
website. I would like to report a few niggles we got when turning toUbuntu12.04:

  1. Elasticsearch doesn't work out-of-the box anymore:

/etc/init.d/elasticsearch start

  • no JDK found - please set JAVA_HOME

This gets fixed with something like:

ln -s /usr/lib/jvm/java-6-openjdk-amd64/ /usr/lib/jvm/java-6-openjdk

Just ran into the same issue... Had run aptitude install openjdk-6- jre-headless on a plain, 32 bit Ubuntu 12.04 LTS installation before
installing the elasticsearch deb package. To fix this, I had to create
this link:

ln -s /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk


(Radu Gheorghe) #18

I suppose it's going to be fixed in the next release. It's fixed in
the "master".

On 19 mai, 01:01, Eric Jain eric.j...@gmail.com wrote:

On May 4, 12:23 am, Radu Gheorghe radu0gheor...@gmail.com wrote:

We currently use Elasticsearch 0.19.3 from the .debpackageon the
website. I would like to report a few niggles we got when turning toUbuntu12.04:

  1. Elasticsearch doesn't work out-of-the box anymore:

/etc/init.d/elasticsearch start

  • no JDK found - please set JAVA_HOME

This gets fixed with something like:

ln -s /usr/lib/jvm/java-6-openjdk-amd64/ /usr/lib/jvm/java-6-openjdk

Just ran into the same issue... Had run aptitude install openjdk-6- jre-headless on a plain, 32 bit Ubuntu 12.04 LTS installation before
installing the elasticsearch deb package. To fix this, I had to create
this link:

ln -s /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk


(gearond) #19

I found the same problem using 19.7 ES on Ubuntu 10.10 ( I take my time updating, and I don't like the Unity desktop )

Why is ES not just using $JAVA_HOME? Isn't that what it's for?


(Shay Banon) #20

Its actually using $JAVA_HOME by default in the bin/elasticsearch script. The deb init.d script tries to find it automatically, based on a list of common locations, and if its not found, it will use the regular $JAVA_HOME one.

On Sep 16, 2012, at 5:42 PM, gearond gearond@sbcglobal.net wrote:

I found the same problem using 19.7 ES on Ubuntu 10.10 ( I take my time
updating, and I don't like the Unity desktop )

Why is ES not just using $JAVA_HOME? Isn't that what it's for?

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Tiny-issues-with-the-deb-package-on-Ubuntu-12-04-LTS-tp3961419p4022755.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--

--