ps3 media server in fedora 16 as service

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

ps3 media server in fedora 16 as service

Postby johndoe1000 » Wed Dec 14, 2011 1:22 am

Hi,
I am trying to configure ps3 media server in my new installed fedora 16.
i was able to set it up from a terminal running the script PMS.sh and my ps3 can connect to the computer and play my content.

i came accross a problem where i wanted to configure the start of the script as a strartup service.
i created a PMS script in /etc/rc.d/init.d and when using the new systemctl start/stop PMS.service it starts and stops the service correcrly.
my problem is that when i try to do "chkconfig --level 2345 PMS on" the ps3 is not able to see the computer anymore.
once i do "chkconfig PMS off" and enable the PMS service the ps3 sees the computer again.

does anyone know how can i overcome it?

attached are my PMS script.

my PMS.sh script was not changed from the normal download of ps3media server ver 1.5

thanks
johndoe1000
 
Posts: 3
Joined: Wed Dec 14, 2011 1:14 am

Re: ps3 media server in fedora 16 as service

Postby johndoe1000 » Tue Jan 17, 2012 12:13 am

Hi all,
can you please help me.

i have done a little digging and found out that the service is starting prior to the network interface is up.

I have set the chkconfig level to be 3,4 and 5,
i have also set the priority of the script to be 95

i have verified that the service is running after boot.

i saw from the debug log that:

[main] INFO 00:52:21.949 Skipping network interface lo (lo)
[main] INFO 00:52:21.949 Using localhost address
[main] INFO 00:52:21.949 Created socket: 0.0.0.0/0.0.0.0:5001

whereas if i manually start the same script after boot i get:

[main] INFO 01:12:53.422 Scanning network interface p21p1 (p21p1)
[main] INFO 01:12:53.422 Using address /192.168.0.5 found on network interface: name:p21p1 (p21p1)
[main] INFO 01:12:53.422 Created socket: /192.168.0.5:5001

can someone please help me?

thanks
johndoe1000
 
Posts: 3
Joined: Wed Dec 14, 2011 1:14 am

Re: ps3 media server in fedora 16 as service

Postby ozymandias » Wed Jan 18, 2012 3:18 pm

Have you modified your iptables? I have noticed in the past that if you do not open up for multicast access, things get a little.... strange... with the discovery of the media server. Here is what I have in my iptables:

-A INPUT -m state --state NEW -m udp -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT


This may not help you -- it may not even be related, but this resolved all the trouble I had way-back-when when I was having issues finding the service from my PS3.
ozymandias
 
Posts: 16
Joined: Sun Feb 14, 2010 9:57 pm

Re: ps3 media server in fedora 16 as service

Postby kwyjibo » Wed Jan 18, 2012 6:02 pm

I made myself a native systemd file to get it working as a proper systemd service on fedora 15+

Obviously replace the username, groupname, working dir and exec start bits to suit your setup.

/lib/systemd/system/ps3media.service
Code: Select all
[Unit]
Description=PS3MediaServer
After=syslog.target network.target rpcbind.service

[Service]
User=dan
Group=dan
WorkingDirectory=/home/dan/PMS/
Type=simple
ExecStart=/home/dan/PMS/pms.sh

[Install]
WantedBy=multi-user.target


Once the file is created you need to run 'systemctl daemon-reload' to make systemd aware of the new file.

Start the service manually by running 'systmctl start ps3media.service' or 'service ps3media start' (either way is the same result).

If it starts ok then run 'systemctl enable ps3media.service' or 'chkconfig ps3media on' to make it start on boot (again either way is the same result).

I'll happily wrap up the latest ps3mediaserver into an Fedora16 rpm (with a dedicated user and config setup so that it works right off the bat) if people are interested?
kwyjibo
 
Posts: 1
Joined: Wed Jan 18, 2012 5:45 pm

Re: ps3 media server in fedora 16 as service

Postby johndoe1000 » Thu Jan 19, 2012 6:57 pm

I tried to follow your steps and I get an error when trying to start the service:

ps3mediaserver.service - PS3MediaServer
Loaded: loaded (/lib/systemd/system/ps3mediaserver.service; disabled)
Active: failed since Thu, 19 Jan 2012 19:56:57 +0200; 3s ago
Process: 7848 ExecStart=/usr/apps/pms-linux-1.50.0/pms.sh (code=exited, status=203/EXEC)
CGroup: name=systemd:/system/ps3mediaserver.service

can you please help?

regards
johndoe1000
 
Posts: 3
Joined: Wed Dec 14, 2011 1:14 am

Re: ps3 media server in fedora 16 as service

