Cloudant - Internal Server Error - cloudant

Cloudant local data edition version : 1.0.0.3
Linux distribution and version : centos 6.6
I recently installed Cloudant local data edition , configured it properly on 4 node cluster(1 load balancer and 3 data nodes).
everything looked fine then fired some curl command to create , retrieve and delete databases but got internal_server_error.
When i launched cloudant dashboard and got entered as admin , the specified operation actually was occuring but on terminal
i got error messages.
Command Snippet
[root#******1983 etc]# curl -X GET -u admin:**** http://*******/_all_dbs
["_users","first_data","first_testing_database","metrics","metrics_app","new","stats","t1","t_alpha"]
[root#******1983 etc]# curl -X GET -u admin:**** http://********/t_alpha
{"error":"error","reason":"internal_server_error",}
[root#******1983 etc]# curl -X DELETE -u admin:**** http://********/t_alpha
{"error":"error","reason":"internal_server_error",}
i used the instructions to use the Weatherreport utility to check the health of my Cloudant cluster. i set the path using export command:
export PATH=$PATH:/opt/cloudant/bin
then run weatherreport but it says "could not connect to local cluster node".
i have given full address of my all 4 nodes in /etc/hosts , /etc/sysconfig/network , /etc/resolve.conf
command snippet
[root#******** etc]# /opt/cloudant/bin/weatherreport
['cloudant_diag3989#******** #'] [warning] Could not connect to the local cluster node 'cloudant#********#', some checks will not run.
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_tcp_queues: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_search: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_safe_to_rebuild: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_process_memory: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_process_calls: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_nodes_connected: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_node_stats: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_message_queues: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_memory_use: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_membership: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_mem3_sync: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_ioq: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_internal_replication: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_disk: nodedown
['cloudant_diag3989#******** #'] [crit] Bad rpc call executing check weatherreport_check_custodian: nodedown

Cloudant Local uses the FQDN to communicate between nodes. Please ensure you have the correct FQDN and corresponding IP address for all nodes in /etc/hosts on ALL nodes (load balancer and DB nodes).
i.e.
192.168.0.10 lb1.cloudant.local lb1
192.168.0.11 db1.cloudant.local db1
192.168.0.12 db2.cloudant.local db2
192.168.0.13 db3.cloudant.local db3
/etc/resolv.conf (not resolve.conf ^^) should (only) contain your DNS IP address(es) on all nodes.
i.e.
nameserver 192.168.0.1
nameserver 8.8.4.4
AFAIK, /etc/sysconfig/network only applies to Debian/Ubuntu and contains network info for the local machine only.

Check /opt/cloudant/etc/vm.args file. You have set incorrect -name parameter with machine name. This is clear from error message
"Could not connect to the local cluster node 'cloudant#********#'.
Here extra # is present at the end of machine name.

Related

error on start nginx service on ubuntu vps

i am begginer user of vps, i have a reactJS app, and i wnat to deploy it on my ubuntu 18 vps with nginx.
I have followed the stpes of this tutorial Deploying create-react-app with Nginx and Ubuntu
i had already check all the steps, but when i put the command
sudo service nginx start
the system show's me, the next error message:
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
and when i put "journalctl -xe" shows me this:
nginx, error
ngnix, error
please help me friends
Look in your log file on messages before the error "Failed to startup nginx"
You will see the reason of problem.
bind() to 0.0.0.0:80 failed (98: Address already in use)
Looks like port 80 on your vps server is already in use by some application.
Port 80 used for HTTP services.
So most likely you already have run Apache HTTP server, or some other.
use this command to see what application use it
sudo netstat -tulpn | grep ":80"
If you see apache
tcp6 0 0 :::80 :::* LISTEN 349/apache2
then you can stop apache
# apache service name also can be httpd (use right command)
# sudo service httpd stop
sudo service apache stop
and run nginx
sudo service nginx start
But you should be sure that you don't use apache for another website.

Azkaban Execute error

Got following Error when Executing flow.
Error submitting flow bar. azkaban.executor.ExecutorManagerException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:10000 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
I changed some lines in azkaban.properties.
default.timezone.id=Asia/Tokyo
jetty.port=8081
executor.port=10000
azkaban using azkaban-solo-server.
It looks as though the azkaban-web-server is not able to contact the azkaban-exec-server. The azkaban executor is a separate process from the azkaban web interface and uses a separate configuration.
Firstly, confirm that the executor is running and listening on the correct port. eg. for a non-windows environment:
$ ps -elf | grep azkaban-exec-server
If it's not running, then it will need to be started. If it is running, then you need to ensure that the listening port of the executor is the same as the executor port configured in the azkaban-web-server azkaban.properties. You can do this by checking the -Dexecutorport argument to the running azkaban-exec-server process or by checking the executor.port value in the azkaban-exec-server azkaban.properties.
If this value differs from the executor.port value in the azkaban-web-server azkaban.properties then you need to ensure that the values match (either by modifying executor.port in the azkaban-web-server or azkaban-exec-server azkaban.properties) and that the relevant service(s) get restarted following any configuration changes.

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.

Task failed to execute on Development server

On Development Server, whenever I add an taskqueue
taskqueue.add(queue_name='default', url='/_tasks/do_something', params={'key': 1})
The following error occurred
taskqueue_stub.py:1974] Task task1 failed to execute. This task will retry in 819.200 seconds
After getting some hint from this post:
http://www.rogerthat.net/2012/03/27/google-app-engine-push-task-queues-the-development-environment/
I suspect it could be something to do with the hostname. I am using http://test.me:8088 (where test.me point to 127.0.0.1 using host file). The problem goes away when I change the hostname (test.me) to "localhost".
I can't just use localhost due to some app configuration issue.
The code edit rogerthat.net point out is no longer valid.
Any other solution?

Error connecting to Redis Server from Node.js on Amazon AWS EC2 server

I am trying to run a node.js server and a Redis server on an Amazon AWS Ec2 micro instance .
I have installed Redis Server and the redis-server command runs fine .
I use 'Forever' to keep the Redis-Server running . And it works fine .
But when I start my Node server , it fails to connect to the Redis-Server .
It gives the following error -
Error Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Doing a 'Forever List' shows that the redis server is running fine .
info: Forever processes running
data: uid command script forever pid logfile uptime
data: [0] _pXw node app.js 26670 26671 /home/ubuntu/.forever/_pXw.log 0:0:0:13.463
data: [1] ylT1 node redis-server 25013 26681
I have verified that when the redis-server starts , it starts at 6379 port .
Can anyone help me explain why this error is happening and how I fix this ?
I use the following code to connect to Redis . I have the client libraries installed for Redis .
var redis = require("redis"),
client = redis.createClient();
Everything runs fine when I run the code on my localhost .
If you are going to use Redis outside of AWS you can try next steps that helped me to connect Redis Server working on AWS from my local Nodejs application:
1) On AWS: sudo cp /etc/redis/redis.conf.backup /etc/redis/redis.conf. Backup saves you a lot of energy figuring out whats wrong :)
2) On AWS: stop redis-server: sudo /etc/init.d/redis-server stop
3) On AWS: open /etc/redis/redis.conf and find a line bind 127.0.0.1. Copy and paste new line below bind 0.0.0.0. So you could have several lines with bind parameter. BTW, port of connection can be changed in redis.conf as well
4) On AWS: start redis-server: sudo /etc/init.d/redis-server start
5) On AWS: type redis-cli ping you should see PONG message if redis-server started ok
6) On AWS: Now open Sequrity Group for your running isntance and add New Rule with "Type" - Custom TCP Rule, Port Range - 6379
7) In your local Nodejs application:
var redis = require("redis");
var redisClient = redis.createClient(redis_port, redis_host);
nodejs redis aws
Have you checked the redis client-server connection on AWS using the ping-pong routine. Next maybe you should try running it without forever, as root.

Resources