SOLVED Troubleshooting Plex/Syncthing and some general confusion

Status
Not open for further replies.

rokh

Cadet
Joined
Aug 9, 2017
Messages
7
Hello everyone, this is a long post, there is no tl;dr version.

I wish to ask about some of the things i either was not able to find in manual or online or am not able to understand. I am using FreeNAS 11.


A) SOLVED

Currently i have an issue with Plex. I installed the plugin, added storage, turned it on, and then i went to the IP:32400 attempting a further set up, and it simply did not offer me an initial setup wizard. It instead threw me to the first available server, which happens to be the one on my home desktop computer.
I opened a shell and went into the Plex's jail to check if the destination folder has the video file i uploaded to source data folder and it is there.
I am wondering if this is actually a Plex issue and not a FreeNAS issue? I read the Plex should initially be setup "locally" as in localhost:32400 If my understanding is correct i would have to somehow tunnel my way into the Plex's jail in order to do that? But would not that be a violation of the security? I am trying to access Plex from the same network.

I also tried the "disables security" option, before accessing it, and it does not change anything.

Questions :why wont Plex offer me an initial setup wizard when I go to it's address? How do i fix this? Could it be the company FW might somehow interfere? Is it a folder permission problem?


My issue seemed to be the network i was on. I do not understand it fully myself. It would seems i was on a heavily fire-walled network, which did have port 80 open, why i chose it in a first place, so i could access and learn the GUI from home. After I went to 172.X problems went away. Note - I was on the same network with the client PC WIN, while doing all of this. The "from home" part was just to explore a bit more, of what i could.

The notes i made for myself:

Create dataset for plex.
Create sub datasets for each category (Movies, TV,... )

Install Plex plugin from GUI.
Go to Plex Jail via GUI Shell inside Jails tab.

Code:
root@plexmediaserver_1:/ # grep "plex" /etc/passwd
plex:*:972:972:Plex Media Server:/nonexistent:/usr/sbin/nologin


Add a new user, with user ID provided by the grep command, in this case that would be 972, and username "plex".
Also create a new primary group along with the user.

Go to main dataset for plex.
Change permissions, set "plex" as owner and group.
Under "Mode" allow R/W/E for owner and group.
Check "Set permission recursively" so it will apply to all sub datasets.


Add storage for Plex jail, for each sub dataset.
Source: ../plexDataSet/subDataSet1
Destination: /media/sameNameAsSubDataSet1

In GUI under Sharing, create a new SMB share. Select plexDataSet as path, set appropriate name.
Go to WIN/MAC client, map network drive, use plex user to authenticate, upload media to subDataSets.
Or use some other method.

Alternatively a different user with "plex" as "Auxiliary group" may also upload media into the datasets, where group permission is set to "plex".

Enable Plex plugin.

Check Plex IP under Jails tab in GUI. Make sure you are on the same network.
Go to IP:32400
Add library...folder path: /media/subDataSet

B) SOLVED


utils_vl_lookup: The user object callback failed with status 2.
aggregation plugin: Unable to read the current rate of "name.local/cpu-2/cpu-idle".
aggregation plugin: Unable to read the current rate of "name.local/cpu-2/cpu-nice".
aggregation plugin: Unable to read the current rate of "name.local/cpu-2/cpu-user".
aggregation plugin: Unable to read the current rate of "name.local/cpu-2/cpu-interrupt".

I haven't the faintest idea as to what these could be.

Question: is it serious?


It is a coding issue.

C) SOLVED

If my understanding is correct adding hard drives into raid equals creation of a virtual device? This virtual device is then a part of a pool or volume? Once created, virtual device may not be extended and may not be removed without destroying the pool? Extending the pool, means increasing it's storage capacity, means adding a new virtual device to it? The new virtual device has to be of same raid type but can have different number or hard drives, or does the number of hard drives also have to be the same? If any of the virtual devices, inside the same pool fails, all data in the pool is destroyed forever, no matter the state of other virtual devices in the same pool? Any other pool remains unaffected? Different virtual devices, within the same pool, are like hard drives in raid 0, if one goes so does all the data?

