Pidfile for clickhouse-server is missing - clickhouse

I'm working on a freshly installed Ubuntu 18.04 VM.
With following steps I have installed ClickHouse.
echo "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4
sudo apt-get update
sudo apt-get install -y clickhouse-server clickhouse-client
Then I start ClickHouse like this.
sudo clickhouse-server --config-file=/etc/clickhouse-server/config.xml
And I also tried to specify the pidfile path.
sudo clickhouse-server --config-file=/etc/clickhouse-server/config.xml --pid-file=/var/run/clickhouse-server/clickhouse-server.pid
ClickHouse documentation says that the pidfile should be at /var/run/clickhouse-server/clickhouse-server.pid, but I can't find it.
Running sudo find / -name clickhouse*.pid shows that there is no pidfile for clickhouse.
Is there something I'm missing? Do I have to change the configuration?
How can I get the pid of the process?

As far as I know, ClickHouse doesn't generate a pid file. Instead, it has a status file under the root of the data directory which contains the pid value.
❯ cat data/status
PID: 23465
Started at: 2018-12-02 18:47:10
Revision: 54409

Related

Installing Yarn through Bash shell WSL1

When I run curl, it shows this error:
~$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
gpg: can't connect to the agent: IPC connect call failed
I'm unable to install yarn.
I tried killing:
~$ kill -9 gpg-agent
and restarting:
~$ gpg-agent --daemon
but nothing worked so far. Any advice?
I did this from my root -
npm install -g yarn
Checked if the yarn is installed by -
yarn --version
It worked.
The following worked for me:
sudo apt remove gnupg
sudo apt autoremove
sudo apt install gnupg1
This installs GNUPG Classic. Read more here.

logstash 5.0.0.1 RHEL6 wont start

A Clean RHEL 6.0, Can you please tell me what am i missing.
i have done the following but seems to be some where i am going wrong cat start logstash for some reason.
i am not a newbe to linux. trying to learn as i go.
have done the following to get the install working.
Elasticsearch and Kibana start fine problem is with the Logstash.
hope some one can help me out here. really stuck to get this one working.
#Install Java
sudo su -c "yum install java-1.8.0-openjdk"
*Installed:
java-1.8.0-openjdk.x86_64 1:1.8.0.45-28.b13.el6_6
**Complete**!*
java -version
*openjdk version "1.8.0_45"*
#Install elasticsearch
sudo su -c "yum localinstall elasticsearch-5.0.1.rpm "
*Running Transaction
Installing : elasticsearch-5.0.1-1.noarch 1/1
Creating elasticsearch group... OK
Creating elasticsearch user... OK
NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using chkconfig
sudo chkconfig --add elasticsearch
You can start elasticsearch service by executing
sudo service elasticsearch start
Verifying : elasticsearch-5.0.1-1.noarch 1/1
Installed:
elasticsearch.noarch 0:5.0.1-1*
**Complete**!
sudo chkconfig --add elasticsearch
sudo service elasticsearch start
* elasticsearch Started*
#Install kibana
sudo su -c "yum localinstall kibana-5.0.1-x86_64.rpm"
*Downloading Packages:
Installed:
kibana.x86_64 0:5.0.1-1*
**Complete**!
#Install logstash
sudo su -c "yum localinstall logstash-5.0.1.rpm"
*Total size: 189 M
Installing : 1:logstash-5.0.1-1.noarch 1/1
Using provided startup.options file: /etc/logstash/startup.options
Successfully created system startup script for Logstash
Verifying : 1:logstash-5.0.1-1.noarch 1/1
Installed:
logstash.noarch 1:5.0.1-1*
**Complete!**
#Query config values
rpm -qc elasticsearch
*/etc/elasticsearch/elasticsearch.yml
/etc/elasticsearch/jvm.options
/etc/elasticsearch/log4j2.properties
/etc/elasticsearch/scripts
/etc/init.d/elasticsearch
/etc/sysconfig/elasticsearch
/usr/lib/sysctl.d/elasticsearch.conf
/usr/lib/systemd/system/elasticsearch.service*
#Query config values
rpm -qc logstash
*/etc/logstash/jvm.options
/etc/logstash/logstash.yml
/etc/logstash/startup.options*
#Query config values
rpm -qc kibana
*/etc/kibana/kibana.yml*
#Permissions
sudo su -c "chmod -R 777 /etc/kibana/"
sudo su -c "chmod -R 777 /etc/logstash/"
sudo su -c "chmod -R 777 /etc/elasticsearch/"
sudo service kibana start
*-- output kibana started*
Grrr..... This does not stat
sudo chkconfig --add logstash
sudo service logstash start
> try this ->
sudo su -c "/usr/share/logstash/bin/system-install"
* Sending all logs to /tmp/tmp.ZNfIKnQxFh Successfully created system
startup script for Logstash*

