Windows mongodb server bind_ip configuration - windows

I would like to ask help on the allowing remote connections from my Mongodb server.
I have here my configuration but not working, i see "connect failed" on my remote machine.
C:\mongodb\bin\mongod --bind_ip 0.0.0.0
Did I made a mistake?

your command should be :
C:\mongodb\bin\mongod --bind_ip 127.0.0.1,xxx.xxx.xxx.xxx
the IP xxx.xxx.xxx.xxx is the IP of the Remote Machine (where mongo DB is there)

Related

Windows - jboss on docker, connection refused to local oracle database

I have Jboss running in a docker container. On jboss I have defined a connection to the xa-datasource database as the ip address of my computer and not localhost because I work in Windows 10. Despite the correct ip and port to the database (oracle) I keep getting the connection refused error. I run jboss with the command
docker run -d -p 8080:8080 -p 9990:9990 myjboss
Can anyone help me, or do I need any additional settings in my docker. I will add that I also test alpine and in the container (exec) I can ping my ip address.
Thanks a lot for all the answers. I would like to add that I tested all other solutions contained in similar questions, but unfortunately I did not get the expected results.
If you can ping your host IP, but you can’t connect to the database, granted that the DB is running and the listener is up...
I’d advise you to check the Windows Firewall settings.
Maybe try disabling it to check if you can actually connect to the database, if so, add an Inbound Rule to the firewall to allow connections on port 1521 (or whatever port your listener is running on)
I solved this problem by using not ip/localhost but host.docker.internal as described here -> https://docs.docker.com/docker-for-windows/networking/

How can I connect to a remote mongodb server using the mongo shell?

Trying to connect to a remote MongoDB server I get: socket operation timed out.
and the firewall log also doesn't mention any attempted connection.
I have the Mongodb running on a remote Windows 2012 vm.
I used --bind_ip 0.0.0.0 and added the firewall rules from the docs.
ping´ing from either client/server works and so does the vnc.
And I'm able to connect from the server using either localhost or the ip
Im new to networking and thought I slowly understand, but apparently thats not the case!
Is there anything else I did not consider?
Try this in your terminal
mongo -u <USER> -p <PASSWORD> <HOST>:<PORT>/<DB> --authenticationDatabase <AUTH_DB>

DBVisualizer Hive SSH Tunnel Ignoring Server Information

I'm attempting to setup a connection to our Hadoop cluster via DBVisualizer.
In order to connect I need to SSH into a server on the domain and then I need to run the command to a remote server (I've not ssh'd onto the Hadoop cluster directly)
I have (figuratively)
Database Server: abcd.efg
Database Port: 12345
Database: Hello
configured for the Database section
SSH Host: hijk.efg
SSH Port: 678
When I attempt a connection, it returns
Could not open client transport with JDBC Uri:
jdbc:hive2://127.0.0.1:-----
Where 127.0.0.1 and ----- appear to be the defaults instead of what I entered.
Any idea how I get the SSH tunnel to use the server configuration I specify?
The SSH Tunnel is set up locally on the client, so connecting to the port on localhost tunnels you to the SSH Host/Port, which then sets up a connection to the database server/port you have specified. This page may help:
http://confluence.dbvis.com/display/UG100/Using+an+SSH+Tunnel
Best Regards,
Hans

Unable to connect to host on different system from mongo shell in windows

I am trying to connect to mongodb from my system to different system but i am getting following error-
MongoDB shell version v3.4.5
connecting to: mongodb://192.168.0.152:27017/
2017-06-23T18:06:50.643+0530 W NETWORK [thread1] Failed to connect to 192.168.0.108:27017 after 5000ms milliseconds, giving up.
2017-06-23T18:06:50.644+0530 E QUERY [thread1]
Error: couldn't connect to server 192.168.0.152:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:237:13
#(connect):1:6
exception: connect failed
I tried various solutions listed on stackoverflow but didn't find any solution yet.
Can somebody please help me out?
getaddrinfo() resolves domain names through the DNS protocol (which is not related the Netbios Naming System - reason why writing a Windows PC Name is usually a bad idea). Depending of the underlying implementation of the function it might or might not be able to resolve Netbios Names.
Usually using a Netbios computer name is a bad idea, you should rely on a proper DNS architecture.
If you have the exact same error with a mongodb:// URL using solely an IP address, it's weird... Please provide more details on the IP address try case.
Also ensure that the server is not firewalled. Try a netcat connection using netcat for windows:
nc IP 27017 -vv
should say 'Connected'
Netcat for Windows: https://eternallybored.org/misc/netcat/
To be able to connect to mongodb server hosted in another machine, you should be sure that your mongodb server allows connections from addresses other than 127.0.0.1
In the mongod.conf there should be some network interfaces configuration:
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
To allow any machine to connect to your server the bindIp should be set to: 0.0.0.0

Access web server over https in a Docker container

I'm using Boot2Docker to manage Docker containers in Windows and I have a container running an IBM Liberty server (I guess is the same for any other server), I can access the server home screen in the host machine using only the ip (which I get using the command boot2docker ip), but if I try to access the server using the https port, like this xx.xx.xx.xx:9443 the connection fails.
I tried forwarding the port in VirtualBox like this:
And then access the server using the ports 1000 or 1001, but it fails too.
Am I missing something?
BTW, I'm using default NAT connection.
https uses port 443 (not 9443) by default.
Make both "Host Port" and "Guest Port" 443 and try again.

Resources