Go to Post I think this is as close as we'll come to getting that water game we've been waiting for. - Jeff Rodriguez [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

 
Closed Thread
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 24-02-2015, 21:09
nathanwalters nathanwalters is offline
Registered User
FRC #0111 (WildStang)
Team Role: Alumni
 
Join Date: Dec 2011
Rookie Year: 2011
Location: United States
Posts: 75
nathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud of
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.
  #2   Spotlight this post!  
Unread 24-02-2015, 21:15
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
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.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
  #3   Spotlight this post!  
Unread 24-02-2015, 21:21
nathanwalters nathanwalters is offline
Registered User
FRC #0111 (WildStang)
Team Role: Alumni
 
Join Date: Dec 2011
Rookie Year: 2011
Location: United States
Posts: 75
nathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud ofnathanwalters has much to be proud of
Re: Attempting to SSH into the robot breaks code deployment

Quote:
Originally Posted by lopsided98 View Post
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.

Last edited by nathanwalters : 24-02-2015 at 21:23. Reason: clarifications
  #4   Spotlight this post!  
Unread 24-02-2015, 21:32
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Attempting to SSH into the robot breaks code deployment

Quote:
Originally Posted by nathanwalters View Post
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.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
  #5   Spotlight this post!  
Unread 03-03-2015, 19:30
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 22
Justin Buist is an unknown quantity at this point
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.

Last edited by Justin Buist : 03-03-2015 at 19:56.
Closed Thread


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 21:01.

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