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

ReplicaSet Name is not configurable on UI #1288

Closed
Swissbite opened this Issue Feb 23, 2017 · 28 comments

Comments

Projects
None yet
10 participants
@Swissbite

Swissbite commented Feb 23, 2017

Create a working configuration for connecting to a replica set on mlab.com is not possible just with the GUI.

I had to edit the robomongo.json file to and add update the setName Property within the connection settings.

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Feb 23, 2017

Collaborator

Hi @Swissbite , first of all "setName" in the config file, is the cached set name and internal usage only for faster connections. And, it needs be called "cachedSetName", we will do this change probably in the next releases to avoid future confusions.

Normally, it should be possible to connect without set name. For example mongo atlas cloud service is connectable from Robomongo without entering set name.

I will tag this issue as 'critical', since you are unable to connect and do your work.
We will investigate replica set connection to mlab and try to send you a working mlab example.

Collaborator

simsekgokhan commented Feb 23, 2017

Hi @Swissbite , first of all "setName" in the config file, is the cached set name and internal usage only for faster connections. And, it needs be called "cachedSetName", we will do this change probably in the next releases to avoid future confusions.

Normally, it should be possible to connect without set name. For example mongo atlas cloud service is connectable from Robomongo without entering set name.

I will tag this issue as 'critical', since you are unable to connect and do your work.
We will investigate replica set connection to mlab and try to send you a working mlab example.

@Swissbite

This comment has been minimized.

Show comment
Hide comment
@Swissbite

Swissbite Feb 23, 2017

Hi @simsekgokhan
You can test with the public flip-flop replicationSet from mlab: http://flip-flop.mlab.com/

Swissbite commented Feb 23, 2017

Hi @simsekgokhan
You can test with the public flip-flop replicationSet from mlab: http://flip-flop.mlab.com/

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Feb 23, 2017

Collaborator

Thanks a lot, that public set made investigation much faster.

First of all, I have reproduced the problem, seems like the problem is Robomongo cannot learn the set name which is a critical information for connections to replica sets. We will investigate this, seems like a major problem at first look at the code. This is the cause of this problem:

rs-flip-flop:PRIMARY> rs.status()
{
        "ok" : 0,
        "errmsg" : "not authorized on admin to execute command { replSetGetStatus: 1.0 }",
        "code" : 13
}

So, if a user that can execute "rs.status()" command is used, I believe Robomongo will be able to connect.

Workaround Solution:

Seems like you were on the correct way, the cached set name saves the day.

  1. Close Robomongo.
  2. Please find your connection in /1.0/robomongo.json and configure setName property with the correct set name:
    "setName" : "rs-flip-flop"
  3. Open Robomongo

Note:
After any edit/save connection settings, failed connections or cloned connection settings, the cached set name will be cleared to empty string. For more details: please see "Cached set name feature" section on our blog: http://blog.robomongo.org/robomongo-1-rc1/

I was able to connect after these steps.
Please let us know if it will work for you too.

screenhunter_89 feb 23 16 52

Collaborator

simsekgokhan commented Feb 23, 2017

Thanks a lot, that public set made investigation much faster.

First of all, I have reproduced the problem, seems like the problem is Robomongo cannot learn the set name which is a critical information for connections to replica sets. We will investigate this, seems like a major problem at first look at the code. This is the cause of this problem:

rs-flip-flop:PRIMARY> rs.status()
{
        "ok" : 0,
        "errmsg" : "not authorized on admin to execute command { replSetGetStatus: 1.0 }",
        "code" : 13
}

So, if a user that can execute "rs.status()" command is used, I believe Robomongo will be able to connect.

Workaround Solution:

Seems like you were on the correct way, the cached set name saves the day.

  1. Close Robomongo.
  2. Please find your connection in /1.0/robomongo.json and configure setName property with the correct set name:
    "setName" : "rs-flip-flop"
  3. Open Robomongo

Note:
After any edit/save connection settings, failed connections or cloned connection settings, the cached set name will be cleared to empty string. For more details: please see "Cached set name feature" section on our blog: http://blog.robomongo.org/robomongo-1-rc1/

I was able to connect after these steps.
Please let us know if it will work for you too.

screenhunter_89 feb 23 16 52

@mbidewell

This comment has been minimized.

Show comment
Hide comment
@mbidewell

mbidewell Feb 23, 2017

I am also encountering this issue. The workaround noted does work for me.

mbidewell commented Feb 23, 2017

I am also encountering this issue. The workaround noted does work for me.

@Swissbite

This comment has been minimized.

Show comment
Hide comment
@Swissbite

Swissbite Feb 23, 2017

After setting the field "setName" in the json file, the connection worked and I'm able to do my work.

AFAIK you'll need access to the admin db to get the replication status. On mLab you'll need a DEDICATED Plan to have admin access.

