Can't open shell

Status
Not open for further replies.

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
Yesterday I started a burn-in on my new 6 HDDs and started badblocks in tmux on them. Now I can't open my shell in the web gui. When I try to open the shell it pops up and say "Loading..." for a few seconds then it closes after a few seconds. I dont want to have to reboot my box as i'd have to restart my burn-in. How could I access the shell?
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
Now I can't open my shell in the web gui.
Why are you not using SSH?
Are you trying to view the badblocks multiple tests you started?
If iirc the command "tmux attach" will reopen the session, but
I'm still searching for a post authored by @DrKK where I first
learned this tmux stuff to test multiple drives at one time.
It's been almost two years ago since I've used it, but give me
a few min. and I'll find the link 4 U
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
Why are you not using SSH?
Are you trying to view the badblocks multiple tests you started?
If iirc the command "tmux attach" will reopen the session, but
I'm still searching for a post authored by @DrKK where I first
learned this tmux stuff to test multiple drives at one time.
It's been almost two years ago since I've used it, but give me
a few min. and I'll find the link 4 U
I thought I needed to start ssh in the shell, didn't realize I could use the gui to start it. I'll give that a try.

Edit:
Thanks, got it working.
 
Last edited:

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
I'm sorry for the confusion!

SSH is Secure SHELL (google it)

PuTTY is an SSH and telnet client I use on my windows machine to access the CLI.


Using tmux on the built in terminal shell is said to be problematic.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
I'm sorry for the confusion!

SSH is Secure SHELL (google it)

PuTTY is an SSH and telnet client I use on my windows machine to access the CLI.


Using tmux on the built in terminal shell is said to be problematic.
Yeah had I just gotten FreeNAS set up so I was eager to start my tests which is why I was running them in the web interface. I'm using Linux so I don't need putty or any of that stuff and I got into the machine fine with ssh.
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
Once you were blind, then you see light.
I do love personal testimony ;)
I'll DL a copy and give it a try, thnx!
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Protip: use tmux a instead of tmux attach, much quicker ;)
 

Charles Rhoades

Dabbler
Joined
Oct 27, 2015
Messages
34
Sorry to hijack but it seems the OP got his problem solved. I have a similar problem, but have been unable to use SSH to and tmux attach. Below is screenshot.

Welcome to FreeNAS
Could not chdir to home directory /nonexistent: No such file or directory
[freenasuser@freenas] /% tmux attach
[freenasuser@freenas] /% tmux attach
sessions should be nested with care, unset $TMUX to force
[freenasuser@freenas] /% q
q: Command not found.
[freenasuser@freenas] /% tmux
sessions should be nested with care, unset $TMUX to force
[freenasuser@freenas] /%

I started badblocks on 3 HDDs using the Shell in the FreeNAS console, and I can see in the Reporting for the storage that 2 have completed, and the third is nearing completion. Any suggestions?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I don't see a screen shot there; I see a copy/paste. With the way tmux formats the screen, that isn't as helpful as it could be. But why are you trying to run tmux inside tmux? Why are you trying to run tmux attach when you (as far as you've told us) don't already have a tmux session to attach to?
 

Charles Rhoades

Dabbler
Joined
Oct 27, 2015
Messages
34
Sorry danb...my term. I ran the badblocks in the Console Shell, then I ran tmux also within the Console Shell. Subsequently I closed the Shell, but it fails to reopen just like the OP experienced. The badblocks have continued to run, with two HDDs having completed it, and the third is very near completion. So I activated the SSH service, and accessed using PUTTY...but as you can see, from the copy/paste from the PUTTY screen, I'm having difficulty. I would like to review the badblocks test results, and I believe I need to use tmux to see them...right? (yes...I'm very new at this)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Don't use the console (by which, from context, I assume you mean the web GUI) shell with tmux. Just--don't. Actually, don't use it at all if you can help it. It's OK for entering a quick command or two, but not for doing anything serious. Among its problems is that it eats the control characters that tmux uses as commands. But with that said, if you were using tmux in the the shell window, and you managed to detach from that session, you should be able to reattach.

Your first obstacle is that the console shell runs as the root user, while your ssh connection was as a different user. To connect to an existing tmux session, you need to be the same user as the one who started. So, either ssh as the root user (there's a checkbox you'll need to check in the ssh configuration to allow that), or connect as your regular user, and then do 'su -' (that's su, space, hyphen) and enter your root password when prompted.

Then, run 'tmux ls'. This will list the active tmux sessions. If it lists just one session, you can run 'tmux a' (as @Bidule0hm mentioned up-thread, this is an equivalent for 'tmux attach'). If it lists more than one, you can to 'tmux a #' to connect to the desired one.
 
Status
Not open for further replies.
Top