Connect to cassandra on Google Cloud Compute - google-app-engine

I deployed a Cassandra cluster through their launcher: https://cloud.google.com/launcher/explore?q=cassandra
I can connect to the VM fine, through SSH/PuTTY.
Then when I try to connect with for example DBeaver I get:
com.datastax.driver.core.exceptions.NoHostAvailableExeption: All host(s) tried for query failed(tried: /x.x.x.x:9160)
com.datastax.driver.core.ConnectionExption:[/x.x.x.x:9160] Unexpected error during transport initialization. Connection has been closed
Or with cassandra-driver (nodejs), I get:
All host(s) tried for query failed. First host tried, x.x.x.x:9160: Error: read ECONNRESET. See innerErrors.
InnerErrors: { 'x.x.x.x:9160': { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } }
Info: Represents an error when a query cannot be performed because no host is available or could be reached by the driver.
I've forwarded the 9160 port in the google developer console and it seems to work because when I stop the cassandra server on the VM it gives a different error, indicating connection is refused:
All host(s) tried for query failed. First host tried, x.x.x.x:9160: Error: connect ECONNREFUSED. See innerErrors.
InnerErrors: { 'x.x.x.x:9160':
{ [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' } }
Info: Represents an error when a query cannot be performed because no host is available or could be reached by the driver.
Now, I've tried editing the cassandra.yaml rcp_adress to the actual external address instead of 0.0.0.0.
I've also tried the internal serverfarm address.
I've not changed the default authentication (but also tried with auth):
authenticator: AllowAllAuthenticator
# authenticator: PasswordAuthenticator
authorizer: AllowAllAuthorizer
# authorizer: CassandraAuthorizer
I'm at a loss, the connection seems to work, but cassandra seems to not allow a login or reset the connection?

You are trying to connect on the thrift port (9160). You should be using the native protocol port (9042).

Related

Protocol error when executing cpp-driver datastax

I am currently workinig on datastax cpp-driver in C and was working around some examples when I came across a very trivial problem. While trying to execute the Basic Authentication Script here, I found this error showing up and the code execution getting stuck.
The Error:
1587040775.210 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.3 because of the following error: Underlying connection error: Connect error 'connection refused'
1587040775.210 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.2 because of the following error: Underlying connection error: Connect error 'connection refused'
1587040775.211 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.1 because of the following error: Underlying connection error: Received error response 'Invalid or unsupported protocol version (66); supported versions are (3/v3, 4/v4, 5/v5-beta)' (0x0200000A)
1587040775.211 [WARN] (cluster_connector.cpp:289:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Host 127.0.0.1 does not support protocol version DSEv2. Trying protocol version DSEv1...
1587040775.212 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.1 because of the following error: Underlying connection error: Received error response 'Invalid or unsupported protocol version (65); supported versions are (3/v3, 4/v4, 5/v5-beta)' (0x0200000A)
1587040775.212 [WARN] (cluster_connector.cpp:289:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Host 127.0.0.1 does not support protocol version DSEv1. Trying protocol version v4...
What could be these protocols that are not supported by my machine? Also, after it comes to the last warning, which is trying protocol v4 it gets stuck.
I'm using Casssandra 3.10+, Cpp-driver 2.13.
Anybody with a workaround or a solution would be of much help. Thanks in advance
I've looked around a bunch to find some documentation to back this up but I can't find any, so this part is conjecture. It appears that server version 3 uses protocol V3. It looks like server version 4 (still in beta) will use protocol V4. I suspect V5 is a future iteration that is being planned and still not written in stone yet (and why it's tagged as beta in the warning).
This part isn't conjecture.
If you add this to your code before you connect to the cluster:
cass_cluster_set_protocol_version(cluster, CASS_PROTOCOL_VERSION_V3);
All the warnings about downgrading to different protocols should go away.

Solr server is running but no admin panel

I am trying to get a solr server running to use with Sitecore, but I can't seem to get it to work.
When I start solr (6.6.1) I get the message:
> bin\solr.cmd -p 8983
Waiting up to 30 to see Solr running on port 8983
Started Solr server on port 8983. Happy searching!
But when I go to localhost:8983/solr/ I get an empty page or some messages about not being able to connect (differs from each browser).
When I do a status it says that the server is running and some information about the usage so this seems fine.
But when I do a healthcheck on the server I get a lot of warnings saying:
WARN - 2018-02-27 09:48:27.768; org.apache.zookeeper.ClientCnxn$SendThread; Session 0x0 for server BBLP-JSCHOOT.colo.betabit.nl/0:0:0:0:0:0:0:1:8983, unexpected error, closing socket connection and attempting reconnect
java.io.IOException: Packet len352518912 is out of range!
at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112)
at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:79)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
WARN - 2018-02-27 09:48:28.240; org.apache.zookeeper.ClientCnxn$SendThread; Session 0x0 for server pso/127.0.0.1:8983, unexpected error, closing socket connection and attempting reconnect
and after some of these I get:
ERROR: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper localhost:8983 within 10000 ms
Anyone has any idea what can cause this? Seems that something is wrong with zookeeper but I can't quite figure out what that is.

Node mssql module error on AWS Lambda

I am facing an issue with the mssql node module, it is working very well in the local environment but when I deployed the code base into AWS lambda and from there if I execute the function it is failing for some reason below is the error.
START RequestId: 5ea5fc6b-9d45-11e7-9dca-ffdf71e8f823
Version: $LATEST2017-09-19T14:18:28.733Z 5ea5fc6b-9d45-11e7-9dca-ffdf71e8f823
SQL connection error { ConnectionError: Failed to connect to 10.71.12.16:49001 in 15000ms
at Connection.tedious.once.err
Note: even in local it should be in the allocated network to get the response.
Any help would be appreciated.

Tomcat instance fails to start: ERROR: transport error 202: bind failed: Address already in use

I have two tomcat instances with shared tomcat installation on a ubuntu box.
Each server has its own shutdown port and own listener port.
When i start the second server (either one) I get the following error:
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197):
No transports initialized [../../../src/share/back/debugInit.c:750]
FATAL ERROR in native method:
JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
I am not trying to run these servers in debug mode. Have no additional startup options supplied.
I have checked other threads here but none of the solutions work for me. I've done netstat on the concerned port and there is nothing.

MongoDB, issues with configuring and starting

I am new to mongoDB and i am trying to get it configured and running on my Ubuntu server. When i go and enter this command in my terminal
sudo service mongod start
I get the following output
start: Job is already running: mongod
So, when i try to enter the shell with
mongo
I get the following output
2015-02-24T14:54:39.557-0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-02-24T14:54:39.559-0800 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
I know I'm not working locally so I heard over to the mongod.conf file and change the following
port = 5000
# Listen to local interface only. Comment out to listen on all interfaces.
bind_ip = 10.0.1.51
Where bind_ip is now my ubuntu server and the port is 5000 as shown, so now i restart the service with
sudo service mongod restart
and outsputs
mongod start/running, process 1755
And now I try to renter back into shell with
mongo
and i still get the same error messages
MongoDB shell version: 2.6.7
connecting to: test
2015-02-24T15:01:26.229-0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-02-24T15:01:26.230-0800 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed
Can someone help me out with this issue? I've been going through the forums and nothing appears to be working. Thanks.
If anyone is having trouble, i looked into mongod --help and found the following solutions
mongod --smallfiles
or
mongod --nojournal
hope this helps anyone.

Resources