Swissbite commented Feb 23, 2017

After setting the field "setName" in the json file, the connection worked and I'm able to do my work.

AFAIK you'll need access to the admin db to get the replication status. On mLab you'll need a DEDICATED Plan to have admin access.

@altairzuzu

This comment has been minimized.

Show comment
Hide comment
@altairzuzu

altairzuzu Feb 24, 2017

I can't connect to my free Atlas cluster.
Got "Error: Establish connection failed. SSL tunnel failure: Network is unreachable or SSL connection rejected by server"

"setName" isn't helping too.
SSL with self-signed certificate.
I've changed username, password and host name below.

{
"connectionName" : "Cluster0",
"credentials" : [
{
"databaseName" : "admin",
"enabled" : true,
"mechanism" : "SCRAM-SHA-1",
"userName" : "xxx",
"userPassword" : "xxx"
}
],
"defaultDatabase" : "xxx",
"isReplicaSet" : true,
"replicaSet" : {
"0" : "cluster0-shard-00-00-0xxxx.mongodb.net:27017",
"1" : "cluster0-shard-00-01-0xxxx.mongodb.net:27017",
"2" : "cluster0-shard-00-02-0xxxx.mongodb.net:27017",
"readPreference" : 0,
"setName" : ""
},
"serverHost" : "cluster0-shard-00-00-0xxxx.mongodb.net",
"serverPort" : 27017,
"ssl" : {
"allowInvalidCertificates" : true,
"allowInvalidHostnames" : false,
"askPassphrase" : false,
"caFile" : "",
"crlFile" : "",
"pemKeyFile" : "",
"pemPassPhrase" : "",
"sslEnabled" : true,
"useAdvancedOptions" : false,
"usePemFile" : false
}
}

altairzuzu commented Feb 24, 2017

I can't connect to my free Atlas cluster.
Got "Error: Establish connection failed. SSL tunnel failure: Network is unreachable or SSL connection rejected by server"

"setName" isn't helping too.
SSL with self-signed certificate.
I've changed username, password and host name below.

{
"connectionName" : "Cluster0",
"credentials" : [
{
"databaseName" : "admin",
"enabled" : true,
"mechanism" : "SCRAM-SHA-1",
"userName" : "xxx",
"userPassword" : "xxx"
}
],
"defaultDatabase" : "xxx",
"isReplicaSet" : true,
"replicaSet" : {
"0" : "cluster0-shard-00-00-0xxxx.mongodb.net:27017",
"1" : "cluster0-shard-00-01-0xxxx.mongodb.net:27017",
"2" : "cluster0-shard-00-02-0xxxx.mongodb.net:27017",
"readPreference" : 0,
"setName" : ""
},
"serverHost" : "cluster0-shard-00-00-0xxxx.mongodb.net",
"serverPort" : 27017,
"ssl" : {
"allowInvalidCertificates" : true,
"allowInvalidHostnames" : false,
"askPassphrase" : false,
"caFile" : "",
"crlFile" : "",
"pemKeyFile" : "",
"pemPassPhrase" : "",
"sslEnabled" : true,
"useAdvancedOptions" : false,
"usePemFile" : false
}
}

@bhyde

This comment has been minimized.

Show comment
Hide comment
@bhyde

bhyde Feb 26, 2017

FYI - The robomongo.json file is found in ~/.config/robomongo/1.0/robomongo.json (at least on the Mac).

bhyde commented Feb 26, 2017

FYI - The robomongo.json file is found in ~/.config/robomongo/1.0/robomongo.json (at least on the Mac).

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Feb 27, 2017

Collaborator

Hi @altairzuzu , thanks for reporting the issue.
It seems like Mongo Atlas free clusters uses MongoDB 3.4.x. Currently, Robomongo is in preparation to provide support for 3.4. We plan to work on 3.4 support as top priority task not in the following release.
For now, the solution is using other Mongo Atlas plans, they all use MongoDB 3.2.

Collaborator

simsekgokhan commented Feb 27, 2017

Hi @altairzuzu , thanks for reporting the issue.
It seems like Mongo Atlas free clusters uses MongoDB 3.4.x. Currently, Robomongo is in preparation to provide support for 3.4. We plan to work on 3.4 support as top priority task not in the following release.
For now, the solution is using other Mongo Atlas plans, they all use MongoDB 3.2.

@adriaanvanrossum

This comment has been minimized.

Show comment
Hide comment
@adriaanvanrossum

adriaanvanrossum Mar 1, 2017

For me then explanation was not very clear, so here is my addition:

  1. Find a way to get your replica set name, something like rs-..., mlab.com shows it in the URL
  2. Close Robomongo
  3. Open this file in your editor ~/.config/robomongo/1.0/robomongo.json on macOS and C:\Users\[your name]\.config\robomongo.json on Windows
  4. Search for the empty setName and add the replica set name there and save the file
  5. Start Robomongo again and it should work

adriaanvanrossum commented Mar 1, 2017

For me then explanation was not very clear, so here is my addition:

  1. Find a way to get your replica set name, something like rs-..., mlab.com shows it in the URL
  2. Close Robomongo
  3. Open this file in your editor ~/.config/robomongo/1.0/robomongo.json on macOS and C:\Users\[your name]\.config\robomongo.json on Windows
  4. Search for the empty setName and add the replica set name there and save the file
  5. Start Robomongo again and it should work
@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Mar 1, 2017

Collaborator

@harianus , thanks a lot for sharing the detailed steps.

Collaborator

simsekgokhan commented Mar 1, 2017

@harianus , thanks a lot for sharing the detailed steps.

@danafreer

This comment has been minimized.

Show comment
Hide comment
@danafreer

danafreer Mar 10, 2017

Amending "setName" in robomongo.json file does NOT work for me either. I am using Mongo Atlas 3.4.

danafreer commented Mar 10, 2017

Amending "setName" in robomongo.json file does NOT work for me either. I am using Mongo Atlas 3.4.

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Mar 10, 2017

Collaborator

Hi @danafreer , please see the comment #1288 (comment). It will work for 3.2 or lower versions. Support for 3.4 is planned not for the next release but the following as top priority.

For news about 3.4 support, you can follow us twitter https://twitter.com/Robomongo and/or follow this ticket: #1250

Collaborator

simsekgokhan commented Mar 10, 2017

Hi @danafreer , please see the comment #1288 (comment). It will work for 3.2 or lower versions. Support for 3.4 is planned not for the next release but the following as top priority.

For news about 3.4 support, you can follow us twitter https://twitter.com/Robomongo and/or follow this ticket: #1250

@danafreer

This comment has been minimized.

Show comment
Hide comment
@danafreer

danafreer Mar 10, 2017

Thanks @simsekgokhan - can you say when the release after next will be?

danafreer commented Mar 10, 2017

Thanks @simsekgokhan - can you say when the release after next will be?

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Mar 10, 2017

Collaborator

Sure, next release is planned in 1-2 weeks. And the following will depend on the work needed for 3.4 support, I cannot say right now but I might predict 5-6 weeks from now on.

Collaborator

simsekgokhan commented Mar 10, 2017

Sure, next release is planned in 1-2 weeks. And the following will depend on the work needed for 3.4 support, I cannot say right now but I might predict 5-6 weeks from now on.

@simsekgokhan simsekgokhan changed the title from ReplicaSet Name is not configurable to ReplicaSet Name is not configurable on UI Mar 21, 2017

@heydonovan

This comment has been minimized.

Show comment
Hide comment
@heydonovan

heydonovan Mar 28, 2017

I've got a client that is using a Windows machine. Where would the robomongo.json file be?

heydonovan commented Mar 28, 2017

I've got a client that is using a Windows machine. Where would the robomongo.json file be?

@samhagin

This comment has been minimized.

Show comment
Hide comment
@samhagin

samhagin Mar 28, 2017

The config file can be found at c:\Users\YourName\.config\robomongo.json. Reference #985

samhagin commented Mar 28, 2017

The config file can be found at c:\Users\YourName\.config\robomongo.json. Reference #985

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Mar 28, 2017

Collaborator

@samhagin , fyi, that's the location for very old versions.
@heydonovan , the path is different for different version.

Please see the following wiki page: Robomongo Config File Guide
Please also make a copy/backup of your config file just in case before changing, even if it is a very minor change.

Collaborator

simsekgokhan commented Mar 28, 2017

@samhagin , fyi, that's the location for very old versions.
@heydonovan , the path is different for different version.

Please see the following wiki page: Robomongo Config File Guide
Please also make a copy/backup of your config file just in case before changing, even if it is a very minor change.

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Mar 28, 2017

Collaborator

Update about this issue, we have already included "Set Name" option into UI for next release 1.0 Final (ETA: 1-2 weeks). Hopefully, there will be no need to edit config file in the new release.

Collaborator

simsekgokhan commented Mar 28, 2017

Update about this issue, we have already included "Set Name" option into UI for next release 1.0 Final (ETA: 1-2 weeks). Hopefully, there will be no need to edit config file in the new release.

@danafreer

This comment has been minimized.

Show comment
Hide comment
@danafreer

danafreer Mar 30, 2017

Still 1-2 weeks before release?

danafreer commented Mar 30, 2017

Still 1-2 weeks before release?

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Mar 31, 2017

Collaborator

Hi @danafreer , sorry for the delay, we have decided to include (and already included) 4-5 fixes and enhancements into next version 1.0 which will have set name configurable on UI. And it is being tested now. ETA is next week. We will probably start coding for 3.4 support next week after release.

