Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debian sysVinit] Can't start Kibana with /etc/init.d/kibana (exec quotation marks issue) #100112

Closed
martindolecek opened this issue May 14, 2021 · 5 comments
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team

Comments

@martindolecek
Copy link

Kibana version:
7.12.1

Elasticsearch version:
7.12.1

Server OS version:
Debian Buster 10.9

Browser version:
not important

Browser OS version:
not important

Original install method (e.g. download page, yum, from source, etc.):
apt via https://artifacts.elastic.co/packages/7.x/apt stable main

Describe the bug:
While using sysvinit, Kibana can't start via /etc/init.d/kibana because exec doesn't accept multiple parameters in a quotation marks. exec \"$program $args\"

The newest package (7.12.1; /etc/init.d/kibana line 66 ) use wrong sh -c "exec \"$program $args\""
The older package (7.10.1; /etc/init.d/kibana line 69) use working sh -c "exec \"$program\""
The older package (6.8.13; /etc/init.d/kibana line 55) use working sh -c "exec \"$program\" $args"

Correct way is to use sh -c "exec $program $args"

Steps to reproduce:

  1. Debian Stretch + sysVinit
  2. apt-get install kibana=7.12.1
  3. /etc/init.d/kibana start
  4. tail /var/log/kibana/kibana.log
sh: 4: exec: /usr/share/kibana/bin/kibana --logging.dest=/var/log/kibana/kibana.log: not found
  1. sed '66s/\\"//g' /etc/init.d/kibana; /etc/init.d/kibana start
everything is ok:  "message":"Server running at http://127.0.0.1:xxxx"}

Expected behavior:
Kibana will start with sysVinit.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:
Let's play with exec:

$ sh -c "exec \"echo ok\""
sh: 1: exec: echo ok: not found

$ sh -c "exec echo ok"
ok
@martindolecek martindolecek added the bug Fixes for quality problems that affect the customer experience label May 14, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label May 14, 2021
@dmlemeshko dmlemeshko added the Team:Operations Team label for Operations Team label May 17, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@botelastic botelastic bot removed the needs-team Issues missing a team label label May 17, 2021
@jbudz
Copy link
Member

jbudz commented May 17, 2021

Can you try installing the new version of the init script? This should be working on 7.12.1, but was broke on 7.12.0.

I double checked things and they should be okay. #95018

@martindolecek
Copy link
Author

Unfortunately both versions (7.12.0, 7.12.1) have the same file (/etc/init.d/kibana) with wrong line exec \"$program $args\"

The pull #95018 you've mentioned looks fine, but it's not in the newest package 7.12.1.

@jbudz
Copy link
Member

jbudz commented May 24, 2021

My apologies, I see now that it never made it back to 7.12. I opened #100477 to make sure this is addressed in 7.12.2

@jbudz
Copy link
Member

jbudz commented Jun 15, 2021

This should be resolved now. Closing this out.

@jbudz jbudz closed this as completed Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team
Projects
None yet
Development

No branches or pull requests

4 participants