Question: is this about accurate? If not, what is wrong?

It is recommended that additional virtual device has the same number of hard drives. Virtual device may be EXPANDED by properly replacing each hard drive with another of larger capacity.

C) SOLVED

While attempting to install FreeNAS for the very first time, on randomly available common hardware at work (i do have 8G of RAM), i kept getting "failed with error 6 and 19" I was also being told "SCSI sense: ILLEGAL REQUEST asc:26,0 Invalid field in parameter list Error 22, Unretryable error".
It turns out 6 and 19 might have been connected to either a faulty hard drive i discovered and/or improper installation medium/methods. The "22" was connected to the optical drive.

Initially i attempted to install from USB3 port which did not work, and it also seems my flash drive with easy2boot did not match the requirements - installation from USB2 port failed, so i went and made an installation CD. First i attempted to install from external USB optical drive, and was again faced by failure. I then plugged a regular optical drive into a sata port to just face yet another dead end. I replaced the optical drive with new, unused one, using the same CD, and still got the same error.

Unsure of what to do i did extended test on RAM, and all the hard drives, and removed the faulty one. I put FreeNAS img on a hard drive, using dd, and connected it to a sata port. No USB was used, no optical device was used. It was only after doing that i was able to reach the blue screen installer. Installation was performed on another small 80G hard drive. I have no spare empty USB to attempt the install on USB.

I wish there was something like: apt-get install freenas

I also wish for wars, hunger, and poverty to end.

Question: which will come first?


Rhetorical

D) SOLVED

When setting up AFP and SMB share it took a bit for it to start working or not sure exactly, since i removed it and set it up again...create dataset, set appropriate share type, create user, use just created dataset as users home, check permissions, create share...

I did manage to get it working on both WIN10 and macOS, but for some unexplained reason it did not work right away.

Question: is it wrong to expect for shares to be available immediately after creation?


Seems to work ok. Do not use the same dataset for different share types. Do not use AFP. Use SMB instead.

E)

I installed NextCloud. I did not add any storage to NextCloud jail, it seems to be working without it.

Question: is this a good practice? If not, what is? Should each jail application be added a storage by default?


F) OBSOLETE, will make a new question

After install i did a manual input for some of the network settings. I specified gateway, name severs, and added an interface in order to move FreeNAS to another IP. Sometime later i removed the manual specification for gateway and DNS (but not the interface) thinking it already knew all of that before i put it there. After removal the GUI interface became unresponsive and unavailable. The NextCloud was still responding.

I did a reboot (11) from "direct console access". After the boot the GUI was still not accessible, neither was the NextCloud. I could still see the apache default page on the original FreeNAS IP.

I did a factory reset and it put itself back together. However everything was gone including all the storage. A bit harsh for changing network settings.

I would also like to mention that changing jail's IP prevents the service from being turned on. It says "some error occurred".
The problem is "solved" by rebooting the FreeNAS.
Changing several jail IP one after another (without the reset for each individual one) caused GUI to freeze - freeadmin.navtree:252 Failed to generate navtree for app freenasUI.vcp: main

Is there something else i should be doing about jails and their IP?

Question: what went wrong (besides the obvious)? How would i go about this without doing factory reset? Which files to edit, what is their exact location?


One thing though, i did many factory resets. At one point i noticed i can attach the old storage, if that is the proper way to call this.

G) SOLVED

The notes i made for myself:

Create dataset for syncthing.

Install Syncthing plugin from GUI.
Go to Syncthing Jail via GUI Shell inside Jails tab.

Code:
root@syncthing_1:/ # grep "syncthing" /etc/passwd
syncthing:*:983:983:Syncthing Daemon:/var/tmp/syncthing:/usr/sbin/nologin


Add a new user, with user ID provided by the grep command, in this case that would be 983, and username "syncthing".
Also create a new primary group along with the user.

