You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Bob Futrelle <bo...@gmail.com> on 2012/12/25 22:56:24 UTC

Changing rpc_port in cassandra.yaml has no effect

I have been using cqlsh (and --cql3) successfully for a few weeks.
But yesterday it stopped working, with the all too familiar,

     "Connection error: Could not connect to localhost:9160"

Still got the same message, 9160, after I changed the rpc_port in the yaml
file to 9161 or 9159.

I recently installed the Maven plugin in Eclipse, so I thought that might
be the problem. (My prototyping/research code is so simple that I've used
Eclipse's builds with no problems for years.  Maven would be overkill.)

I reread the various Cassandra docs, reinstalled Cassandra
(apache-cassandra-1.1.7) recreated the var/lib directories, rebooted my
machine, restarted Eclipse, that's about all I could think of.  Eclipse was
going to be the next stage for me after various cqlsh experiments, so it
shouldn't have any effect on the CLI.    I'm no expert on ports and the
like. I don't do web servers/clients.  My expertise is in the Java/Swing
systems I build for NLP research.  Now that I'm retired and working from
home, I can't just walk down the hall and talk with our systems experts.

  - Bob Futrelle

Re: Changing rpc_port in cassandra.yaml has no effect

Posted by Bob Futrelle <bo...@gmail.com>.
Thanks for the detailed help.
I'll follow up.

   - Bob Futrelle


On Fri, Dec 28, 2012 at 1:51 PM, Andras Szerdahelyi <
andras.szerdahelyi@ignitionone.com> wrote:

>
>  Its not clear to me how you are starting the daemon. You mention Eclipse
> - do you have Cassandra embedded in an Eclipse project? cassandra.yaml
> might not be read correctly. Make sure its on the class path, i have it in
> src/main/resources and it gets picked up from there just fine ( although i
> only ever use it in my unit tests )
>
>  CassandraDaemon cassandra = new CassandraDaemon();
> cassandra.init(null);
> cassandra.start();
>
>  It might also be worthwhile to inspect log output from
> org.apache.cassandra. Put this in your log4j.properties
>
>  log4j.logger.org.apache.cassandra = FINEST, cassandra
>  # Cassandra log
>  log4j.appender.cassandra = org.apache.log4j.RollingFileAppender
>  log4j.appender.cassandra.File = target/log/cassandra.log
> log4j.appender.cassandra.MaxFileSize = 10MB
> log4j.appender.cassandra.MaxBackupIndex = 5
> log4j.appender.cassandra.layout = org.apache.log4j.PatternLayout
> log4j.appender.cassandra.layout.ConversionPattern = %d %p %c - %m%n
>
>
> Andras Szerdahelyi*
> *Solutions Architect, IgnitionOne | 1831 Diegem E.Mommaertslaan 20A
> M: +32 493 05 50 88 | Skype: sandrew84
>
>
>
>
>
>  On 25 Dec 2012, at 22:56, Bob Futrelle <bo...@gmail.com> wrote:
>
>  I have been using cqlsh (and --cql3) successfully for a few weeks.
> But yesterday it stopped working, with the all too familiar,
>
>       "Connection error: Could not connect to localhost:9160"
>
>  Still got the same message, 9160, after I changed the rpc_port in the
> yaml file to 9161 or 9159.
>
>  I recently installed the Maven plugin in Eclipse, so I thought that
> might be the problem. (My prototyping/research code is so simple that I've
> used Eclipse's builds with no problems for years.  Maven would be overkill.)
>
>  I reread the various Cassandra docs, reinstalled Cassandra
> (apache-cassandra-1.1.7) recreated the var/lib directories, rebooted my
> machine, restarted Eclipse, that's about all I could think of.  Eclipse was
> going to be the next stage for me after various cqlsh experiments, so it
> shouldn't have any effect on the CLI.    I'm no expert on ports and the
> like. I don't do web servers/clients.  My expertise is in the Java/Swing
> systems I build for NLP research.  Now that I'm retired and working from
> home, I can't just walk down the hall and talk with our systems experts.
>
>    - Bob Futrelle
>
>
>
>

Re: Changing rpc_port in cassandra.yaml has no effect

Posted by Andras Szerdahelyi <an...@ignitionone.com>.
Its not clear to me how you are starting the daemon. You mention Eclipse - do you have Cassandra embedded in an Eclipse project? cassandra.yaml might not be read correctly. Make sure its on the class path, i have it in src/main/resources and it gets picked up from there just fine ( although i only ever use it in my unit tests )

CassandraDaemon cassandra = new CassandraDaemon();
cassandra.init(null);
cassandra.start();

It might also be worthwhile to inspect log output from org.apache.cassandra. Put this in your log4j.properties

log4j.logger.org.apache.cassandra = FINEST, cassandra
# Cassandra log
log4j.appender.cassandra = org.apache.log4j.RollingFileAppender
log4j.appender.cassandra.File = target/log/cassandra.log
log4j.appender.cassandra.MaxFileSize = 10MB
log4j.appender.cassandra.MaxBackupIndex = 5
log4j.appender.cassandra.layout = org.apache.log4j.PatternLayout
log4j.appender.cassandra.layout.ConversionPattern = %d %p %c - %m%n


Andras Szerdahelyi
Solutions Architect, IgnitionOne | 1831 Diegem E.Mommaertslaan 20A
M: +32 493 05 50 88 | Skype: sandrew84


[cid:7BDF7228-D831-4D98-967A-BE04FEB17544]




On 25 Dec 2012, at 22:56, Bob Futrelle <bo...@gmail.com>> wrote:

I have been using cqlsh (and --cql3) successfully for a few weeks.
But yesterday it stopped working, with the all too familiar,

     "Connection error: Could not connect to localhost:9160"

Still got the same message, 9160, after I changed the rpc_port in the yaml file to 9161 or 9159.

I recently installed the Maven plugin in Eclipse, so I thought that might be the problem. (My prototyping/research code is so simple that I've used Eclipse's builds with no problems for years.  Maven would be overkill.)

I reread the various Cassandra docs, reinstalled Cassandra (apache-cassandra-1.1.7) recreated the var/lib directories, rebooted my machine, restarted Eclipse, that's about all I could think of.  Eclipse was going to be the next stage for me after various cqlsh experiments, so it shouldn't have any effect on the CLI.    I'm no expert on ports and the like. I don't do web servers/clients.  My expertise is in the Java/Swing systems I build for NLP research.  Now that I'm retired and working from home, I can't just walk down the hall and talk with our systems experts.

  - Bob Futrelle



Re: Changing rpc_port in cassandra.yaml has no effect

Posted by Manu Zhang <ow...@gmail.com>.
assume you're using a *nix system, the command to check which program is
using port 9160:
netstat -anp | grep 9160


On Wed, Dec 26, 2012 at 5:56 AM, Bob Futrelle <bo...@gmail.com>wrote:

> I have been using cqlsh (and --cql3) successfully for a few weeks.
> But yesterday it stopped working, with the all too familiar,
>
>      "Connection error: Could not connect to localhost:9160"
>
> Still got the same message, 9160, after I changed the rpc_port in the yaml
> file to 9161 or 9159.
>
> I recently installed the Maven plugin in Eclipse, so I thought that might
> be the problem. (My prototyping/research code is so simple that I've used
> Eclipse's builds with no problems for years.  Maven would be overkill.)
>
> I reread the various Cassandra docs, reinstalled Cassandra
> (apache-cassandra-1.1.7) recreated the var/lib directories, rebooted my
> machine, restarted Eclipse, that's about all I could think of.  Eclipse was
> going to be the next stage for me after various cqlsh experiments, so it
> shouldn't have any effect on the CLI.    I'm no expert on ports and the
> like. I don't do web servers/clients.  My expertise is in the Java/Swing
> systems I build for NLP research.  Now that I'm retired and working from
> home, I can't just walk down the hall and talk with our systems experts.
>
>   - Bob Futrelle
>
>