Collaborator

simsekgokhan commented Mar 31, 2017

Hi @danafreer , sorry for the delay, we have decided to include (and already included) 4-5 fixes and enhancements into next version 1.0 which will have set name configurable on UI. And it is being tested now. ETA is next week. We will probably start coding for 3.4 support next week after release.

@danafreer

This comment has been minimized.

Show comment
Hide comment
@danafreer

danafreer Apr 26, 2017

I now have 1.0, and still can't connect to Atlas cluster. Is 3.4 supported now? If so, can you provide instructions on how to configure connection? Thanks.

danafreer commented Apr 26, 2017

I now have 1.0, and still can't connect to Atlas cluster. Is 3.4 supported now? If so, can you provide instructions on how to configure connection? Thanks.

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Apr 27, 2017

Collaborator

Hi @danafreer , 3.4 is under development and planned to be supported in the next release.
For updates, please follow this ticket #1250.

Collaborator

simsekgokhan commented Apr 27, 2017

Hi @danafreer , 3.4 is under development and planned to be supported in the next release.
For updates, please follow this ticket #1250.

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Apr 27, 2017

Collaborator

Hi @Swissbite , @harianus ,
Replica set name configurable on UI feature is available on latest release Robomongo 1.0.
Can you confirm if it is working for you?

https://robomongo.org/download
http://blog.robomongo.org/robomongo-1-0/

Collaborator

simsekgokhan commented Apr 27, 2017

Hi @Swissbite , @harianus ,
Replica set name configurable on UI feature is available on latest release Robomongo 1.0.
Can you confirm if it is working for you?

https://robomongo.org/download
http://blog.robomongo.org/robomongo-1-0/

@mbidewell

This comment has been minimized.

Show comment
Hide comment
@mbidewell

mbidewell Apr 27, 2017

Works for me.

mbidewell commented Apr 27, 2017

Works for me.

@danafreer

This comment has been minimized.

Show comment
Hide comment
@danafreer

danafreer Apr 27, 2017

Thanks @simsekgokhan, I am using Atlas free cluster as well, so could you summarize how to configure connection please using v1.0? (can't wait for next release :-)

danafreer commented Apr 27, 2017

Thanks @simsekgokhan, I am using Atlas free cluster as well, so could you summarize how to configure connection please using v1.0? (can't wait for next release :-)

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@simsekgokhan

simsekgokhan Apr 27, 2017

Collaborator

@danafreer
I understand that : ) but current version will not connect to 3.4 clusters, it is not related to config. You can use 3.2 but I think it will not be free on Mongo Atlas.

Collaborator

simsekgokhan commented Apr 27, 2017

@danafreer
I understand that : ) but current version will not connect to 3.4 clusters, it is not related to config. You can use 3.2 but I think it will not be free on Mongo Atlas.

@simsekgokhan

This comment has been minimized.

Show comment
Hide comment
@Alendorff

This comment has been minimized.

Show comment
Hide comment
@Alendorff

Alendorff May 18, 2017

Just checked Robomongo 1.1 under windows 10 x64 - works fine with Atlas replica set.

Connect url, which provided to you by atlas, looks like:

mongodb://<USER>:<PASSWORD>@<MEMBER1>.mongodb.net:27017,<MEMBER2>.mongodb.net:27017,<MEMBER3>.mongodb.net:27017/<DATABASE>?ssl=true&replicaSet=<YOUR-SHARD>&authSource=admin

Robomongo GUI:
Connection tab
Connection type: Replica Set
Set Name: <YOUR-SHARD> from connection url
Add your members which separated in url by , ( above)

Authentication tab:
Database: admin
Set your username and password
Auth Mechanism: SCRAM-SHA-1

In SSL tab I specified Self-signed Certificate.

With such configuration robomongo 1.1.0-beta connects fine to MongoDB Atlas.

Alendorff commented May 18, 2017

Just checked Robomongo 1.1 under windows 10 x64 - works fine with Atlas replica set.

Connect url, which provided to you by atlas, looks like:

mongodb://<USER>:<PASSWORD>@<MEMBER1>.mongodb.net:27017,<MEMBER2>.mongodb.net:27017,<MEMBER3>.mongodb.net:27017/<DATABASE>?ssl=true&replicaSet=<YOUR-SHARD>&authSource=admin

Robomongo GUI:
Connection tab
Connection type: Replica Set
Set Name: <YOUR-SHARD> from connection url
Add your members which separated in url by , ( above)

Authentication tab:
Database: admin
Set your username and password
Auth Mechanism: SCRAM-SHA-1

In SSL tab I specified Self-signed Certificate.

With such configuration robomongo 1.1.0-beta connects fine to MongoDB Atlas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment