You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ramesh S <in...@gmail.com> on 2011/09/27 23:03:12 UTC

unable to start as a service on Ubuntu server

>
> Hello all,
>
> We installed Cassandra on our development server , which is a fresh Ubuntu
> server running only Cassandra.
> We followed all the instructions on this link<http://www.datastax.com/docs/0.8/install/install_package> and
> when we want to start the server as a service by issuing either of the
> command.
>
> service cassandra start
> /etc/init.d/cassandra start
>
> it waits for a few seconds, then returns the prompt.
> But the service never starts.
> When we try to start with cassandra -f , it works fine.
>
> What could be the issue.
> Any help would be appreciated.
>
> many thanks
>

Re: unable to start as a service on Ubuntu server

Posted by Ramesh S <in...@gmail.com>.
Thank you Aaron for pointing me to the logs.

On Tue, Sep 27, 2011 at 7:23 PM, aaron morton <aa...@thelastpickle.com>wrote:

> You can check the /var/log/cassandra/output.log (stdout / err from the
> process) and /var/log/cassandra/system.log to diagnose start problems.
>
> A
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 28/09/2011, at 12:34 PM, Ramesh S wrote:
>
> On IRC channel, I was told that 'service' clears the environment variables.
> Just in case , some one might be having the same problem.
>
> Use - cassandra start instead of service cassandra start.
>
> ** Please correct me if this is incorrect or if this is because server is
> wrongly configured.
>
>
>
>
> On Tue, Sep 27, 2011 at 5:49 PM, Ramesh S <in...@gmail.com> wrote:
>
>> Thanks Konstantin.
>>
>> I checked the services, but it doesn't show up for some reason. Even
>> trying to connect locally or remotely using a CLI client, returned
>> Exception connecting to xx.xx.xx.xx/9160. Reason: Connection refused.
>> But I tried sudo cassandra start and it worked like a charm.
>> I am surprised why omitting the 'service' did the job.
>> It is development server, but I am little concerned about the production
>> server.
>>
>> regards
>> Ramesh
>>
>>
>>
>>
>> On Tue, Sep 27, 2011 at 5:12 PM, Konstantin Naryshkin <
>> konstantinn@a-bb.net> wrote:
>>
>>> Yes, they start Cassandra as a daemon in the background. It is running.
>>> You can connect to it from the CLI or any other client. You can see what it
>>> is doing by reading the logs. cassandra -f starts Cassandra in the
>>> foreground, that is why it does not return a prompt when the server starts.
>>>
>>> ----- Original Message -----
>>> From: "Ramesh S" <in...@gmail.com>
>>> To: user@cassandra.apache.org
>>> Sent: Tuesday, September 27, 2011 5:03:12 PM
>>> Subject: unable to start as a service on Ubuntu server
>>>
>>>
>>>
>>>
>>> Hello all,
>>>
>>>
>>> We installed Cassandra on our development server , which is a fresh
>>> Ubuntu server running only Cassandra.
>>> We followed all the instructions on this link and when we want to start
>>> the server as a service by issuing either of the command.
>>>
>>>
>>> service cassandra start
>>> /etc/init.d/cassandra start
>>>
>>>
>>> it waits for a few seconds, then returns the prompt.
>>> But the service never starts.
>>> When we try to start with cassandra -f , it works fine.
>>>
>>>
>>> What could be the issue.
>>> Any help would be appreciated.
>>>
>>>
>>> many thanks
>>>
>>
>>
>
>

Re: unable to start as a service on Ubuntu server

Posted by aaron morton <aa...@thelastpickle.com>.
You can check the /var/log/cassandra/output.log (stdout / err from the process) and /var/log/cassandra/system.log to diagnose start problems. 

A

-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 28/09/2011, at 12:34 PM, Ramesh S wrote:

> On IRC channel, I was told that 'service' clears the environment variables.
> Just in case , some one might be having the same problem.
> 
> Use - cassandra start instead of service cassandra start.
> 
> ** Please correct me if this is incorrect or if this is because server is wrongly configured.
> 
> 
> 
> 
> On Tue, Sep 27, 2011 at 5:49 PM, Ramesh S <in...@gmail.com> wrote:
> Thanks Konstantin.
> 
> I checked the services, but it doesn't show up for some reason. Even trying to connect locally or remotely using a CLI client, returned 
> Exception connecting to xx.xx.xx.xx/9160. Reason: Connection refused.
> But I tried sudo cassandra start and it worked like a charm.
> I am surprised why omitting the 'service' did the job.
> It is development server, but I am little concerned about the production server.
> 
> regards
> Ramesh
> 
> 
> 
> 
> On Tue, Sep 27, 2011 at 5:12 PM, Konstantin Naryshkin <ko...@a-bb.net> wrote:
> Yes, they start Cassandra as a daemon in the background. It is running. You can connect to it from the CLI or any other client. You can see what it is doing by reading the logs. cassandra -f starts Cassandra in the foreground, that is why it does not return a prompt when the server starts.
> 
> ----- Original Message -----
> From: "Ramesh S" <in...@gmail.com>
> To: user@cassandra.apache.org
> Sent: Tuesday, September 27, 2011 5:03:12 PM
> Subject: unable to start as a service on Ubuntu server
> 
> 
> 
> 
> Hello all,
> 
> 
> We installed Cassandra on our development server , which is a fresh Ubuntu server running only Cassandra.
> We followed all the instructions on this link and when we want to start the server as a service by issuing either of the command.
> 
> 
> service cassandra start
> /etc/init.d/cassandra start
> 
> 
> it waits for a few seconds, then returns the prompt.
> But the service never starts.
> When we try to start with cassandra -f , it works fine.
> 
> 
> What could be the issue.
> Any help would be appreciated.
> 
> 
> many thanks
> 
> 


Re: unable to start as a service on Ubuntu server

Posted by Ramesh S <in...@gmail.com>.
On IRC channel, I was told that 'service' clears the environment variables.
Just in case , some one might be having the same problem.

Use - cassandra start instead of service cassandra start.

** Please correct me if this is incorrect or if this is because server is
wrongly configured.




On Tue, Sep 27, 2011 at 5:49 PM, Ramesh S <in...@gmail.com> wrote:

> Thanks Konstantin.
>
> I checked the services, but it doesn't show up for some reason. Even trying
> to connect locally or remotely using a CLI client, returned
> Exception connecting to xx.xx.xx.xx/9160. Reason: Connection refused.
> But I tried sudo cassandra start and it worked like a charm.
> I am surprised why omitting the 'service' did the job.
> It is development server, but I am little concerned about the production
> server.
>
> regards
> Ramesh
>
>
>
>
> On Tue, Sep 27, 2011 at 5:12 PM, Konstantin Naryshkin <
> konstantinn@a-bb.net> wrote:
>
>> Yes, they start Cassandra as a daemon in the background. It is running.
>> You can connect to it from the CLI or any other client. You can see what it
>> is doing by reading the logs. cassandra -f starts Cassandra in the
>> foreground, that is why it does not return a prompt when the server starts.
>>
>> ----- Original Message -----
>> From: "Ramesh S" <in...@gmail.com>
>> To: user@cassandra.apache.org
>> Sent: Tuesday, September 27, 2011 5:03:12 PM
>> Subject: unable to start as a service on Ubuntu server
>>
>>
>>
>>
>> Hello all,
>>
>>
>> We installed Cassandra on our development server , which is a fresh Ubuntu
>> server running only Cassandra.
>> We followed all the instructions on this link and when we want to start
>> the server as a service by issuing either of the command.
>>
>>
>> service cassandra start
>> /etc/init.d/cassandra start
>>
>>
>> it waits for a few seconds, then returns the prompt.
>> But the service never starts.
>> When we try to start with cassandra -f , it works fine.
>>
>>
>> What could be the issue.
>> Any help would be appreciated.
>>
>>
>> many thanks
>>
>
>

Re: unable to start as a service on Ubuntu server

Posted by Ramesh S <in...@gmail.com>.
Thanks Konstantin.

I checked the services, but it doesn't show up for some reason. Even trying
to connect locally or remotely using a CLI client, returned
Exception connecting to xx.xx.xx.xx/9160. Reason: Connection refused.
But I tried sudo cassandra start and it worked like a charm.
I am surprised why omitting the 'service' did the job.
It is development server, but I am little concerned about the production
server.

regards
Ramesh




On Tue, Sep 27, 2011 at 5:12 PM, Konstantin Naryshkin
<ko...@a-bb.net>wrote:

