Comments (7)
Hi @madansu thanks for opening the issue - this isn't something we support - yet. We have a feedback forum we use for tracking feature requests (which allows for upvoting), looks like this is in there already: https://feedback.mongodb.com/forums/924283-compass/suggestions/38666278-i-wish-to-accelerate-connection-to-a-deployment-f If it's alright I'll close this issue for the feedback forum one, feel free to reopen if you'd like it tracked here as well.
A bit of a workaround, Compass does support loading connections from disk. On Linux, connections are pulled from disk with .json files in the directory ~/.config/COMPASS_APP_NAME/Connections
where COMPASS_APP_NAME
is the name of the userβs installed compass. MongoDB\ Compass
for vanilla compass.
from compass.
Hi @Anemy,
Can you point me to where this location would be on a Windows computer ?
Also, if the password is missing from the connection file, will Compass prompt me for the password ?
Thanks,
from compass.
Also, can you please share the format of the connection stored on the disk
from compass.
@Anemy : Can you specify even which connection to use from the command line?
I found the files in AppData. I took an existing one as a template and created a new one with my script (I want a script that creates a tunnel then opens the connection all in one). I generated new UUID and used it for both filename and _id, and set connection params but left the rest alone. It does not even see the new file! When i open Compass it simply ignores my new connection. Existing connections can be manipulated there, but not new ones created it seems?
from compass.
@madansu Apologies for missing your message above, somehow the notification must have slipped me. Really sorry.
For anyone stumbling upon this issue here's where they're stored as of now:
Windows: %APPDATA%\Roaming\MongoDB Compass\Connections
Windows: C:\Users[user-name]\AppData\Roaming\MongoDB Compass\Connections
Mac OSX: /Users/[userid]/Library/Application Support/MongoDB Compass/Connections
Linux: ~/.config/MongoDB Compass/Connections
Each saved connection is stored in that directory as a json file currently (with secrets in the system's credential store).
We've recently redone and are currently improving a lot of the connection storing and connecting logic, so these may change in the coming weeks/months.
@slarti-b If I understand correctly you're looking for proxy/ssh tunnel functionality from Compass? You might want to try the new beta with the new connection experience where we're adding proxy support: https://github.com/mongodb-js/compass/releases
This will be published for General Availability (GA) soon but it may be not for another week or two.
If the connection is edited in the file and isn't showing up in Compass there's likely an error loading that configuration, I would check your log (also something that might only be in the recent beta as of writing this).
from compass.
@Anemy : thanks for the paths.
In terms of my approach, no, that's not really what I'm trying to do. I do not want to use a tunnel built in to Compass. We have an external application that creates the tunnels. With that I can either create a tunnel or get an SSH connection, etc. I have a number of helper scripts for specific applications that create the tunnel and launch the relevant client application.
I do not want to use the tunnelling within Compass for two reasons:
- Our external system takes care of 2FA, etc. and I have to use this specific system as per our security policy
- Our external system also takes care of discovery (I can specify the connection I want by giving the type of system and customer/environment and it will find the correct machine, hosting center, etc.)
So, what I really want is to be able to launch Compass from the command line, giving it a connection string from the command line when I do, and it will connect to that connection (asking me for password first!). Based on this discussion, I understand that this is not possible. So, I thought I could at least create/update a file for the connection (so it specifies the local port for the tunnel, etc.) with my script and launch Compass and then I'd just need to select the connection my script had just defined. However, if I create a new file (I took an existing one as a template and update the values, generated a new hash which I used as both ID and filename) then it does not show up when i open Compass. Is there somewhere else I need to register them?
I have also logged an issue (https://jira.mongodb.org/browse/COMPASS-5612) for the fact that I can't save a connection without a password (every other DB client has the option to ask for the password each time instead of forcing you to save it). I guess that could be connected to it not showing up? (Since I haven't set a password for the new connection.)
from compass.
Also, log file shows nothing relevant
{"t":{"$date":"2022-03-22T08:54:03.473Z"},"s":"I","c":"COMPASS-MAIN","id":1001000001,"ctx":"logging","msg":"Starting logging","attr":{"version":"1.30.1","nodeVersion":"14.16.0","electronVersion":"13.5.1","chromeVersion":"91.0.4472.164","platform":"win32","arch":"x64","osReleaseName":null,"osReleaseVersion":null}}
{"t":{"$date":"2022-03-22T08:54:04.306Z"},"s":"I","c":"COMPASS-TELEMETRY","id":1001000094,"ctx":"Telemetry","msg":"Enabling Telemetry reporting"}
{"t":{"$date":"2022-03-22T08:54:04.307Z"},"s":"I","c":"COMPASS-TELEMETRY","id":1001000093,"ctx":"Telemetry","msg":"Loading telemetry config","attr":{"telemetryCapableEnvironment":true,"hasAnalytics":true,"currentUserId":"","state":"enabled","queuedEvents":0}}
{"t":{"$date":"2022-03-22T08:54:04.311Z"},"s":"I","c":"COMPASS-TELEMETRY","id":1001000093,"ctx":"Telemetry","msg":"Loading telemetry config","attr":{"telemetryCapableEnvironment":true,"hasAnalytics":true,"currentUserId":"ccaa052e-d976-4477-aa89-26a73f45f370","state":"enabled","queuedEvents":0}}
{"t":{"$date":"2022-03-22T08:54:05.335Z"},"s":"I","c":"COMPASS-APP","id":1001000092,"ctx":"Main Window","msg":"Rendering app container"}
{"t":{"$date":"2022-03-22T08:54:24.396Z"},"s":"I","c":"COMPASS-MAIN","id":1001000003,"ctx":"app","msg":"Closing application"}
from compass.
Related Issues (20)
- Fields missing when exporting collection HOT 8
- Please implement multiselection HOT 1
- Feature Request HOT 1
- Bug Report: document/index count not updated when clicking on collection tab HOT 8
- Compass does not save favorites on WSL HOT 3
- Increase "import document" editor focus size
- Feature Request: Allow custom id generators to be used on duplication of documents HOT 1
- Feature Request: Add simplified parallel insertion command syntax HOT 2
- Bug Report | cannot query using big int HOT 2
- A full stop at the ending of the line HOT 1
- How to run Compass under native Wayland? HOT 6
- Bug Report: Loading connections not working properly HOT 5
- Feature Request: Color Picker on Favorite save HOT 3
- Fatal bug: The brain of your teams hot-key designer HOT 1
- Bug Report - In filter, not possible to get cursor between 2 spaces with arrow keys (on osx)?? HOT 2
- Bug Report - MacOS newest versions are broken HOT 10
- Bug Report - The latest version of Macos and Windows is stuck when importing large CSV files, and the program interface is white. HOT 6
- Rant : Using _id ObjectID as direct filter instead of {_id: ObjectID} HOT 1
- Bug Report Can't delete collection with specific name HOT 4
- "ssh2" module in ssh-tunnel package is obsolete, please consider upgrade HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compass.