Go to dataset for syncthing.
Change permissions, set "syncthing" as owner and group.
Under "Mode" allow R/W/E for owner and group.

Add storage for Syncthing jail.
Source: ../syncthingDataSet
Destination: /media

Enable Syncthing plugin.

Check Syncthing IP under Jails tab in GUI. Make sure you are on the same network.
Go to IP:8384

Remove the default folder.
Add Folder with Folder Path /media
Or any other path if you have a different hierarchy of datasets.

Add GUI password, etc.

Syncthing plugin might not auto start after Syncthing reset.
If not, enable it manually.


Syncthing did not auto start after the reset from it's GUI.
I created user and group syncthing with id 983 as obtained via a command line in jail.
I created a dataset and set owner and group to syncthing and all permission for owner and group and made it recursive.
I went to Syncthing's jail and created a sub folder sync inside /media.
I made chmod -R 770 /media/sync
I created a new storage for Syncthing's jail source:dataset destination: /media/sync
I made another user and added it to Auxiliary groups: syncthing

The Syncthing still say it has no permission to write/create folders, marker, no folder path whether i point to to
/mnt/volume/dataset or /mnt/volume/jails/syncthinjg_1/media/sync

How do i even run the Syncthing (or any plugin) as a specific user? I just run them from inside the GUI.

Questions: What am i doing wrong?
I think i have the same problem with Sickrage and basically any other plugin which requires read/write access. So if someone could please share some easy to understand specifics as to how to properly manage this.



H)

If i "somehow" lock myself out of the GUI, if i make it inaccessible over network. I use a direct console access and do what?
Go to which folder, look for which file, check which setting?

---------------------------------------------------------------------------------------
Some thoughts...just before that i did a setup with Debian 9 + Raid6 + LVM + netinst with basic system tools and SSH only. After that i proceeded to install nextcloud, samba, syncthing and plex. I only had a problem with plex, but i managed to get it working. The rest went smoothly and did not even take that much time even though everything had to be done on the command line. FreeNAS has a tempting GUI and that nice install button, but...what happens after you press it?
There is a good chance i am simply more familiar with Debian, i have no familiarity with BSD and the concept of jails is very much new to me.
Also the GUI makes me wonder what is actually going on, since it is suppose to install it all for me, but does it really? and i don't know where to go and what to look for when the problem arises or even what the problem could be.
Then there is also maybe this fear that the pool/volume might suddenly implode, due to reasons, and all data will be lost.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I might address some of these issues at a later time, but it would probably be more productive to start separate threads (with suitably-descriptive titles) about each of these--you'd probably get more views and responses from people familiar with each of them.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Yeah, waaay too much to tackle and digest in one topic. You've got multpile unrelated issues going on that im no willing to tackle posting from a mobile device.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I'll maybe reply when I get to a computer but no way I'm doing that from my phone.

Sent from my Nexus 5X using Tapatalk
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If my understanding is correct adding hard drives into raid equals creation of a virtual device? This virtual device is then a part of a pool or volume? Once created, virtual device may not be extended and may not be removed without destroying the pool? Extending the pool, means increasing it's storage capacity, means adding a new virtual device to it?
All correct so far.

The new virtual device has to be of same raid type but can have different number or hard drives,
Recommended, but not required, to be of the same RAID type. Also recommended, but not required, to be the same number of drives.

If any of the virtual devices, inside the same pool fails, all data in the pool is destroyed forever, no matter the state of other virtual devices in the same pool? Any other pool remains unaffected? Different virtual devices, within the same pool, are like hard drives in raid 0, if one goes so does all the data?
Correct.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I wish there was something like: apt-get install freenas

I also wish for wars, hunger, and poverty to end.

Question: which will come first?
The heat death of the universe, most likely.

apt is a Debian tool, of course. FreeNAS isn't even Linux, much less Debian. But then the FreeBSD equivalent would be pkg install freenas, which has gotten some discussion, but is still highly unlikely to ever happen.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
utils_vl_lookup: The user object callback failed with status 2.
aggregation plugin: Unable to read the current rate of "name.local/cpu-2/cpu-idle".
aggregation plugin: Unable to read the current rate of "name.local/cpu-2/cpu-nice".
aggregation plugin: Unable to read the current rate of "name.local/cpu-2/cpu-user".
aggregation plugin: Unable to read the current rate of "name.local/cpu-2/cpu-interrupt".

I haven't the faintest idea as to what these could be.
They're a known bug: https://bugs.freenas.org/issues/23857
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I did a factory reset and it put itself back together.
Factory reset resets all settings to defaults, not just the network. See the manual:
Caution! This option deletes all of the configuration settings made in the administrative GUI and is used to reset a FreeNAS® system back to defaults. Before selecting this option, make a full backup of all data and make sure all encryption keys and passphrases are known! After this option is selected, the configuration is cleared and the system reboots. Storage → Volumes → Import Volume can be used to re-import volumes.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Question: is it wrong to expect for shares to be available immediately after creation?
No, they should show up immediately, after the respective service has been restarted. Clients may take a while to actually refresh share lists, though.

However, it sounds like you may be sharing with AFP and SMB in a single dataset, which is a Very Bad Idea (tm).
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
If my understanding is correct adding hard drives into raid equals creation of a virtual device? This virtual device is then a part of a pool or volume? Once created, virtual device may not be extended and may not be removed without destroying the pool? Extending the pool, means increasing it's storage capacity, means adding a new virtual device to it? The new virtual device has to be of same raid type but can have different number or hard drives, or does the number of hard drives also have to be the same? If any of the virtual devices, inside the same pool fails, all data in the pool is destroyed forever, no matter the state of other virtual devices in the same pool? Any other pool remains unaffected? Different virtual devices, within the same pool, are like hard drives in raid 0, if one goes so does all the data?

Question: is this about accurate? If not, what is wrong?
You can have any disks you want in a vdev as well as any disks you want in a pool. You can also mix and match vdevs in a pool if you want. But this is not best practices, idealy have match similar disks in a vdev and similar vdevs in a pool. There are performance, redundancy and easy of administration that create the best practices rules.

Currently i have an issue with Plex. I installed the plugin, added storage, turned it on, and then i went to the IP:32400 attempting a further set up, and it simply did not offer me an initial setup wizard. It instead threw me to the first available server, which happens to be the one on my home desktop computer.
I opened a shell and went into the Plex's jail to check if the destination folder has the video file i uploaded to source data folder and it is there.
I am wondering if this is actually a Plex issue and not a FreeNAS issue? I read the Plex should initially be setup "locally" as in localhost:32400 If my understanding is correct i would have to somehow tunnel my way into the Plex's jail in order to do that? But would not that be a violation of the security? I am trying to access Plex from the same network.

I also tried the "disables security" option, before accessing it, and it does not change anything.

Questions :why wont Plex offer me an initial setup wizard when I go to it's address? How do i fix this? Could it be the company FW might somehow interfere? Is it a folder permission problem?
Looks like a plex problem, but it doesn't matter you don't need the wizard. Just set things up.


When setting up AFP and SMB share it took a bit for it to start working or not sure exactly, since i removed it and set it up again...create dataset, set appropriate share type, create user, use just created dataset as users home, check permissions, create share...

I did manage to get it working on both WIN10 and macOS, but for some unexplained reason it did not work right away.

Question: is it wrong to expect for shares to be available immediately after creation?
Done use afp if you don't have to. Only reason to use it is for timemachine backups. AFP is dead and you should use smb for almost everything. They should also work as soon as you set them up. There is no delay, if there is the client is goofed up.
 

rokh

Cadet
Joined
Aug 9, 2017
Messages
7
Thank you @danb35 and all the rest for the answers so far.

Yes i did consider splitting up the problems in different threads, but that might come across as a brand new member spamming the forum so....

