-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Running daemon in custom environment #3612
Conversation
debian/clickhouse-server.init
Outdated
@@ -36,6 +36,11 @@ command -v flock >/dev/null && FLOCK=flock | |||
# Override defaults from optional config file | |||
test -f /etc/default/clickhouse && . /etc/default/clickhouse | |||
|
|||
# Environment for run daemon | |||
if [ -f /etc/sysconfig/$PROGRAM ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we should support /etc/default for debian based systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I can transfer PROGRAM_ENV to /etc/default/clickhouse
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@proller also suggested that we can simply source
(.
) this file instead of manual parsing.
We cannot find the reason why the child process is not terminated with parent. |
With original initscript: [root@reporting-dev1 init.d]# ./clickhouse-server start
Start clickhouse-server service: Path to data directory in /etc/clickhouse-server/config.xml: /var/lib/clickhouse/
DONE
[root@reporting-dev1 init.d]# ps axw | grep clickhouse
18665 ? Ssl 0:00 clickhouse-server --daemon --pid-file=/var/run/clickhouse-server/clickhouse-server.pid --config-file=/etc/clickhouse-server/config.xml
18672 ? Sl 0:03 /bin/clickhouse odbc-bridge --http-port 9018 --listen-host localhost --http-timeout 1800000000
18719 pts/3 S+ 0:00 grep --color=auto clickhouse
[root@reporting-dev1 init.d]# ps e --forest -g 18665
PID TTY STAT TIME COMMAND
18672 ? Sl 0:03 /bin/clickhouse odbc-bridge --http-port 9018 --listen-host localhost --http-timeout 1800000000 XDG_SESSION_ID=133 HOSTNAME=reporting-dev1 TERM=xterm-256color SHELL=/bin/bash H
18665 ? Ssl 0:00 clickhouse-server --daemon --pid-file=/var/run/clickhouse-server/clickhouse-server.pid --config-file=/etc/clickhouse-server/config.xml XDG_SESSION_ID=133 HOSTNAME=reporting-de
[root@reporting-dev1 init.d]# ./clickhouse-server stop
Stop clickhouse-server service: DONE
[root@reporting-dev1 init.d]# ps axw | grep clickhouse
18672 ? Sl 0:03 /bin/clickhouse odbc-bridge --http-port 9018 --listen-host localhost --http-timeout 1800000000
18772 pts/3 S+ 0:00 grep --color=auto clickhouse in log:
|
Yes, we have confirmed that it is not terminated by default. We will try to find the reason. |
Ok, I remove this code. |
@proller @alexey-milovidov @alesapin |
Если сейчас помержить, по получится, что одна из изначальных задач данного PR не решена (остановка odbc-bridge при завершении clickhouse-server). Последние два дня выясняли, почему он не останавливается сам. И в результате, есть такой PR: #3642 |
Впрочем, так как это было дополнительным пунктом, то просто мержим. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
It's need to connect dictionaries from oracle with using cyrillic support (set env for odbc-bridge
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
andLANG=en_US.UTF-8
).And I fix terminating
clickhouse odbc-bridge
where main process was stoped.