corrupted jail?!

Status
Not open for further replies.

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
is there anyway to test if a newly created freenas jail is functioning correctly? I set 1 up last night to get Urbackup installed after following this guide: https://forums.freenas.org/index.php?threads/install-urbackup-in-a-jail.22117/

everything was going smoothly until the 2nd part of step 8 where I need to modify some folder permissions inside the jail. the problem is, I cannot get back inside the jail as the command to enter the jail keeps failing:

[me@freenas ~]$ jls
JID IP Address Hostname Path
1 192.168.1.60 Urbackup /mnt/backup_z2/jails/Urbackup
[me@freenas ~]$ sudo jexec 1 tcsh
Password:
jexec: execvp(): tcsh: No such file or directory

I tried it with csh as well and get the same error. this is the first jail I've ever set up so I'm not super familiar with it.

thanks for any help!
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Does this work when you are the "root" user? I bet it does.
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
Does this work when you are the "root" user? I bet it does.

nope:

[root@freenas] ~# jls
JID IP Address Hostname Path
1 192.168.1.60 Urbackup /mnt/backup_z2/jails/Urbackup
[root@freenas] ~# jexec 1 tcsh
jexec: execvp(): tcsh: No such file or directory
[root@freenas] ~# jexec 1 csh
jexec: execvp(): csh: No such file or directory
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
OK,

can you go into the jail shell (use the FreeNAS GUI, highlight the jail, and click the CLI button at the bottom), and see if
Code:
which tcsh
works at all, and if so, whether or not it tells you
Code:
/bin/tcsh
or not?

We'll get to the bottom of this--will have John look at this or something if we determine there's a bug...
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
OK,

can you go into the jail shell (use the FreeNAS GUI, highlight the jail, and click the CLI button at the bottom), and see if
Code:
which tcsh
works at all, and if so, whether or not it tells you
Code:
/bin/tcsh
or not?

We'll get to the bottom of this--will have John look at this or something if we determine there's a bug...

the shell for the jail opens and then closes almost immediately from within the freenas gui. I imagine trying to run which tcsh won't work unless I'm inside the jail.

that said though, if I run the following command, it errors out:

[andrew@freenas ~]$ ls /mnt/backup_z2/jails/Urbackup/bin/*sh
ls: /mnt/backup_z2/jails/Urbackup/bin/*sh: No such file or directory

and then this from inside the jail:
[andrew@freenas /mnt/backup_z2/jails/Urbackup]$ ls -la
total 18
drwxr-xr-x 3 root wheel 3 Jul 19 02:41 .
drwxr-xr-x 6 root wheel 6 Jul 19 01:27 ..
drwxr-xr-x 3 root wheel 3 Jul 19 02:41 mnt
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
OK, well, that's clearly jacked up. Your jail did not populate the right files. If you make a fresh jail, does the same thign happen?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I shall create a test jail and report back.
Very well sir. This is the kind of thing that I'd expect 100% of people that experience it to complain about. Since no one has complained about this, I assume it's something idiosyncratic with your setup. But I would like to get to the bottom of it.
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
ok, created a test jail and entered into it fine:

[andrew@freenas ~]$ jls
JID IP Address Hostname Path
1 192.168.1.60 Urbackup /mnt/backup_z2/jails/Urbackup
2 192.168.1.70 Test /mnt/backup_z2/jails/Test
[root@freenas] ~# jexec 2 tcsh
root@Test:/ #

I was able to initially enter the jail just fine with Urbackup as well, so something between step 4 and 8 in the guide screwed it up: https://forums.freenas.org/index.php?threads/install-urbackup-in-a-jail.22117/
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
So, I don't really care for guides like that one. Do this, do this, do this, do this, do this. Not very educational.

But, in any case, almost certainly something you did, or something this urbackup thing did, caused the problem. I didn't see anything in steps 4 through 8 that I thought would obviously hose a bunch of files in the systems directories.

Can we assume that this is a PEBKAC?
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
So, I don't really care for guides like that one. Do this, do this, do this, do this, do this. Not very educational.

But, in any case, almost certainly something you did, or something this urbackup thing did, caused the problem. I didn't see anything in steps 4 through 8 that I thought would obviously hose a bunch of files in the systems directories.

Can we assume that this is a PEBKAC?

maybe, but I followed the guide very closely. the only thing I deviated from is the name of the source directory in step 8. rather than my source being called 'backup', it's called 'windows'.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Well, all I can say is, perhaps you can repeat the guide in a fresh jail, and take note of at what point the problem manifests, and then we can try to give an explanation for it.
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
Well, all I can say is, perhaps you can repeat the guide in a fresh jail, and take note of at what point the problem manifests, and then we can try to give an explanation for it.

true, I was thinking of doing that..leave the jail after each step and then try reentering it to see at what point it's failing. step 4 can probably be skipped entirely since all of that software was installed on the initial try.
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
quick question. I deleted both of my jails. when trying to recreate a new one with the same name, it keeps erroring out saying the jail name already exists. is there some cache or something I need to clear out, or am I unable to ever create another jail with the same name?
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
scratch the above post. destroying the dataset allowed me to recreate the jail.
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
ok, redid steps 1-7 so far tonight and I'm able to enter into the jail without any problems - it's getting late so I'll work on finishing it up tomorrow. my guess is I probably did something wrong from step 8.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
right, for me, step 8 seemed the most dicey, and likely to cause problems if you did it wrong.
 

andrewjs18

Contributor
Joined
Oct 19, 2014
Messages
141
right, for me, step 8 seemed the most dicey, and likely to cause problems if you did it wrong.

just finished up step 8 and 9, and the jail and Urbackup is working correctly. not really sure what I did differently, but whatever...it's working! thanks!!!
 
Status
Not open for further replies.
Top