it sounds like you may be sharing with AFP and SMB in a single dataset, which is a Very Bad Idea (tm)

I did not share the same dataset. Good to know this is a bad idea.

Looks like a plex problem, but it doesn't matter you don't need the wizard. Just set things up.

I do not know how, it will not let me.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Thank you @danb35 and all the rest for the answers so far.

Yes i did consider splitting up the problems in different threads, but that might come across as a brand new member spamming the forum so....



I did not share the same dataset. Good to know this is a bad idea.



I do not know how, it will not let me.
You can just click the plus icon next to your library.

Sent from my Nexus 5X using Tapatalk
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
All correct so far.


Recommended, but not required, to be of the same RAID type. Also recommended, but not required, to be the same number of drives.


Correct.

But you can expand a vdev.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
But you can expand a vdev.
True, but with a caveat. You can't expand a vdev by adding disks to it, but you can expand a vdev by replacing disks with larger ones.
 

rokh

Cadet
Joined
Aug 9, 2017
Messages
7
You can just click the plus icon next to your library.

There is no icon. Server settings are unavailable. The only way there can be an icon is if it throws you to the first other available server, but atm there is none, so there is also no icon, and even in that case, if i understand this correctly, the addition to the library would be for that server not the server which was suppose to be running on FreeNAS, but is not, since the "creation wizard" did not start. I wish Plex would throw me some sort of an error to work with, but it does not.


But you can expand a vdev.
You can't expand a vdev by adding disks to it, but you can expand a vdev by replacing disks with larger ones.

Increase in size then, not expand. I believe i read about this option. Gradual and foretold removal with "offline" under the "volume status" and once all the drives are of the same size, the capacity is increased.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
[QUOTE="rokh, post: 399371, member: 77413"Increase in size then, not expand. I believe i read about this option. Gradual and foretold removal with "offline" under the "volume status" and once all the drives are of the same size, the capacity is increased.[/QUOTE]

The correct term is "expand" to increase the size of a vdev by increasing the size of all component devices. If the vdev is set to "autoexpand" then it will automatically 'expand' when all the devices in the vdev have been increased. Also, if the vdev is NOT set to autoexpand, then you can force an expansion by re-onling the pool with the -e (for expand) flag, even if the pool is already online.

Ergo, the term to describe a vdev growing when all devices are increased, is expand ;)

And in FreeNAS, "extend" is used to describe the process of adding another vdev to a pool (ie volume).

The underlying zfs command for "extending" a pool is zpool add
 

rokh

Cadet
Joined
Aug 9, 2017
Messages
7
Plex and Syncthing issues resolved. Will edit the 1st post.

I would still very much like the help on the following:

If i "somehow" lock myself out of the GUI, if i make it inaccessible over network. I use a direct console access and do what?
Go to which folder, look for which file, check which setting?
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Plex and Syncthing issues resolved. Will edit the 1st post.

I would still very much like the help on the following:

If i "somehow" lock myself out of the GUI, if i make it inaccessible over network. I use a direct console access and do what?
Go to which folder, look for which file, check which setting?
Hook up a monitor and try! You have a menu and you select what you want to do. I think reset password is one of them.

You can always just reinstall the os also.

As for your Plex problem you have to be about to add a library without the wizard. Click the plus button under the library list. Can you select the freenas Plex server from the server list?

Sent from my Nexus 5X using Tapatalk
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If i "somehow" lock myself out of the GUI, if i make it inaccessible over network. I use a direct console access and do what?
It depends on the "somehow". If you've borked your network settings, you can fix those at the console. If you've lost your root password, same. If you've thoroughly screwed up your system settings, you can even reset everything to defaults, with the caveat that everything is everything.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Here is what plex looks like on freenas 11 at initial install. If you select your server using the drop down in the upper left does your screen look like this? Click the add library button to set things up. What part of this doesn't make sense or is different?
plex-initial-screen.png
 
Status
Not open for further replies.
Top