Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make it work with IPs instead of DNS names? #41

Open
fog1985 opened this issue Jul 12, 2017 · 0 comments
Open

How to make it work with IPs instead of DNS names? #41

fog1985 opened this issue Jul 12, 2017 · 0 comments

Comments

@fog1985
Copy link

fog1985 commented Jul 12, 2017

Hi all,

My configuration for the server look as follow:

{
"_id": "MyClusterServer2",

    "description" : "My cluster member",

    "address": "192.168.23.232:37027",
    "cmdOptions":{
        "port": 37027,
        "dbpath": "~/mongodb-data/my-cluster-server2",
        "directoryperdb": true
    }
},

for other server (closter node which is aimed to be run locally) I define "localhost" as the host.

But during run (server/cluster start) "mongoctl" produces number of errors as follow:

Unable to resolve address '192.168.132.236' for server 'MyClusterServer1'. Cause: Invalid host 'ip-192-168-132-112'. Cause: [Errno -2] Name or service not known
Unable to resolve address '192.168.132.112' for server 'MyClusterArbiter'. Cause: Invalid host 'ip-192-168-132-112'. Cause: [Errno -2] Name or service not known
Unable to determine primary server for replica set cluster 'MyCluster'

Even more complicated is that despite of that, it starts mongo instance.
But then I can't delete it:

mongoctl stop MyClusterServer1

Checking to see if server 'MyClusterServer1' is actually running before stopping it...
Unable to determine pid for server 'MyClusterServer1'. pid file '/home/ubuntu/mongodb-data/my-cluster-server1/pid.txt' does not exist
Stopping server 'MyClusterServer1' (pid=[Cannot be determined])...

Sending the following command to localhost:27017:
{
"shutdown": 1,
"force": false
}

Failed to gracefully stop server 'MyClusterServer1'. Cause: shutdown must run from localhost when running db without auth
Issue the shutdown with force command? [y/n] y

Sending the following command to localhost:27017:
{
"shutdown": 1,
"force": true
}

Failed to gracefully stop server 'MyClusterServer1'. Cause: shutdown must run from localhost when running db without auth
Cannot forcibly stop the server because the server's process ID cannot be determined; pid file '/home/ubuntu/mongodb-data/my-cluster-server1/pid.txt' does not exist.
Unable to stop server 'MyClusterServer1'.

Though server is up and running:

mongoctl status MyClusterServer1

Status for server 'MyClusterServer1':
{
"connection": true,
"serverStatusSummary": {
"connections": {
"current": 3,
"available": 419427
},
"host": "894c34d3b089",
"version": "3.2.6"
},
"selfReplicaSetStatusSummary": {
"stateStr": "SECONDARY",
"name": "192.168.132.236:27017"
}
}

Hence, everything is messed up. It somehow works, though telling me that it can't connect and actually even find other nodes.
I can't stop it at all.

Regards,
Taras.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant