Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Setting up FreeNAS 9.2.0 with Transmission and Couchpotato as a DLNA-Server

Status
Not open for further replies.

zufallsheld

FreeNAS Aware
Joined
Dec 27, 2013
Messages
54
The configuration part



How exactly are you connecting to the VM?

Anytime I've ssh'd anything to do with Freenas, I ssh using putty to my main freenas IP .10 as root. Then anything relating specifically to the jails, I jexec jid tcsh. Now when I do that, the firt command
Code:
sudo apt-get update && sudo apt-get install curl wget


I get "command not found"

When I try to ssh directly into jail, my root, user name or the vm/musicbrainz password do not work.

So are you ssh-ing somehow through the virtualbox in the browser?
Do you installed the musicbrainz in a virtualbox? This is different from jails in your freenas.
If you installed it in a virtualbox you should ssh to the IP-address of the virtualbox-vm with port 2222.
 

JJT211

FreeNAS Experienced
Joined
Jul 4, 2014
Messages
315
Ahhhhh.....thank you! I missed the port 2222 part!
 

JJT211

FreeNAS Experienced
Joined
Jul 4, 2014
Messages
315
After entering the last command

Code:
./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump*.tar.bz2 --echo



I got the below

Code:
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server$ dropdb -U musicbrainz musicbrainz
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server$ ./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump*.tar.bz2 --echo
Use of uninitialized value $databaseName in string eq at ./admin/InitDb.pl line 480.
Mon Mar 30 22:18:49 2015 : InitDb.pl starting
Mon Mar 30 22:18:49 2015 : Creating database 'musicbrainz'
createlang: language "plpgsql" is already installed in database "musicbrainz"

Failed to create language plpgsql -- it's likely to be already installed, continuing.
createlang: language installation failed: ERROR:  could not open extension control file "/usr/share/postgresql/9.1/extension/plperlu.control": No such file or directory

Failed to create language plperlu -- it's likely to be already installed, continuing.
NOTICE:  schema "musicbrainz" does not exist
NOTICE:  schema "musicbrainz" does not exist
CREATE SCHEMA
CREATE SCHEMA
CREATE SCHEMA
CREATE SCHEMA
CREATE SCHEMA
CREATE SCHEMA
Mon Mar 30 22:18:50 2015 : Installing extensions (Extensions.sql)
Mon Mar 30 22:18:51 2015 : Creating tables ... (CreateTables.sql)
Mon Mar 30 22:18:52 2015 : Creating tables ... (caa/CreateTables.sql)
Mon Mar 30 22:18:52 2015 : Creating documentation tables ... (documentation/CreateTables.sql)
Mon Mar 30 22:18:53 2015 : Creating tables ... (report/CreateTables.sql)
Mon Mar 30 22:18:53 2015 : Creating statistics tables ... (statistics/CreateTables.sql)
Mon Mar 30 22:18:53 2015 : Creating wikidocs tables ... (wikidocs/CreateTables.sql)
Mon Mar 30 22:18:54 2015 : Pre-checking /tmp/dumps/mbdump-cdstubs.tar.bz2
Mon Mar 30 22:18:54 2015 : Schema sequence mismatch - codebase is 20, /tmp/dumps/mbdump-cdstubs.tar.bz2 is 21

Failed to import dataset.
Mon Mar 30 22:18:54 2015 : InitDb.pl failed
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server$


I went ahead and finished the remainder of installation of musicbrainz and headphones and im also getting this in my console messages every 30 mins

Mar 30 19:34:28 freenas kernel: <118>Mar 30 19:34:28 musicbrainz sm-mta[78444]: t2UCL8oK045372: SYSERR(root): hash map "Alias0": unsafe map file /etc/mail/aliases.db: World writable directory
I opened up Headphones web gui and could not search any artists. However, when I set the server back to musicbrainz.org, the search function started to work again.
 
Last edited:

JJT211

FreeNAS Experienced
Joined
Jul 4, 2014
Messages
315
Wow, I think I figured it out. The problem is on line 28, "Schema sequence mismatch - codebase is 20, /tmp/dumps/mbdump-cdstubs.tar.bz2 is 21"

The sub DB_SCHEMA_SEQUENCE {20} needs to be changed from 20 to 21 in in the DBDefs.pm file, just cd up one directory and its in the lib folder

