You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Robert Demski (Jira)" <ji...@apache.org> on 2019/11/07 15:09:00 UTC

[jira] [Commented] (CASSANDRA-15273) cassandra does not start with new systemd version

    [ https://issues.apache.org/jira/browse/CASSANDRA-15273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969329#comment-16969329 ] 

Robert Demski commented on CASSANDRA-15273:
-------------------------------------------

h5. Shouldn't cassandra register services in the systemd like other standard services?

{{For example in RHEL 7:}}
{{ /usr/lib/systemd/system/sshd.service}}
{code:bash}
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target sshd-keygen.service
Wants=sshd-keygen.service

[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target
{code}
{{Of course /etc/init.d/cassandra is then superfluous :)}}

 

As example it is {{/usr/lib/systemd/system/cassandra.service}} from OpenSUSE 15.1
{code:bash}
[Unit]
Description=Cassandra
After=network.target

[Service]
Environment=CASSANDRA_HOME=/usr/share/cassandra CASSANDRA_CONF=/etc/cassandra/conf CASSANDRA_INCLUDE=/usr/share/cassandra/cassandra.in.sh
EnvironmentFile=/etc/sysconfig/cassandra
User=cassandra
ExecStart=/usr/sbin/cassandra -f
ExecStopPost=/usr/bin/sleep 5 ; /usr/bin/rm -f /var/lock/subsys/cassandra
StandardOutput=journal
StandardError=journal
LimitNOFILE=100000
LimitMEMLOCK=infinity
LimitNPROC=32768
LimitAS=infinity
SuccessExitStatus=143
TimeoutStopSec=60
Restart=on-failure

[Install]
WantedBy=multi-user.target
{code}
 

> cassandra does not start with new systemd version
> -------------------------------------------------
>
>                 Key: CASSANDRA-15273
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15273
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Aleksandr Yatskin
>            Priority: Urgent
>
> After update systemd with  fixed vulnerability https://access.redhat.com/security/cve/cve-2018-16888, the cassandra service does not start correctly.
> Environment: RHEL 7, systemd-219-67.el7_7.1, cassandra-3.11.4-1 (https://www.apache.org/dist/cassandra/redhat/311x/cassandra-3.11.4-1.noarch.rpm)
> ---------------------------------------------------------------
> systemctl status cassandra
> ● cassandra.service - LSB: distributed storage system for structured data
>  Loaded: loaded (/etc/rc.d/init.d/cassandra; bad; vendor preset: disabled)
>  Active: failed (Result: resources) since Fri 2019-08-09 17:20:26 MSK; 1s ago
>  Docs: man:systemd-sysv-generator(8)
>  Process: 2414 ExecStop=/etc/rc.d/init.d/cassandra stop (code=exited, status=0/SUCCESS)
>  Process: 2463 ExecStart=/etc/rc.d/init.d/cassandra start (code=exited, status=0/SUCCESS)
>  Main PID: 1884 (code=exited, status=143)
> Aug 09 17:20:23 desktop43.example.com systemd[1]: Unit cassandra.service entered failed state.
> Aug 09 17:20:23 desktop43.example.com systemd[1]: cassandra.service failed.
> Aug 09 17:20:23 desktop43.example.com systemd[1]: Starting LSB: distributed storage system for structured data...
> Aug 09 17:20:23 desktop43.example.com su[2473]: (to cassandra) root on none
> Aug 09 17:20:26 desktop43.example.com cassandra[2463]: Starting Cassandra: OK
> Aug 09 17:20:26 desktop43.example.com systemd[1]: New main PID 2545 does not belong to service, and PID file is not owned by root. Refusing.
> Aug 09 17:20:26 desktop43.example.com systemd[1]: New main PID 2545 does not belong to service, and PID file is not owned by root. Refusing.
> Aug 09 17:20:26 desktop43.example.com systemd[1]: Failed to start LSB: distributed storage system for structured data.
> Aug 09 17:20:26 desktop43.example.com systemd[1]: Unit cassandra.service entered failed state.
> Aug 09 17:20:26 desktop43.example.com systemd[1]: cassandra.service failed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org