Can't install Logstash on Ubuntu


(Yang) #1

I've followed all the steps on the installation guide for Logstash but I keep getting this error:

Setting up nginx-core (1.10.0-0ubuntu0.16.04.4) ...
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error processing package nginx-core (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-core (>= 1.10.0-0ubuntu0.16.04.4) | nginx-full (>= 1.10.0-0ubuntu0.16.04.4) | nginx-light (>= 1.10.0-0ubuntu0.16.04.4) | nginx-extras (>= 1.10.0-0ubuntu0.16.04.4); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
 nginx depends on nginx-core (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-full (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-light (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-extras (<< 1.10.0-0ubuntu0.16.04.4.1~); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure):
 dependency problems - leaving No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                      unconfigured
Errors were encountered while processing:
 nginx-core
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've tried removing apache2 as I saw some posts mentioning that it helped, but it didn't work in my case. I've tried purging, completely removing and reinstalling but that doesn't work. I've also tried installing each nginx component seperately e.g core, full etc. but that doesn't work.

When I run: sudo yum install logstash

I get:

   Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package logstash.noarch 1:5.1.2-1 will be installed
    --> Processing Dependency: /bin/sh for package: 1:logstash-5.1.2-1.noarch
    --> Processing Dependency: /bin/sh for package: 1:logstash-5.1.2-1.noarch
    --> Processing Dependency: /bin/sh for package: 1:logstash-5.1.2-1.noarch
    --> Processing Dependency: /bin/sh for package: 1:logstash-5.1.2-1.noarch
    --> Finished Dependency Resolution
    Error: Package: 1:logstash-5.1.2-1.noarch (logstash-5.1)
               Requires: /bin/sh
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest

When I run : sudo service logstash configtest
I get: logstash: unrecognized service

My system:

Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.1 LTS
Release:	16.04
Codename:	xenial

Please help, thanks.


(Mark Walkom) #2

It looks like something else is wrong with your package system.
Also installing nginx is not part of our install process.

Yum on Ubuntu? Don't you mean apt?


(Yang) #3

Yes sorry, apt install. I get the same errors still.


(Mark Walkom) #4

I think you need to fix those nginx errors, that's ultimately causing the problem.


(Jymit Singh Khondhu) #5

I imagine you are following an online tutorial something similar to DigitalOcean. You need to ensure you have installed the public key to pull from the Elasticsearch repository, update your apt package database, then, sudo apt-get install logstash.

Outside of that you will certainly need a web server such as apache or nginx for Kibana.

May the force be with you.


(Mark Walkom) #6

Kibana is a stand alone app though, why would they need a webserver as well?


(Jymit Singh Khondhu) #7

@warkolm Correct, I retract my highlighted comment. It is all down to the context to which the elasticstack is being used.

Thanks.


(Yang) #8

Thanks for the support everyone, it's probably just my packet manager acting up. I've managed to get data into my Elasticsearch without Logstash so this problem has been resolved, sort of. Thanks.


(Orhan) #9

the RPM packages are more stable in my opinion :slight_smile: install on centos :stuck_out_tongue:


(system) #10

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.