MinimServer Forum
profile from startd - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: Support (/forumdisplay.php?fid=4)
+--- Thread: profile from startd (/showthread.php?tid=6534)

Pages: 1 2


profile from startd - rychieallen - 15-02-2022 16:42

how to submit profile to startd when starting under systemd?


RE: profile from startd - rychieallen - 15-02-2022 16:53

I see in .config my content directory is entered; however, when following troubleshoots, I go to http:/host:97xx and the config shows NO content; I presume this is the crux of my problem. I created instructions for systemd service and startd is active but doesn't serve anything..

if I stop systemd and restart it then starts and serves,

once this works I will post instructions and this will be helpful for me


RE: profile from startd - rychieallen - 15-02-2022 16:57

here is my service file for systemd and this is running okay on fedora 34:

[Unit]
Description=Minimserver mulimedia server
After=multi-user.target
Wants=multi-user.target

[Service]
Type=forking
User=minimserver
Group=minimserver
ExecStart=nohup /usr/bin/bash /home/minimserver/minimserver/bin/startd
#ExecStartPost=nohup /usr/bin/bash /home/minimserver/minimwatch/bin/startc
WorkingDirectory=/home/minimserver


[Install]
WantedBy=multi-user.target


RE: profile from startd - rychieallen - 15-02-2022 17:03

I guess I figure the default profile, which has content inscribed into it during setup should convey the content; however this doesn't seem to be the case. so how do I make the default really be the default when just starting systems execstart= shown, above


RE: profile from startd - rychieallen - 15-02-2022 17:20

finally, I start the daemon, startd, and when running from minim server user the daemon starts and serves [it performs music serving of my content that setup took.

also, in addition, I think there is issue with these instructions: when following the relevant instructions [for linux, install], I see reference to an automatic install. I tried this first but sadly it doesn't start daemon upon next boot. this is why I needed to setup systemd service


RE: profile from startd - rychieallen - 15-02-2022 17:56

Okay, I see the setup script is trying to populate my systemd... and it's not doing it.. I am running fedora and you don't mention this in supported systems. Anyway, I copied the setup service file into where it's expected on systemd for fedora.. and I start the daemon, "startd" and then talk to it and here is what it says:

MinimServer 2.1 update 213, Copyright © 2012-2022 Simon Nash. All rights reserved.
Your license type is Starter. For more information, select the License tab.
Media server status for MinimServer[s100]: Error Refresh status
This page was last updated at 11:52:05 on 15 Feb 2022
No valid content directory found
Your last rescan was at 11:48:16 on 15 Feb 2022Rescan

Your selected content directory is /mnt/nas/Multimedia

To change this, enter the full path to your content directory in the field below and click Update.

Content directory: Update Reset

For more information about using MinimServer, see the Quick start page.


here is my service file, which has some fedora things added:
[Unit]
Description=MinimServer
After=multi-user.target

[Service]
Type=fork
RemainAfterExit=yes
User=minimserver
Group=minimserver
ExecStart=nohup /usr/bin/bash /home/minimserver/minimserver/bin/startd init
#xecStop=/home/minimserver/minimserver/bin/stopall

[Install]
WantedBy=multi-user.target


RE: profile from startd - rychieallen - 15-02-2022 18:05

With the script, kind of like above, here is what service thinks:
[root@s100 ~]# systemctl status minimserver.service
● minimserver.service - MinimServer
Loaded: loaded (/etc/systemd/system/minimserver.service; enabled; vendor preset: disabled)
Active: active (exited) since Tue 2022-02-15 12:03:25 EST; 2s ago
Process: 1273 ExecStart=nohup /usr/bin/bash /home/minimserver/minimserver/bin/startd init (code=exited, status=0/SUCCESS)
Main PID: 1273 (code=exited, status=0/SUCCESS)
Tasks: 65 (limit: 2311)
Memory: 104.1M
CPU: 3.697s
CGroup: /system.slice/minimserver.service
├─1296 /usr/bin/bash /home/minimserver/minimserver/bin/startd init
└─1298 java -jar /home/minimserver/minimserver/lib/mserver.jar --launchrc --set watch.view=log --nohup

Feb 15 12:03:25 s100 systemd[1]: Started MinimServer.

When I use your installation setup's service definition it exits and leaves something running.. If I put nohup and type=fork it runs okay but only when start and stopping systemctl manual. on boot, no cigar


RE: profile from startd - rychieallen - 15-02-2022 18:09

yeah, when I look at the log, here is what is the reason for error:
inimServer 2.1 update 213, Copyright © 2012-2022 Simon Nash. All rights reserved.
OpenJDK Runtime Environment (build 11.0.13+8)
OpenJDK 64-Bit Server VM (build 11.0.13+8, mixed mode, sharing)
Platform default charset is UTF-8
System platform is linux-x64
Using platform default language English (en-US)
Current time is Tue Feb 15 12:05:59 EST 2022 in time zone America/New_York
starting MinimServer[s100]
MinimServer: no valid content directory found
Startup complete

The MimimServer is not getting default profile when running startd under service. I wonder if the working directory will fix that?


RE: profile from startd - simoncn - 15-02-2022 18:45

If you are using SELinux with Fedora, this can cause problems for MinimServer. See this post for a workaround.

The only supported way to start Minimserver at boot is by creating systemd files using the minimserver/bin/setup command (enable automatic startup). You should install MinimServer as a regular user (not root) and use the same regular user to run the minimserver/bin/setup command. I have tested this on Fedora 35 with the SELinux configuration change described in my other post and confirmed that it works.


RE: profile from startd - rychieallen - 15-02-2022 20:53

I've done everything that you mention and the problem still remains:

1) system starts with (soft) status error (very flexible server status)
2) the log indicates that content directory was not specified
3) automatic logging created the service and I just had to enable it with systemctl
4) oh, I did find that "leave resident" and "one shot" didn't stop daemon from exiting and changed this to type=fork. this has to positive effect that daemon didn't shutdown immediately.

But that's it...it seems that unless you will give me more specifics on what you did I think this is not working with Fedora Linux 34