Postby doobie » Mon Apr 02, 2012 10:08 am

kwyjibo wrote:I made myself a native systemd file to get it working as a proper systemd service on fedora 15+

Obviously replace the username, groupname, working dir and exec start bits to suit your setup.

/lib/systemd/system/ps3media.service
Code: Select all
[Unit]
Description=PS3MediaServer
After=syslog.target network.target rpcbind.service

[Service]
User=dan
Group=dan
WorkingDirectory=/home/dan/PMS/
Type=simple
ExecStart=/home/dan/PMS/pms.sh

[Install]
WantedBy=multi-user.target


Once the file is created you need to run 'systemctl daemon-reload' to make systemd aware of the new file.

Start the service manually by running 'systmctl start ps3media.service' or 'service ps3media start' (either way is the same result).

If it starts ok then run 'systemctl enable ps3media.service' or 'chkconfig ps3media on' to make it start on boot (again either way is the same result).

I'll happily wrap up the latest ps3mediaserver into an Fedora16 rpm (with a dedicated user and config setup so that it works right off the bat) if people are interested?


Hi mate, this script works 99% ! However have the problem with the service not showing as available on the ps3, until I restart the service. Believe it's to do with the order at which the service starts.

I can confirm that it starts automatically, it's just not appearing on the ps3 until I restart (Must be to do with some network service?)

I'm running Fedora 16, have it in exactly as you have posted, except using root and my ps3mediaserver is located under /usr/local/ps3mediaserver

Any help would be great!

Thanks heaps,

Stewart
doobie
 
Posts: 1
Joined: Mon Apr 02, 2012 10:01 am

Re: ps3 media server in fedora 16 as service

Postby meskibob » Mon Apr 02, 2012 2:05 pm

I provide NO application support via PM or email, so please post your question to the forum per the Forum Rules.
meskibob
Moderator
 
Posts: 4760
Joined: Mon Jan 19, 2009 4:11 pm

Re: ps3 media server in fedora 16 as service

Postby Posterchild66 » Sun Jun 03, 2012 9:59 am

Worked great for me, just what I needed!

Used on Fedora 17 x64.

Thanks, JP
Posterchild66
 
Posts: 3
Joined: Sat Jun 02, 2012 10:46 am

Re: ps3 media server in fedora 16 as service

Postby J.L.C. » Tue Jul 17, 2012 5:22 am

Script is working 99% for me too.
Everything works great as long as I manually start the service after the server restarts.

Does anyone know of any tweaks that will have PMS up and available automatically?
J.L.C.
 
Posts: 12
Joined: Tue Sep 27, 2011 3:05 pm

Re: ps3 media server in fedora 16 as service

Postby tedwar133 » Sun Nov 11, 2012 6:38 am

I created that service and only changed the user, group, and location where PMS was installed, and I am getting the error:

systemd[14650]: Failed at step USER spawning /usr/local/apps/pms/pms-current/PMS.sh: No such process

That script does exist, is readable and executable by the user I have in the ps3media.service file.

I am running on Fedora 17 (32 bit), using PMS 1.70. I also cannot get PMS to start up correctly unless I either run as root, or the user I am logged in as (even if I have it run minimized so it does not try to connect to X11), I just get the error that it cannot find the config file. The weird part is that the file referenced does exist, and I do have it set to run minimized. Everything works fine as root or the user I log in as. Does anyone have any suggestions?

Thanks for your help!


This is the error I get:

No protocol specified
Toolkit error: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
00:33:46.857 [main] DEBUG o.a.c.c.ConfigurationUtils - ConfigurationUtils.locate(): base is null, name is /home/pms/.config/PMS/PMS.conf
00:33:46.863 [main] DEBUG o.a.c.c.DefaultFileSystem - Could not locate file /home/pms/.config/PMS/PMS.conf at null: no protocol: /home/pms/.config/PMS/PMS.conf
00:33:46.863 [main] DEBUG o.a.c.c.ConfigurationUtils - Loading configuration from the absolute path /home/pms/.config/PMS/PMS.conf
00:33:46.864 [main] DEBUG o.a.c.c.PropertiesConfiguration - Base path set to file:///home/pms/.config/PMS/PMS.conf
00:33:46.881 [main] DEBUG o.a.c.c.PropertiesConfiguration - FileName set to PMS.conf
00:33:46.881 [main] DEBUG o.a.c.c.PropertiesConfiguration - Base path set to /home/pms/.config/PMS
....
tedwar133
 
Posts: 1
Joined: Sun Nov 11, 2012 6:28 am


Return to Linux/Unix Support

Who is online

Users browsing this forum: No registered users and 4 guests