Skip to content
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

"No keyspace has been specified" #42

Open
outoftime opened this issue Jan 12, 2013 · 2 comments
Open

"No keyspace has been specified" #42

outoftime opened this issue Jan 12, 2013 · 2 comments

Comments

@outoftime
Copy link
Contributor

I'm seeing this error, which is a little baffling. The scenario is typically a worker process that has been running for a while without needing to touch the Cassandra connection. Then it finally does try a query to Cassandra, and explodes on this.

Weird that it throws a "no keyspace has been specified" error when the query is specifying a keyspace...

CassandraCQL::Error::InvalidRequestException
Error
no keyspace has been specified
cassandra-cql-1.1.4/lib/cassandra-cql/database.rb:101:in `rescue in execute_cql_query'
cassandra-cql-1.1.4/lib/cassandra-cql/database.rb:99:in `execute_cql_query'
cassandra-cql-1.1.4/lib/cassandra-cql/statement.rb:47:in `execute'
cassandra-cql-1.1.4/lib/cassandra-cql/database.rb:88:in `execute'
cassandra-cql-1.1.4/lib/cassandra-cql/database.rb:47:in `block in connect!'
thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:122:in `call'
thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:122:in `block in do_callbacks'
thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:121:in `each'
thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:121:in `do_callbacks'
thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:99:in `connect!'
thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:153:in `handled_proxy'
thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:53:in `execute_cql_query'
cassandra-cql-1.1.4/lib/cassandra-cql/database.rb:99:in `execute_cql_query'
cassandra-cql-1.1.4/lib/cassandra-cql/statement.rb:47:in `execute'
cassandra-cql-1.1.4/lib/cassandra-cql/database.rb:88:in `execute'

Any ideas? For now I'd be thrilled by a workaround...

@ameliaj8
Copy link

ameliaj8 commented Jun 5, 2013

I've also encountered this error. Restarting the process fixes it, but a proper fix would be appreciated.

@askumar
Copy link

askumar commented Apr 24, 2015

Hi, I am getting error when i do
CassandraCQL::Database.new('127.0.0.1:9160', {:keyspace => 'keyspace1'})

CassandraCQL::Error::InvalidRequestException: Keyspace 'keyspace1' does not exist
from /usr/local/share/gems/gems/cassandra-cql-1.2.2/lib/cassandra-cql/database.rb:121:in rescue in execute_cql_query' from /usr/local/share/gems/gems/cassandra-cql-1.2.2/lib/cassandra-cql/database.rb:115:inexecute_cql_query'
from /usr/local/share/gems/gems/cassandra-cql-1.2.2/lib/cassandra-cql/statement.rb:47:in execute' from /usr/local/share/gems/gems/cassandra-cql-1.2.2/lib/cassandra-cql/database.rb:104:inexecute'
from /usr/local/share/gems/gems/cassandra-cql-1.2.2/lib/cassandra-cql/database.rb:63:in block in connect!' from /usr/local/share/gems/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:128:incall'
from /usr/local/share/gems/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:128:in block in do_callbacks' from /usr/local/share/gems/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:127:ineach'
from /usr/local/share/gems/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:127:in do_callbacks' from /usr/local/share/gems/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:100:inconnect!'
from /usr/local/share/gems/gems/cassandra-cql-1.2.2/lib/cassandra-cql/database.rb:65:in connect!' from /usr/local/share/gems/gems/cassandra-cql-1.2.2/lib/cassandra-cql/database.rb:38:ininitialize'

Any idea why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants