Strange Error Regarding Connection with roboRIO

I keep getting this strange error:

BUILD FAILED
C:\Users*******\wpilib\java\current\ant\build.xml:345: com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect

Total time: 9 seconds

I’ve tried anything I can think of…

Anyone know what could be causing this? I believe it is my computer.

Thanks for your time,
Ryan

There should be a message immediately in the build console before this error. Have you installed the JRE on your roboRio?

Checking for JRE. If this fails install the JRE using these instructions: For the 2020 season software documentation has been moved to https://docs.wpilib.org. Documentation for KOP items can still be found here. | FRC KOP Documentation

10 Minutes ago, I just re-imaged and reinstalled java on our roboRIO to see if that was the problem. It did not fix it. The only time I receive that error is when I attempt to connect wirelessly. Could it by my radio?

Ryan

It could be, but does the DS connect? Can you ping the roboRio? Connect to the roboRio web console? If you’re making it to that point in the script you should be able to get to the web console (as it makes a HTTP request to validate the image version immediately prior to that). Do you have any firewall software running? Might be worth downloading PuTTY and trying to ssh in manually to see if that works.

I can connect to and enable the robot through a connection with the D-Link. However, I can only deploy code over a bridge, and I cannot deploy code through a connection with the D-Link.

When i attempted to connect to the roboRIO by the IP Address I saw in Eclipse (which worked in Eclipse), puTTY gave me a similar error: “Connection refused”.

Not sure what to do from here except try other D-Links.

Thanks,
Ryan

Could you post the full ant output please?

Can you ping these DNS names:

  • roboRIO-589-frc
  • roboRIO-589-frc.local
  • roboRIO-589-frc.lan
  • roboRIO-589-frc.frc-robot.local

Here’s the Full Output:

Buildfile: C:\Users\rystr\FRC\589 Test Robot\build.xml
Trying to override old definition of task classloader
clean:
[delete] Deleting directory C:\Users\rystr\FRC\589 Test Robot\build
[delete] Deleting directory C:\Users\rystr\FRC\589 Test Robot\dist
compile:
[mkdir] Created dir: C:\Users\rystr\FRC\589 Test Robot\build
[echo] [athena-compile] Compiling src with classpath=C:\Users\rystr\wpilib\user\java\lib\CTRLib.jar;C:\Users\rystr\wpilib\user\java\lib
iVisionWPI.jar;C:\Users\rystr\wpilib\java\current\lib\WPILib.jar;C:\Users\rystr\wpilib\java\current\lib\NetworkTables.jar;C:\Users\rystr\wpilib\java\current\lib\opencv.jar;C:\Users\rystr\wpilib\java\current\lib\cscore.jar to build
[javac] Compiling 8 source files to C:\Users\rystr\FRC\589 Test Robot\build
jar:
[echo] [athena-jar] Making jar dist/FRCUserProgram.jar.
[mkdir] Created dir: C:\Users\rystr\FRC\589 Test Robot\dist
[mkdir] Created dir: C:\Users\rystr\FRC\589 Test Robot\build\jars
[echo] [athena-jar] Copying jars to build/jars.
[copy] Copying 6 files to C:\Users\rystr\FRC\589 Test Robot\build\jars
[jar] Building jar: C:\Users\rystr\FRC\589 Test Robot\dist\FRCUserProgram.jar
get-target-ip:
[echo] Finding roboRIO, please ignore any [hostinfo] error messages
[echo] Trying DNS: roboRIO-589-FRC.lan
[echo] Trying mDNS: roboRIO-589-FRC.local
[echo] Trying USB: 172.22.11.2
[echo] Trying Static Ethernet: 10.5.89.2
[hostinfo] Error retrieving remote host information for host:roboRIO-589-FRC.lan.
[echo] Resolved mDNS to 10.5.89.51
[echo] roboRIO found at 10.5.89.51
dependencies:
[echo] roboRIO image version validated
[echo] Checking for JRE. If this fails install the JRE using these instructions: https://wpilib.screenstepslive.com/s/4485/m/13503/l/288822-installing-java-8-on-the-roborio-using-the-frc-roborio-java-installer-java-only
[sshexec] Connecting to 10.5.89.51:22

BUILD FAILED
C:\Users\rystr\wpilib\java\current\ant\build.xml:345: com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect

Total time: 9 seconds

In Regards to pinging the four different addresses, all of them gave me the same error. (I pinged them using puTTY set on SSH, Let me know if that it the wrong type)

Thanks for your help so far. Still trying to figure this out!

Ryan

1 Like

Check your firewall on your computer. Temporarily disable it and see if deploying works. If yes, then re-enable your firewall and add a rule for outgoing port 21 connections.

If that doesn’t work, try re-imaging your roboRIO

We just set up our final electronics board with brand new parts. I also tried turning off my firewall but even with that and new parts, my computer still cannot deploy code through a 5GHZ link with a D-Link.

Anyone have any other ideas?

-Ryan

Oops, I meant port 22. The port for SSH/SCP :slight_smile:

Make sure your mDNS service is running and try connecting to the RIO directly with ethernet or a USB A-B cable. If on ethernet, set a static IP for your computer. Make sure you can ping roborio-589-frc.local. Make sure you haven’t overridden your robot address in build.xml (and make sure your team number in eclipse preferences > wpilib is correct). Then try deploying.

No luck. I tried adding a port exception into mcAfee, but no change. HELP

  • Ryan :slight_smile:

Was this resolved? I saw another instance of it yesterday but couldn’t figure out a way around it. Had to do all downloads via tether (yuck).

I had this problem as well, is there anyone who’s found a fix for this issue?

I think it might be tied to the new firmware update on the routers – uploading code worked fine when connecting through a router running last year’s firmware, while it gave me the connection error while connecting the same RoboRio to a router with updated firmware. I don’t know if this helps diagnose the problem, but accessing the RoboRio through SSH does not work for me either, but I can access the web dashboard through roboRIO-2489-frc.local

For the team I was working with, we switched to the new radio (they were using last years model) and now everything works fine.

Don’t know if it was a bad radio or if it is a compatibility issue with the new firmware.

Are you using this year’s radio?

I was getting the error with last year’s radio. We tried to get this year’s radio working but for some reason I kept getting an NPF error while loading firmware on it. Were you able to load firmware on that radio without errors? The andymark command line instructions don’t seem to work for the new radio.

We don’t use the AndyMark instructions for the radio.
We use the Radio Configuration Utility.

Oh, I forgot to say – the npf error we were recieving was from the radio configuration utility – we used the andymark instructions later, as a thread said that using it may fix the error. The andymark instructions helped fix the error only with the old radio, not with the new one.

We used the new - most recent - Radio config utility. No issues (In fact we programmed three radios one after the other - no issues on any of them).

Were you plugged into the correct port on the radio?

Yes, we were plugged in to the correct port when we tried to program the radio. Would you happen to know what type of laptop you were using – maybe the problem is with our network interface?