I am new to Cassandra. I installed Cassandra in Cloud server & its up and running.
I downloaded "No Sql Manager" to connect to Cassandra DB. While trying to connect giving error as below.
All hosts tried for query failed (tried 127.0.0.1:49984: SocketException 'A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied') Details: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
How to connect?
Is your Cassandra node running on the same node as NoSQL Manager? If not, then you should supply the actual (external) IP address, and not 127.0.0.1.
Also, Apache Cassandra by default accepts client connections on port 9042. I'm not sure where 49984 is coming from, but try changing that to 9042, instead.
Related
Is there any error on a socket when writing to it after IP address change?
In my I'm using TCP socket, both read/write (non-passive), no TCP or application keep-alive.
To inspect this case I use socat to connect to a simple echo server on my local network. The connection is OK until I change the client IP address on my router and restart the network interface.
At this point, I can write to a socket without any errors despite the IP of the client was changed, but no messages are being delivered anymore. I wait for some minutes and change the IP back. All the 'stashed' messages which were unable to be sent are being sent.
As far as I understand, when client IP was changed TCP connection does not exist anymore.
Why there are no errors when writing to the socket when IP was changed? Is this specific to a Linux TCP stack or specified by TCP/IP?
A TCP connection is defined by source IP, source port, destination IP, and destination port. Changing the client's IP address on your router does not cause the connection on your client and server to cease to exist immediately; however, if you leave the router in this state long enough, the connection will eventually cease to exist after certain amount of retries and timeouts have occurred. The exact amount is determined via configurable kernel parameters both on your client and on your echo server. You can inspect these parameters with sysctl -a | grep tcp
After you've changed the client's IP address on your router, the client is still able to send packets to the server, and the server is also able to receive these packets, but the server's attempt to reply/acknowledge back to the client is unable to be routed back to the client. This leads to retries up to a certain limit on the client (which is why you saw no errors on the client side). Once you've reverted the client's IP back on your router, the server is able to communicate with the client again as the router is now able to correctly route the server's packet to the client.
This retry behavior is not specific to the Linux TCP stack. rfc 2988 defines the standard algorithm that senders are required to use to compute and manage their retransmission timer.
Where I work we have a cloudfoundry server that provides RabbitMQ as a service. When I configure this service and try to connect using amqplib via (localhost, 127.0.0.1, etc) it doesn't connect. When I look at the Java project, it never configures an IP and seems to connect natively through a driver or something (using Spring).
How would I connect using amqplib without an IP? Should I use another node lib instead?
You can make a connection without setting the hostname but then the hostname is set as "localhost" as described in the documentation.
If your RabbitMQ is on a remote server you must provide
a remote IP address
port (if it is different from the default 5672)
username and password of not default user as mentioned here
You may not be able to make a connection due to closed port on the remote server is closed, check it via telnet
Your server is not listening or accepting connections on 127.0.0.1:9042. Verify host and port information is correct
VM: 127.0.0.1:9042
JDBC URL :jdbc:cassandra://127.0.0.1:9042/quantum_cassandra
Driver:cdata.jdbc.cassandra.CassandraDriver
Appreciate your help on this.
This error message in Aqua Data Studio indicates that your host/port is incorrect, or your server is not listening on that port, or a firewall is blocking network access to it.
You just need to make sure your server is running correctly and no firewall is blocking your connection. Note that IP address 127.0.0.1 is a local loopback and is only accessible on the same machine and not remotely.
I am using the "test.udl" to test the connect.
When I use the IP which is from the router, it can connection test is succeeded.
Then I try to use the real IP for testing connect, it got fall.
The router has set as below:
Archer C2>forwarding>Virtual Server:
Service Port=1433,1434,49172
Ip address=192.168.0.100(Permanent)
And I have closed the firewall in windows.
The Sql server configuration manager setting:
TCP IP Properties>IP Address>
IP1:
Active:yes
Enabled:yes
IP Address:119.246.x.x
TCP Dynamic ports:0
TCP port:null(unset)
IP2:
Active:yes
Enabled:yes
IP Address:192.168.0.100
TCP Dynamic ports:0
TCP port:null(unset)
test.udl test information:
Fail test
server name:119.246.x.x\server
Use Windows NT integrated security
result:
Test connection failed because of an error in initializing provider.
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
succeed test
server name:192.168.0.100server
Use Windows NT integrated security
result:
Test connection succeeded.
Does anyone know where i got wrong?
It is a bug.
SYMPTOMS
When you try to connect to a clustered Microsoft SQL Server 2005 or Microsoft SQL Server 2000 named instance by using the "servername\instancename" syntax, you receive the following error message:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
You may receive this error message when the following conditions are true:
SQL Server 2005 or SQL Server 2000 is installed on a cluster.
You are connecting to a SQL Server named instance by using TCP/IP sockets.
IPSec policy is enabled on the client domain.
IPSec policy is not enabled on the server domain.
CAUSE
This problem occurs during the discovery phase of the connection. The IPSec policy on the client drops packets from the server when the source IP changes.
WORKAROUND
To work around this problem, you have to hardcode the TCP port or the Named Pipe of the SQL Server named instance. To do this, use a connection string that is similar to one of the following:
[oledb]
; Hardcoded TCP OLE DB initstring
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security >Info=False;User ID=clientID;Data Source=tcp:TcpIpAddress,port
[oledb]
; Hardcoded Named Pipes OLE DB initstring
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security >Info=False;User ID=clientID;Data Source=np:\ServerName\pipe\MSSQL$InstanceName\sql\query
*Source taken from https://support.microsoft.com/en-us/kb/888228
Hope it helped
I have solved it. It may cause of the default port is not 1433.
I checked the log file viewer(SQL server Management studio>SQL Server Agent>Error logs>current(archive is also work))
only tick on the sql server check box
find "server is listening on[ 127.0.0.1 xxxx].
In my case it is 9662/9663
I add them all in my router and succeed to connect.
Thank you all above.
I am working on a project in which I am trying to communicate to the HBase Server via thrift server from a C# client.
I have HBase server set up. I am able to open the socket.
When calling the API: _hbase.getTableNames(), it throws an exception; I stepped into this function ,
it is internally calling - send_getTableNames(); and recv_getTableNames();.
The first function passes (internally they are writing to the socket) but in the second
function they are trying to read from the socket and the client thrift code is receiving zero bytes,
hence it's throwing an exception.
What could be reason for this?
NOTE: the server has HBase 0.92.0 installed on it and using HBase.thrift that comes with it on the thrift server side.
But on the client side we are using the HBase.thrift file that comes with the HBase 0.94.0.
I am guessing this could be the reason( though I may not be correct).
Following is the code snippet on the client side which fails:
transport.Open();
var names = _hbase.getTableNames();
I was using AWS HBase over EMR and then thrift server spinned over the HBase server. while setting up the thrift server, there is an option in AWS Management console to set the allowed IP addresses and the port numbers. I was allowing the port number as 9000 , but the thrift server listens at port number 9090. Once I added the port number 9090 to the allowed port number list I was able to connect to it.