Unable to connect to MongoDB server on driver station laptop

Our driver station laptop is running a MongoDB webserver. This server is used to store telemetry data as well as configuration data.

When we are in the pit and/or plugged in directly, our robot code is able to connect to the MongoDB and read configuration data and write the telemetry data. However when we are connected to the FMS, the robot code hangs on the connection to mongo.

We have disabled Windows firewall on the driver’s station. We’ve also cleared out the iptables on the robo Rio. The FTA helped us diagnose the problem by trying to ping and connect from the FMS control station to our driver’s station. He was able to connect and ping to the driver’s station. The FTA also confirmed we were using an unblocked port 5900.

We’ve tried using the IP of the driver’s station: The robot code is written in Java. The connection is established at the start of autonomous, so we can get our configuration data.

Has anyone seen this issue? Does anyone have any suggestions on what I could do to diagnose this problem?

Port 5900 is blocked by the field.
See Section 2 - The Arena paragraph 2.4 for the open field ports.

I read the white paper. I mistyped the port. It was 5800. We’ve tried every documented open port.

Also I got our architecture wrong. We have a node webserver that connects to mongo. The issue is between the robot and the webserver. We’ve also tried the hostname.

Are you using a static IP on your DS / not restarting mongodb? If not, maybe the mongo server doesn’t bind on the new address after your laptop gets an IP from the DHCP server.

We are using DHCP. Both the node WS and Mongo are always running, even between matches. Also we are able to push to mongo from the DS.

Lastly when we go back into the pit, the robot is able to connect all the way through to mongo.

Try setting the roboRIO, the driver station and anything else connected to the robot to static IPs to see if that helps.
If you need the Static Workaround:

It is also possible to configure static IPs on your devices to accommodate devices or software which do not support mDNS. When doing so you want to make sure to avoid addresses that will be in use when the robot is on the field network. These addresses are 10.TE.AM.1 and 10.TE.AM.4 for the DAP1522 radio and the field access point and anything 10.TE.AM.20 and up which may be assigned to a device still configured for DHCP. The roboRIO network configuration can be set from the webdashboard.
•DAP1522 radio - Static 10.TE.AM.1 programmed by Kiosk
•roboRIO - Static 10.TE.AM.2 would be a reasonable choice, subnet mask of (default)
•Driver Station - Static 10.TE.AM.5 would be a reasonable choice, subnet mask must be
•IP Camera (if used) - Static 10.TE.AM.11 would be a reasonable choice, subnet should be fine
•Other devices - Static 10.TE.AM.6-.10 or .12-.19 (.11 if camera not present) subnet

Today we tried with the static IP ( for the driver station) and we still weren’t getting any connection for our web server. We added the following code:

InetAddress inet = 
        new byte] { 10, 18, 85, 5});
System.out.println("Sending Ping Request to " + inet);
System.out.println(inet.isReachable(5000) ?
    "Host is reachable" :
    "Host is NOT reachable");

On the practice field and pit we see " Host is reachable "
On the FMS field we are seeing “Host is NOT reachable”

I’m going to tell the programming team to add this check on the teleop code to see if we still have this problem once we are no longer in autonomous.

Also we have disabled the windows firewall on the driver’s station.

The most challenging part is that we have no way to recreate the FMS to test on. Does anybody have any recommendation on how we can simulate an FMS environment?

Use FMS Off-season
Use an AP to connect to the DS radio setup as a bridge (use the radio setup tool to get the bandwidth limitation and QoS settings)
Setup a VPN if you want to
Block all ports except those explicitly allowed by the game manual.

The field system is pretty simple, but you need an IT advisor.

It’s a bit late, but here’s my thoughts on this for when you get to CMP: You should install wireshark on your driver station, and see if the packets even make it to your DS. If you can see them with wireshark, then your DS is misconfigured and something is dropping packets. If not, then FMS is to blame.