Jump to content

Migrating 3.3.1.0 warden jail to 4+ iocage; plagued by "this site can't be reached"


stuartsjg

Recommended Posts

stuartsjg

Hello,

 

Ive been having a nightmare which appears not to have an end, its been burred in other threads so im hoping perhaps a fresh thread dedicated to the subject may yield some new ideas.   For years i ran emby as a freenas plugin before i decided to update freenas and emby to make use of newer features etc.

 

I still have the intact 3.3.1.0 accessible via the "legacy" Freenas UI although its shutdown.  Back in Oct/Nov last year or there about i was able to get the library from there copied over into a new version (3.5.3.0. at the time) of emby running (again by plugin install) on a newer version of freenas, but i was hit by the ffmpeg issue.  This ive never been able to fix so have been unable to properly use emby since November, although stupidly kept paying the premium fees.

 

So, over recent months ive been trying to setup new iocage jails with new emby installs (by CLI inside the jail, outside the jail or by plug in) and each time i break the install by copying (either by cp -r or by an rsysnc) into the new install.

 

Ive tried to document the steps tonight as accurately as possible in the hope somebody sees fault as i read all over the place people migrating their data with ease, either by copying or having the db folders mounted into what ever instance of server they are using.

 

1. Tonight i setup a new jail (successfully as always) by an arbitrary method as follows:

       (i am running freenas 11.2 Release U1)

       11.2 RELEASE p4

       DHCP unchecked

       VNET unchecked

       packet filter unchecked

       em0 interface

       static IP 192.168.1.195 / 24 subnet

       (no other settings changed from what ever the "add jail" wizard wants to do

#enter the jail shell
pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw
pkg add -f https://github.com/MediaBrowser/Emby.Releases/releases/download/4.0.2.0/emby-server-freebsd_4.0.2.0_amd64.txz

sysrc -f /etc/rc.conf emby_server_enable="YES"
service emby-server start 2>/dev/null
#restart jail

2. I went to the IP i had set and the welcome splash screen loaded OK, so in know the jail has installed OK.

 

3. within the jail shell i stop the emby-server service

4. again within the jail i move the newly installed db/emby-server to ensure what i copy over doesn't get mixed with the new install:   mv /var/db/emby-server /var/db/emby-server-old   this works fine, i check within the /var/db/ folder

 

Not tried this so far this year, but i decided to try and copy the folders from 3.3.1.0 into the 4.0.2.0 install (previously i have been copying from the working-but-no-h264 jail (currently also on 4.0.2.0 as i tried to upgrade some weeks ago in the hope it fixed the h264 issue))

 

5. i used   cp -R /mnt/z1array/Jails/emby_1/var/db/emby-server/ /mnt/iocage/jails/emby-mediaserver/root/var/db/emby-server/  to move the data from old warden 3.3.1.0 over into the fresh install.   I used cp as this is likley what i used at the time i got this to work before but i have no idea how i done this.

6. i shut down the new jail after checking the copy had been successful, i then added the storage into the jail in the right places then start the jail

7. going to the IP and port (which worked after the clean install) i then the message which has been plaguing me for months comes up when i try to access emby (ping does work, but i understand this is

:

      This site can’t be reached

         192.168.1.195 refused to connect.

 

           ERR_CONNECTION_REFUSED

 

 

In short, despite numerous attempts with making varitions such as deleting folder rather than mv them, ive tried to move parts of the /emby-server/ folder over without any luck including trying once file by file to see what file broke it.  This did work, then it broke at some point, so i undone what i did then it didnt load.  Currently, with the above example, if i swap out the data to reinstate what i had named /emby-server-old/ then the webpage will load.

 

I have been unable to get the backup tool to ever work, its always gave an error and never produced a successful backup.  The threads below contain some chatter on that issue.

 

Some history of my attempts can be found within the following posts:

 

https://emby.media/community/index.php?/topic/63110-freenas-replicate-all-unique-emby-settings-metadata-to-new-jail/

   I tried the method (at the time, not recently) of mounting the emby-server folder into the jail from another location but i never got this to work.

 

https://emby.media/community/index.php?/topic/65152-mapping-iocage-jail-folder-as-network-drive/

   As another workaround, i tried to see if there way a way to manipulate the files via a mapped drive but this didnt go anywhere, and i think it was after this i was able to get the warden .3.3.1.0 to copy over to the iocage 3.5.3.0 so didnt go further.   Perhaps i should install 3.5.3.0 again and try that?

 

https://emby.media/community/index.php?/topic/65471-freenas-iocage-plugin-emby-3530-ffmpeg-solution/

   I then decided that rather than try to move the files or start a new jail, i would try and fix the h264 issue (which also involved me upgrading to see if this worked).  So there is more stuff in this thread of valued help which has not yielded any sucess.

 

 

So.... there has been no meaningful viewing or changes since 3.3.1.0 in Oct/Nov last year, so if anybody had a good method to migrate data i would hugely appreciate it, theres 3 years of daily usage, playlists, history, metadata etc which when i see a fresh import of my media into a fresh install (i was going to give up and just start again) makes me distressed not to just have my history etc.

 

Please help! :)

 

Stuart

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

MRobi

I had a similar issue when I went from 3.5.x to 3.6.x, the exact releases I'm not sure of right off hand. 

 

I always keep my config files mounted outside the jail, and link them in. That way if I have to destroy the jail for any reason, I don't lose the configs. When I went to 3.6.x it would load and work fine, but as soon as I mounted my config folder it would crash emby. I ultimately started moving the files over 1 at a time, and every time as soon as I'd move the actual database file, it would crash. My only conclusion is that something changed in the way the database is stored/read. 

 

I ended up manually configuring everything as I had it and using trakt to sync the watched status and away I went. I know it's not the answer you're looking for, but if you still have access to the old server you could do the same fairly easily.

Link to comment
Share on other sites

stuartsjg

Hi - thanks for the feedback.   Whats annoying is that i done it before when i moved from 3.3.1.0 warden to 3.5.3.0 iocage.  I had the steps on a text file but ive no idea where thats gone!   I should have posted the solution to the forum...

 

I have just setup a jail with version 3.5.3.0 and again, after putting the new install /emby-server/ away, and copying the 3.3.1.0 data over, it kills the install.   Going to try again with rsync.   It could be some permissions thing perhaps - all very confusing!

 

Whats also odd, i just deleted the /emby-server/ folder which i had copied into 3.5.3.0 from 3.3.1.0, then done a cp -r to put the "backup" of the new install back into emby-server, and again it wont load.   So its perhaps just any mucking about with the emby-server folder is upsetting something.   Even if i try and do pkg add -f https://github.com/MediaBrowser/Emby.Releases/releases/download/3.5.3.0/emby-server-freebsd_3.5.3.0_amd64.txz again to perhaps "fix" the broken files, i can never get emby to load.

Edited by stuartsjg
Link to comment
Share on other sites

MRobi

It could possibly be a permission issue. After copying the files over, go see the owner of the folder and what the permission is set to. If emby can't access to read/write the files in the config folder, it could cause it to crash.

Link to comment
Share on other sites

stuartsjg

Thanks,

 

I went looking to see how best to manage the permissions and a forum post on the freenas forum suggested to create the new destination folder before doing an rsync.   So i done the following:

#enter the jail shell
pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw
pkg add -f https://github.com/MediaBrowser/Emby.Releases/releases/download/4.0.2.0/emby-server-freebsd_4.0.2.0_amd64.txz

sysrc -f /etc/rc.conf emby_server_enable="YES"
service emby-server start 2>/dev/null
#restart jail

service emby-server stop
cp -r /var/db/emby-server /var/db/emby-server-old
rm -r /var/db/emby-server/
mkdir /var/db/emby-server/
rsync -vrlpogth /[old location]/emby-server/ /[new location]/emby-server/

#stop jail
#add storage
#start jail

And that worked!   Whoohoo.  Great - thanks for the permissions pointer!   I have my old libraries etc all within the new version of emby,   Except that i am still getting playback errors on some videos.

 

As a test, i done another install but didnt copy anything over but jsut went on and added some media into the new isntall and it played fine.  I then done the folder move stuff above, and again the old libraries imported but with the issue.

 

So, theres something within the var/db/emby-server/ which is coming over and affecting ffmpeg.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...