> Yes, they start Cassandra as a daemon in the background. It is running. You
> can connect to it from the CLI or any other client. You can see what it is
> doing by reading the logs. cassandra -f starts Cassandra in the foreground,
> that is why it does not return a prompt when the server starts.
>
> ----- Original Message -----
> From: "Ramesh S" <in...@gmail.com>
> To: user@cassandra.apache.org
> Sent: Tuesday, September 27, 2011 5:03:12 PM
> Subject: unable to start as a service on Ubuntu server
>
>
>
>
> Hello all,
>
>
> We installed Cassandra on our development server , which is a fresh Ubuntu
> server running only Cassandra.
> We followed all the instructions on this link and when we want to start the
> server as a service by issuing either of the command.
>
>
> service cassandra start
> /etc/init.d/cassandra start
>
>
> it waits for a few seconds, then returns the prompt.
> But the service never starts.
> When we try to start with cassandra -f , it works fine.
>
>
> What could be the issue.
> Any help would be appreciated.
>
>
> many thanks
>

Re: unable to start as a service on Ubuntu server

Posted by Ramesh S <in...@gmail.com>.
Thanks a lot Shyamal.
That was the solution. It works now :)

regards
Ramesh



On Tue, Sep 27, 2011 at 8:36 PM, Shyamal Prasad <sh...@member.fsf.org>wrote:

>
> >>>>> "Ramesh" =3D=3D Ramesh S <in...@gmail.com> writes:
>
>    Ramesh>     Hello all, We installed Cassandra on our development
>    Ramesh> server , which is a fresh Ubuntu server running only
>    Ramesh> Cassandra.  We followed all the instructions on this
>    Ramesh> link=C2=A0and when we want to start the server as a service by
>    Ramesh> issuing either of the command.
>
>    Ramesh>     service cassandra start
>    Ramesh>     /etc/init.d/cassandra start
>
>    Ramesh>     it waits for a few seconds, then returns the prompt.
>    Ramesh> But the service never starts.  When we try to start with
>    Ramesh> cassandra -f , it works fine.
>
> If you installed from the Debian package you probably have a known
> permission problem, and you should see it recorded in
> /var/log/cassandra/output.log when starting from the init script. See
> https://issues.apache.org/jira/browse/CASSANDRA-3198
>
> The fix is to:
>  chown -R cassandra: /var/lib/cassandra
>  chown -R cassandra: /var/log/cassandra
>
> Cheers!
> Shyamal
>
>

Re: unable to start as a service on Ubuntu server

Posted by Shyamal Prasad <sh...@member.fsf.org>.
>>>>> "Ramesh" =3D=3D Ramesh S <in...@gmail.com> writes:

    Ramesh>     Hello all, We installed Cassandra on our development
    Ramesh> server , which is a fresh Ubuntu server running only
    Ramesh> Cassandra.  We followed all the instructions on this
    Ramesh> link=C2=A0and when we want to start the server as a service by
    Ramesh> issuing either of the command.

    Ramesh>     service cassandra start
    Ramesh>     /etc/init.d/cassandra start

    Ramesh>     it waits for a few seconds, then returns the prompt.
    Ramesh> But the service never starts.  When we try to start with
    Ramesh> cassandra -f , it works fine.

If you installed from the Debian package you probably have a known
permission problem, and you should see it recorded in
/var/log/cassandra/output.log when starting from the init script. See
https://issues.apache.org/jira/browse/CASSANDRA-3198

The fix is to:
  chown -R cassandra: /var/lib/cassandra
  chown -R cassandra: /var/log/cassandra

Cheers!
Shyamal


Re: unable to start as a service on Ubuntu server

Posted by Konstantin Naryshkin <ko...@a-bb.net>.
Yes, they start Cassandra as a daemon in the background. It is running. You can connect to it from the CLI or any other client. You can see what it is doing by reading the logs. cassandra -f starts Cassandra in the foreground, that is why it does not return a prompt when the server starts.

----- Original Message -----
From: "Ramesh S" <in...@gmail.com>
To: user@cassandra.apache.org
Sent: Tuesday, September 27, 2011 5:03:12 PM
Subject: unable to start as a service on Ubuntu server




Hello all, 


We installed Cassandra on our development server , which is a fresh Ubuntu server running only Cassandra. 
We followed all the instructions on this link and when we want to start the server as a service by issuing either of the command. 


service cassandra start 
/etc/init.d/cassandra start 


it waits for a few seconds, then returns the prompt. 
But the service never starts. 
When we try to start with cassandra -f , it works fine. 


What could be the issue. 
Any help would be appreciated. 


many thanks