Code:
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server$ cd lib
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server/lib$ sudo nano DBDefs.pm
#Scroll down and change DB_SCHEMA_SEQUENCE value from 20 to 21
#Save and Exit
#cd back to original directory
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server/lib$ cd ..
#Execute the last 2 commands
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server$ dropdb -U musicbrainz musicbrainz
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server$ ./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump*.tar.bz2 --echo


Hasnt finished quiet yet, looks like its gonna take a while (like most of this musicbrainz install), but its looking good so far. Gotta get some sleep so ill let it go and report back

Its been sitting at the mddump/edit for like 30 mins now.....I do see plenty of CPU activity though.....hopefully its working
 

Attachments

Last edited:

JJT211

FreeNAS Experienced
Joined
Jul 4, 2014
Messages
315
Damn, that went allllll night, and failed at the end due to a lack of space??!?

Here's end of it right here
Code:
Tue Mar 31 11:00:18 2015 : ensuring editor information is present
Failed query:
        'INSERT INTO editor (id, name, password, ha1)
             SELECT DISTINCT s.editor, 'Editor #' || s.editor::text, '', ''
             FROM (
                 SELECT editor FROM annotation
             UNION ALL
                 SELECT editor FROM edit
             UNION ALL
                 SELECT editor FROM edit_note
             UNION ALL
                 SELECT editor FROM vote
             ) s
             LEFT JOIN editor ON s.editor = editor.id
             WHERE editor.id IS NULL'
        ()
DBD::Pg::st execute failed: ERROR:  could not write to hash-join temporary file: No space left on device at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 107.

