Mongodb connect

mongodb

#1

Hi. Can I connect to cloud9 mongodb from other server ?


#2

You should be able to. You simply have to run it on port 8080, 8081 or 8082 and connect to it via the workspace url (e.g https://gormat-projectname.c9users.io:8081)


#3

I am trying to connect with mongochef. it gives me error
[gormatevosyan14-mongotest.c9users.io:27017] Failed to verify connectivity with the server. The server might be configured to require SSL.
Same error when I run mongodb on port 8080


#4

Hi @gormat,

The error says you’re trying to connect to 27017. Can you confirm if you’re running MongoDB at port 8081, and accessing using the same port from the other workspace?

Regards,
​Mutahhir


#5

Hi @mutahhir
Thank you for reply, I run mongo on port 8081 and get same error

[mongotest-gormatevosyan14.c9users.io:8081] Failed to verify connectivity with the server. The server might be configured to require SSL.
(Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address:8081=mongotest-gormatevosyan14.c9users.io, type=Unknown, state=Connecting, exception={java.lang.IllegalArgumentException: response too long: 1347703880}}])

Maybe I give wrong url?


#6

What’s the IP that you’re using? It should be 0.0.0.0, and also, you should either have the mongo workspace be public, or make the application url public.

To make the application url public, please click ‘Share’ near the top right of the IDE, and check ‘Public’ next to ‘Application’.

Regards,
​Mutahhir


#7

Same problem.
OK I will dump DB and restore on my PC.
Thank you.