Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Attempting to SSH into the robot breaks code deployment (http://www.chiefdelphi.com/forums/showthread.php?t=135151)

nathanwalters 24-02-2015 21:09

Attempting to SSH into the robot breaks code deployment
 
We've been running into a nasty memory leak on our robot, so I tried to SSH into our robot to try to set the command line arguments of the user program to do a heap dump when we run out of memory (we use Java). SSH connected, and the rio prompted my for a password. I first tried the default blank password; that didn't work. I then set a password for the admin user and then tried to login with that password; that also failed. Thinking I might have typed the password wrong, I typed it again (very carefully!). I was now greeted with a nice "permission denied". Well, there's no obvious way to SSH into the robot. Oh well.

Fast-forward a few minutes to when I try to redeploy new code to the rio. The Eclipse console shows the error
Code:

SSH_MSG_DISCONNECT: 2 Too many authentication failures for admin
I tried again. Same thing. I rebooted the rio. Same thing. We are now locked out of deploying code to our rio until we reflash it.

So, question time:

1. Is it possible to SSH into the rio? Or does NI/FIRST not like us mucking around with its internals?

2. Is there a way to configure the rio to do a heap dump when we run out of memory?

3. Is there any way to regain our ability to deploy without reflashing the rio?

4. Who at NI possibly thought this was a good idea?

Thanks for the help.

Ben Wolsieffer 24-02-2015 21:15

Re: Attempting to SSH into the robot breaks code deployment
 
Are you sure you were trying to log in as the correct user over SSH? If you are using Linux (or Mac), the default user will be you username, not admin or lvuser.

You are no longer able to deploy code because the Eclipse plugins use SSH and try to login with a blank password, which you changed.

I was able to use SSH fine on our roboRIO, using the blank password.

nathanwalters 24-02-2015 21:21

Re: Attempting to SSH into the robot breaks code deployment
 
Quote:

Originally Posted by lopsided98 (Post 1449483)
Are you sure you were trying to log in as the correct user over SSH? If you are using Linux (or Mac), the default user will be you username, not admin or lvuser.

You are no longer able to deploy code because the Eclipse plugins use SSH and try to login with a blank password, which you changed.

I was able to use SSH fine on our roboRIO, using the blank password.

That explanation makes so much sense. I've been working with raspberry pi's and beaglebones a lot lately, and those prompt you for a user when your try to log in. When I didn't see a username prompt on the rio, I assumed it was automagically targeting admin. Logging in with "ssh admin@roboRIO-111.local" and the appropriate password works as expected.

As for deploying, is there a way to deploy with a password? There doesn't seem to be a way to set one from the WPI options in Eclipse. If not, I guess we can live without a password.

Ben Wolsieffer 24-02-2015 21:32

Re: Attempting to SSH into the robot breaks code deployment
 
Quote:

Originally Posted by nathanwalters (Post 1449487)
As for deploying, is there a way to deploy with a password? There doesn't seem to be a way to set one from the WPI options in Eclipse. If not, I guess we can live without a password.

It is possible to change the password by modifying the file: ~/wpilib/java/current/ant/build.properties. There is property called "password", which is blank by default. Keep in mind that this will probably be overwritten each time the plugins are updated. It might also be possible to override that property in the project specific "build.properties" file, but I have not tested this.

Justin Buist 03-03-2015 19:30

Re: Attempting to SSH into the robot breaks code deployment
 
I've logged into our roboRio with the user 'lvuser' and no password. That's the login I found in the ant build scripts. Worked fine. I'm not sure what the permission level of lvuser is, or even if there's sudo access, or what have you, but it got me in.

As far as passing in params to the JRE to get it to make a heap dump look at the 'robotCommand' file in ~/wpilib/java/current/ant on the development machine. The ant scripts will scp (copy) that over that to the robot and by default it reads:

Code:

env LD_PRELOAD=/lib/libstdc++.so.6.0.20 /usr/local/frc/bin/netconsole-host /usr/local/frc/JRE/bin/java -jar /home/lvuser/FRCUserProgram.jar
Set your JRE params there and that command should copy over to the roboRIO with your new JAR and get you what you need.

Disclaimer: I haven't tried this... just my assumptions from poking around the build system.


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

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