Changing EC2 Cassandra instance's remote access port? - amazon-ec2

I set up Cassandra on EC2 according to this: http://www.datastax.com/docs/datastax_enterprise2.2/install/install_dse_ami
All is well, and it's all up and running, including OpsCenter. For the time being, I have a completely open (0.0.0.0/0) security policy. I'll fiddle with that once I can finally connect remotely.
The problem, I'm told, is that our corporate firewall blocks almost all ports, save for 22, 80, 8080, and 8888. Thus, when I try to connect to Cassandra locally: e:\cassandra\bin\cassandra-cli -host ec2-X-X-X-X.us-east-1.compute.amazonaws.com -port 9160
I get the error:
org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused: connect
Given that I cant open any additional ports in my corporate firewall, what can I do to connect to Cassandra? Can I tell it to allow connections on 8080 instead?

It sounds like you are having trouble connecting from your machine to the Cassandra machine due to the corporate firewall. There are a couple of solutions
Connect to machine via ssh first
You could connect to the EC2 machine and connect from there.
Change the thrift port
You certainly could change the thrift port in the cassandra.yaml file, but make sure you change it in the opscenterd.conf also. Realize that if something else is running on 8080, then this probably will not work.
You could also look into using the DataStax DevCenter too, which would help keep things behind the firewall. This is in alpha, but it may help your situation.

Related

Accessing webserver on AWS ec2 (Ubuntu)

I am running a webserver on an Ubuntu ec2 instance. The service accepts http connections over port 8080.
The next step is to allow the service to be e accessible using public_DNS:8080. I've modified the security group to accept all incoming traffic on 8080. However, I get connection refused when I try it on my browser. I am guessing it is something to do with the Ubuntu firewall.
I have very little idea about it. Any suggestions on how I can proceed to resolve this?

Not able to access EC2 custom port from remote machine

I have hosted web application (developed in PHP) on Amazon EC2 micro instance. As per default setting, i can access 80, 22, 443 and 3306 ports from remote locations means from Home(terminal window) using telnet command.
I want to open another custom TCP port XXXXX. I have added that port in Security Group. when i am trying to connect that port through telnet command it is always show "Connection refused".
I have been trying to solve this issue for 3 days but could not get successful solution.
Help would be really appreciated.
Thanks
Adding a port in security group (inbound) ensures that the port can be accessed from outside. Please check following
Is the port open for anywhere (0.0.0.0/0) or for a custom IP. If for custom IP, please check the IP of your machine (search 'what is my ip' on google).
Is there any application listening on the port on EC2 machine.

Changes to iptable blocked all the ports, hence unable to connect to this Amazon EC2 instance through putty

Yesterday I was working on blocking of access to Redis server from out side doing by doing some changes to "iptable" file, unfortunately it blocked all the port which includes port 80 and 22 also, Hence I was unable to connect to EC2 instance from putty. Will you tell me how to resolve this issue.
You will have to do something like this: https://aws.amazon.com/articles/5213606968661598
I hope you are using EBS and not ephemeral storage. You know you could have used EC2 Security Groups instead of iptables, and then you could have easily fixed your mistake.

Couchbase server refusing network connections - any ideas what might be the issue?

I downloaded the community edition of couchbase server, and am running it on a mac system.
It's up and running according to the console:
However, when I try to test it:
$ telnet localhost 8091
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
I've told the firewall app to allow the "Couchbase Server.app" application to accept incoming network connections, and doesn't seem to have helped.
Any ideas what might be the issue here?
Yes, telnet into Couchbase should be through 11211... http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-getting-started-testing.html
Did you try to connect to it through any of the SDK's (C/Ruby/Java/.NET/PHP/Python/Perl)? If you ever need immediate help, you can also go to IRC (freenode.net), in the #libcouchbase or #couchbase channels, or post another question here of course.
I was connecting to the server on the wrong port. To see the port to use when accessing the server, open up the relevant data bucket, and check what port it's running on. By default, it will most likely be accessible on 11211

postgresql and firewall

I will be building a server/client software on Windows, where many machines need to communicate with a Postresql database running on the server. This is C++ software so I will use libpq to connect to the database.
If I do this, will there be issues with the firewall? I'd like to make configuration as easy as possible and not have users open up firewall ports or disable their firewall.
If I do need to open up firewall ports, can I use WCF to get around the issue? Basically send a command to the server using WCF, run the postgresql command locally, and get the result back (I have never used WCF but understand that it can communication using HTTP port 80).
PostgreSQL typically listens on port 5432, which is not open by default in the Windows firewall. But the only machine where the firewall would need to be re-configured is the one where PostgreSQL is running. If you have many client machines, none of them should require firewall changes (unless they have restrictions on outbound traffic, which is rare).
Hope this helps.
You can also configure SSL connections to ensure better security.

Resources