issues with installing mesosphere mesos in ubuntu

While installing mesosphere mesos i have faced several issues Ubuntu Linux
distribution. I have used
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
CODENAME=$(lsb_release -cs)
echo "deb http://repos.mesosphere.io/${DISTRO} ${CODENAME} main" | sudo tee /etc/apt/sources.list.d/mesosphere.list
to install mesosphere with
sudo apt-get install mesosphere
Now as expected mesossphere should download all dependencies like mesos,marathon and zookeeper with it. After i have installed them successfully i wanted to run the mesos as a service with
sudo service mesos-master start
but system says its unrecognized service. As a solution i had to download mesos separately and start them manually after building the same source code.
what i am looking for is if there exist any other simple solution to install apache mesos.
you need use
sudo apt-get -y install mesos
instead of
sudo apt-get install mesosphere
to install mesos.

Installing Passenger & Nginx using Vagrant shell script

This is my first post to SO so I hope I'm asking this correctly.
I wrote a shell script to automate the installation of Passenger & Nginx (along with some other components) without any user input on a Vagrant VM running Ubuntu 14.04. It works fine using the following:
echo "****** Adding Passenger & Nginx Repo ******"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates -y
echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main" | sudo tee /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 600 /etc/apt/sources.list.d/passenger.list
sudo apt-get update
echo "****** Installing Passenger & Nginx ******"
sudo apt-get install nginx-extras passenger -y
Now I want to do the same thing for a Vagrant VM running CentOS 6.4. I followed the directions for CentOS found on the Phusion Passenger site but I can't seem to get it working properly. When I do the following, the output from the shell script says "No package passenger available.":
echo "****** Adding Passenger & Nginx Repo ******"
sudo yum install epel-release pygpgme curl -y
sudo 'echo "curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo"'
sudo chown root: /etc/yum.repos.d/passenger.repo
sudo chmod 600 /etc/yum.repos.d/passenger.repo
sudo yum update
echo "****** Installing Passenger & Nginx ******"
sudo yum install nginx passenger -y
Looking in the /etc/yum.repos.d directory after the script is run, there is no passenger.repo listed, so it looks like for whatever reason curl is not downloading the repo file. However, if I manually type the commands in my terminal command line after the script finishes it will pull down the repo and run.
I'm probably doing something stupid here, but I'm rather new to shell scripting and can't seem to figure out where the problem is.
Thanks for any help you can give me.
sudo 'echo "curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo"'
That is wrong and is not what the manual instructed. It should be:
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo

Error in build from Dockerfile for Ubuntu image with Mono installed

I have the following docker file that I am attempting to use to build a Ubuntu image with mono.
FROM ubuntu:14.04
MAINTAINER John Smith <John.Smith#gmail.com>
RUN sudo apt-get update
RUN sudo /bin/bash -l -c apt-get install wget
RUN sudo /bin/bash -l -c apt-get http://download.mono-project.com/repo/xamarin.gpg
RUN sudo apt-key add xamarin.gpg
RUN sudo echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list
RUN sudo apt-get update
RUN sudo apt-get install mono-complete
When I run the following docker build command...
docker build -t="test/mono" .
It fails building and gives the following errors message:
gpg:can't open 'xamaring.gpg': No such file or directory.
2015/05/27 16:11:01 The command [/bin/bash -c sudo apt-key add xamarin.gpg] returned a non-zero code: 2
Anything obviously wrong sticking out?
It looks like you forgot to use wget instead of apt-get after you installed wget, so 'xamaring.gpg' has not been downloaded and that's why it can't be found.
You need this:
/bin/bash -l -c "wget http://download.mono-project.com/repo/xamarin.gpg"
The is an example of this in docker's website:
Dockerizing MongoDB

Resources