at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 113
        Sql::__ANON__('DBD::Pg::st execute failed: ERROR:  could not write to hash-j...') called at /usr/share/perl5/Try/Tiny.pm line 100
        Try::Tiny::try('CODE(0x9ca1bb4)', 'Try::Tiny::Catch=REF(0x9c69334)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 114
        Sql::do('Sql=HASH(0x9a06d18)', 'INSERT INTO editor (id, name, password, ha1)\x{a}             SEL...') called at /home/musicbrainz/musicbrainz-server/admin/MBImport.pl line 467
        main::EnsureEditorTable() called at /home/musicbrainz/musicbrainz-server/admin/MBImport.pl line 200

Failed to import dataset.
Tue Mar 31 11:05:02 2015 : InitDb.pl failed
vm@musicbrainzvm:/home/musicbrainz/musicbrainz-server$


The file below in the above directory was 74GB!

musicbrainz-server-20140514-disk1.vmdk

Think I may mount a new dataset to that directory and give it a try again.
 
Last edited:

JJT211

FreeNAS Experienced
Joined
Jul 4, 2014
Messages
315
Wouldnt let me mount to that directory. Any ideas?

You mind directing me to your reference for making this part of the guide? There's an over abundance of info and most of it is really old.
 

zufallsheld

FreeNAS Aware
Joined
Dec 27, 2013
Messages
54
Wouldnt let me mount to that directory. Any ideas?

You mind directing me to your reference for making this part of the guide? There's an over abundance of info and most of it is really old.
I followed the official install guide on this subject:
https://github.com/metabrainz/musicbrainz-server/blob/master/INSTALL.md#creating-the-database

If you don't have enough space, leave out some files:
To get going, you need at least the mbdump.tar.bz2, mbdump-editor.tar.bz2 and mbdump-derived.tar.bz2 archives, but you can grab whichever dumps suit your needs.
 

JJT211

FreeNAS Experienced
Joined
Jul 4, 2014
Messages
315
I followed the official install guide on this subject:
https://github.com/metabrainz/musicbrainz-server/blob/master/INSTALL.md#creating-the-database

If you don't have enough space, leave out some files:
Thx, been reading up the last few hours. Im learning a lot about CLI and coding in general. I understand all the commands up to the last 2.

Code:
dropdb -U musicbrainz musicbrainz
./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump*.tar.bz2 --echo


The best I can translate the first one is that it drops/deletes the default database?

The second, creates a new database, and imports the dumps from the ftp server we spent a few hours downloading. I see the wildcard is what imports the entire dumps. However, I can't figure out the syntax to do them individually.

Would it looks something like this?

Code:
./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump.tar.bz2 && --import mbdump-editor.tar.bz2 && --import mbdump-derived.tar.bz2 --echo 


I decided to start over from scratch some im waiting on that ftp DL which takes a while. So when im ready to create the database and if something doesnt go quite right, will I be able to start over by executing this

Code:
dropdb -U musicbrainz musicbrainz
?
as opposed to deleting the entire jail?

Also, I stumbled upon http://forums.musicbrainz.org/viewtopic.php?id=5261 which sounds like a guy who ran into a similar problem. His solution, leads to yet another tutorial http://www.rootusers.com/use-gparted-to-increase-disk-size-of-a-linux-native-partition/ which explains how to extend the VM disk space. Sounds like a pain, but in the name of education, I may take the plunge and give it a shot.
 

zufallsheld

FreeNAS Aware
Joined
Dec 27, 2013
Messages
54
Thx, been reading up the last few hours. Im learning a lot about CLI and coding in general. I understand all the commands up to the last 2.

Code:
dropdb -U musicbrainz musicbrainz
./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump*.tar.bz2 --echo


The best I can translate the first one is that it drops/deletes the default database?

The second, creates a new database, and imports the dumps from the ftp server we spent a few hours downloading. I see the wildcard is what imports the entire dumps. However, I can't figure out the syntax to do them individually.

Would it looks something like this?

Code:
./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump.tar.bz2 && --import mbdump-editor.tar.bz2 && --import mbdump-derived.tar.bz2 --echo 
I don't know if two "--imports" work, so better just delete the unnecessary files and import the rest.
Maybe this will also help:
By default, the archives will be extracted into the /tmp directory as an intermediate step. You may specify a different location with the --tmp-dir option.
I decided to start over from scratch some im waiting on that ftp DL which takes a while. So when im ready to create the database and if something doesnt go quite right, will I be able to start over by executing this

Code:
dropdb -U musicbrainz musicbrainz
?
as opposed to deleting the entire jail?
Yes, this should work.
 

JJT211

FreeNAS Experienced
Joined
Jul 4, 2014
Messages
315
Started over from scratch, added schema change before last 2 commands, and everything went off with a hitch! Thx again for the help!
 

one800higgins

Newbie
Joined
Jul 16, 2015
Messages
17
ah ok the trangui is for the client not to install on freenas, then I don't need a guide :)
I came here to ask the same thing. I figured it was like the uTorrent webui where you had to install the updates relative to uTorrent. I see now that it's an installable program... Which makes me wonder if there's a good Chrome plugin instead.
 
Joined
Sep 24, 2015
Messages
1
Hi,

I have followed this guide now point to point but my downloads from transmission stays in transmissions jail so plex and sickrage can't get to the files.

What is wrong?
 

STREBLO

FreeNAS Experienced
Joined
Oct 23, 2015
Messages
243
In case anyone else was having trouble finding it like I was , I just wanted to let people know that the settings.json file for transmission has been moved to /var/db/transmission/settings.json.
 

STREBLO

FreeNAS Experienced
Joined
Oct 23, 2015
Messages
243
I've got a question, what exactly is the downloads folder for in couch potato? If we are setting it to move the downloads to the movie folder and it watches the torrents folder, is the downloads folder only for usenet? Or is it used in some other way and am I not using it right ?
 

zufallsheld

FreeNAS Aware
Joined
Dec 27, 2013
Messages
54
I've got a question, what exactly is the downloads folder for in couch potato? If we are setting it to move the downloads to the movie folder and it watches the torrents folder, is the downloads folder only for usenet? Or is it used in some other way and am I not using it right ?
The downloads folder is where couchpotato downloads the movies to. From there it gets moved to movies.
The torrents folder does not get written, only read for torrent files.
 

STREBLO

FreeNAS Experienced
Joined
Oct 23, 2015
Messages
243
The downloads folder is where couchpotato downloads the movies to. From there it gets moved to movies.
The torrents folder does not get written, only read for torrent files.
But couchpotato should have access to storage in the torrents directory right? In the first post it didn't show couch potato as having access to the torrents folder, was that just left out?
 

zufallsheld

FreeNAS Aware
Joined
Dec 27, 2013
Messages
54
But couchpotato should have access to storage in the torrents directory right? In the first post it didn't show couch potato as having access to the torrents folder, was that just left out?
There's no need for CP to access the storage in the torrents-directory. When you add a movie from CP it gets send automatically to transmission.
You could however put torrent-files in the torrent-directory and transmission would pick them up.
 

STREBLO

FreeNAS Experienced
Joined
Oct 23, 2015
Messages
243
There's no need for CP to access the storage in the torrents-directory. When you add a movie from CP it gets send automatically to transmission.
You could however put torrent-files in the torrent-directory and transmission would pick them up.
Oh, I see. I'm using deluge as it supports proxies until I can get a vpn working with transmission so it must be different..
 
Status
Not open for further replies.
Top