Go to Post Its not the type of material you use, but how you use it... - jrocket567 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-03-2016, 13:02
coconnell84 coconnell84 is offline
Registered User
FRC #1885
 
Join Date: Mar 2016
Location: Fairfax, VA
Posts: 6
coconnell84 is an unknown quantity at this point
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: 10.18.85.20. 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?

Last edited by coconnell84 : 19-03-2016 at 13:04.
Reply With Quote
  #2   Spotlight this post!  
Unread 19-03-2016, 13:12
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Unable to connect to MongoDB server on driver station laptop

Port 5900 is blocked by the field.
See Section 2 - The Arena paragraph 2.4 for the open field ports.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 19-03-2016, 13:35
coconnell84 coconnell84 is offline
Registered User
FRC #1885
 
Join Date: Mar 2016
Location: Fairfax, VA
Posts: 6
coconnell84 is an unknown quantity at this point
Re: Unable to connect to MongoDB server on driver station laptop

I read the white paper. I mistyped the port. It was 5800. We've tried every documented open port.
Reply With Quote
  #4   Spotlight this post!  
Unread 19-03-2016, 14:05
coconnell84 coconnell84 is offline
Registered User
FRC #1885
 
Join Date: Mar 2016
Location: Fairfax, VA
Posts: 6
coconnell84 is an unknown quantity at this point
Re: Unable to connect to MongoDB server on driver station laptop

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.
Reply With Quote
  #5   Spotlight this post!  
Unread 19-03-2016, 14:09
Andrew Lobos Andrew Lobos is offline
Registered User
FRC #0225 (TechFire)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Lancaster, PA
Posts: 61
Andrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the rough
Re: Unable to connect to MongoDB server on driver station laptop

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.
__________________
2012-2014: 225 Driver, Programmer & Co-Captain
2012-2014: FTC 4977 Driver, Programmer, & Team Captain
2011: 225 Operator & Programmer

2013: FRC: Springside-Chestnut Hill Winner (w/341 & 1495), Midknight Mayhem Winner (w/316, 369, & 869), Battle O' Baltimore Winner (w/1640, 2914 & 339), Duel on the Delaware Finalist (w/816 & 369), Ramp Riot Winner (w/341, 304, & 4637) FTC: PA State Finalist
2014: FRC: Springside-Chestnut Hill Winner (w/316 & 1495), Greater DC Winner (w/1731 & 4464), Midknight Mayhem Winner (w/25, 1626 & 329) FTC: PA State Champion
Reply With Quote
  #6   Spotlight this post!  
Unread 19-03-2016, 14:25
coconnell84 coconnell84 is offline
Registered User
FRC #1885
 
Join Date: Mar 2016
Location: Fairfax, VA
Posts: 6
coconnell84 is an unknown quantity at this point
Re: Unable to connect to MongoDB server on driver station laptop

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.

Last edited by coconnell84 : 19-03-2016 at 14:33.
Reply With Quote
  #7   Spotlight this post!  
Unread 19-03-2016, 14:53
Matt-T-FRC Matt-T-FRC is offline
Electrical Engineering Student
AKA: Matt Tisovic
FRC #6181 (Northwest State Cryptic Cyborgs)
Team Role: Mentor
 
Join Date: Feb 2016
Rookie Year: 2012
Location: Northwest Ohio
Posts: 32
Matt-T-FRC is an unknown quantity at this point
Re: Unable to connect to MongoDB server on driver station laptop

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:
Quote:
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 255.255.255.0 (default)
•Driver Station - Static 10.TE.AM.5 would be a reasonable choice, subnet mask must be 255.0.0.0
•IP Camera (if used) - Static 10.TE.AM.11 would be a reasonable choice, subnet 255.255.255.0 should be fine
•Other devices - Static 10.TE.AM.6-.10 or .12-.19 (.11 if camera not present) subnet 255.255.255.0
Reply With Quote
  #8   Spotlight this post!  
Unread 20-03-2016, 12:16
coconnell84 coconnell84 is offline
Registered User
FRC #1885
 
Join Date: Mar 2016
Location: Fairfax, VA
Posts: 6
coconnell84 is an unknown quantity at this point
Re: Unable to connect to MongoDB server on driver station laptop

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

InetAddress inet =
InetAddress.getByAddress(
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.
Reply With Quote
  #9   Spotlight this post!  
Unread 23-03-2016, 15:21
coconnell84 coconnell84 is offline
Registered User
FRC #1885
 
Join Date: Mar 2016
Location: Fairfax, VA
Posts: 6
coconnell84 is an unknown quantity at this point
Re: Unable to connect to MongoDB server on driver station laptop

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?
Reply With Quote
  #10   Spotlight this post!  
Unread 24-03-2016, 01:46
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Unable to connect to MongoDB server on driver station laptop

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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #11   Spotlight this post!  
Unread 10-04-2016, 23:13
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,102
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Unable to connect to MongoDB server on driver station laptop

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.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:32.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi