selvakumar
selvakumar

Reputation: 327

could not connect localhost with cassandra?

my cassandra is working well in CLI. and thrift also installed well. i already started apache server and cassandara..but when trying to execute php file that is not executed on browser.it shows the error as: TException: Error: TSocket: Could not connect to localhost:9160 (Permission denied [13])

and the 12th and 13th line is: $socket = new TSocket('localhost', 9160); $transport = new TBufferedTransport($socket, 1024, 1024);

i gave 127.0.0.1 instead of localhost.even it is not working.

can any one please help me?

Upvotes: 1

Views: 1680

Answers (1)

selvakumar
selvakumar

Reputation: 327

hi every one i solve the problem....

selinux is cause for that problem.....

TException: Error: TSocket: Could not connect to localhost:9160 (Permission denied [13]) To resolve it, you need to change an SELinux boolean value (which will automatically persist across reboots). You may also want to restart httpd to reset the proxy worker, although this isn't strictly required.

setsebool -P httpd_can_network_connect 1

http://wiki.apache.org/httpd/13PermissionDenied

Upvotes: 1

Related Questions