Jump to content

Unable to Start MBS as Task


Xzener

Recommended Posts

Xzener

Hello,

 

I have built a dedicated server, and am unable to start Media Browser Server as a scheduled task. I'm trying to launch it without having to login. Basically, if the PC were to reboot or perhaps restart after power outage, MBS would start without user interaction... but stay UN-logged in.

 

Can anyone help? I've tried everything, not sure what I'm doing wrong.

 

Running it as a service does not appeal to me ATM... Dev mode requires many updates, need to be able to restart remotely.

Edited by Xzener
Link to comment
Share on other sites

snazy2000

I set my server to auto login on startup that works great :) problem I can see without logging in and without a service you won't be able to control it and it may be erroring becuase cannot create task bar stuff not sure :) you might be able to log in the server then logout auto after certain amount of time if wasn't first login

 

Sent from my HTC One using Tapatalk

Link to comment
Share on other sites

CBers

@@Xzener - what's your reasons for not having the server logon?

 

Makes life a whole lot simpler to auto-login. You can always set the screensaver to kick in after 1 minute and force it to request a password on screensaver wake.

 

I stopped running MBS as a service when we couldn't get it to restart correctly and so needed manual intervention every time.

Edited by CBers
  • Like 1
Link to comment
Share on other sites

The service is the way you run the program without logging in.  So, you either need to log in or run as a service.

  • Like 1
Link to comment
Share on other sites

Xzener

With my previous build, I had it all setup... I can't remember how I did it, but I had it starting the server, SickBeard, and SABznbd without login, and without user intervention. It was a script I had written. It was in the Startup folder. But the way it kicked off without login is what I can't remember.

Link to comment
Share on other sites

Xzener

CBers, no reason really... I had it working before. It's frustrating. I can get Sickbeard and SABznbd launching with Task Scheduler. Why MBS refuses, you got me??

 

EDIT: I remember what it was, MBS was launching before FlexRAID was running. Doing so, MBS wasn't working correctly. The script was adding a 45sec delay before MBS was launched. I'm no longer going to user FR, it really screwed up my library a while back.

Edited by Xzener
Link to comment
Share on other sites

CBers

Xzener - have you set up the task to run when user not logged in and supplied the password?

Link to comment
Share on other sites

Xzener

Yes, please, please... Try and duplicate my issue. Try and start MBS with task scheduler.

Link to comment
Share on other sites

CBers

Not at home at the moment, but could try latrr/tomorrow.

 

Do you have the trigger on Windows start-up?

 

Does the service run OK when logged on?

 

Have you tried exporting one of the other tasks that work, change the details and import?

Edited by CBers
Link to comment
Share on other sites

Xzener

Yes, yes, and yes... MBS refuses to ran as a task. Task Scheduler even reports it as "The task is currently running" even though it isn't.

Link to comment
Share on other sites

the most common cause for the service not starting is that you already have the tray icon running. you can't run both at the same time.

Link to comment
Share on other sites

CBers

Perhaps Ebr, Luke or Swhitmore could do a team view session with you?

Link to comment
Share on other sites

Xzener

Well, as much as I'd prefer launching MBS without login or user intervention... I guess I agree, having the profile log in, start the programs and 5min later go to screensaver/lock the PC is probably my best option ATM. I welcome any help you can offer CBers. Thanks in advance.

Link to comment
Share on other sites

Xzener

I still don't understand why I can launch Sickbeard and SABznbd but not Media Browser Server using Task Scheduler.

Link to comment
Share on other sites

CBers

Not sure why MBS is an issue.

 

Personally I always log on my account and don't have an issue.

 

Perhaps someone else can suggest an alternative.

Link to comment
Share on other sites

I still don't understand why I can launch Sickbeard and SABznbd but not Media Browser Server using Task Scheduler.

 

I explained above.  MB Server requires user credentials in order to access your drives and network.

 

So, you have two options - you either run as a service and provide those user credentials in the service setup or you run as a normal program and automatically log in as the proper user.

 

Unless you can provide user credentials for a task in task scheduler, that simply is not going to work.

Link to comment
Share on other sites

Xzener

I understand Ebr... What I don't understand is how I had it working before. Although I was not using Task Scheduler, I had some other method that worked perfectly with a script in the Startup folder. I swear, the profile wasn't logged in to... Still racking my brain.

Link to comment
Share on other sites

I understand Ebr... What I don't understand is how I had it working before. Although I was not using Task Scheduler, I had some other method that worked perfectly with a script in the Startup folder. I swear, the profile wasn't logged in to... Still racking my brain.

 

The startup folder is run at logon - not machine start up...

Link to comment
Share on other sites

@@Xzener, I can't explain why it doesn't work in Task Scheduler, but I've gotten it to work with a group policy startup script. There is no tray icon, but MBS is running and works (at least with a cursory look).

 

I created a file called mbs_startup.cmd, stored directly under c:\, that contained one line:

START "" "C:\Users\John\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe"

Then opened gpedit.msc and added c:\mbs_startup.cmd under

Local Computer Policy > Computer Configuration > Windows Settings > Scripts > Startup

 

MBS starts up on a reboot without anyone logging in.

 

I am not endorsing this method as I have no way of knowing what kind of issues it may cause, but it seems to be working here.

 

I also don't know what effect this might have on automatic updates.

Edited by bigjohn
Link to comment
Share on other sites

Xzener

Thanks Bigjohn,

 

I will attempt this and report back soon. Not having the tray icon is no biggie. One question... Does the dashboard have a server reboot button after updates or plugin Installs??

Edited by Xzener
Link to comment
Share on other sites

Xzener

Strange. If I remotely browse to the dashboard... I am met with a single user login screen, "System". Any ideas there Bigjohn?? This obviously happened to me 18hours ago, caused by one of the methods I was trying.

 

5377e6a03e0f7_Capture.png

Edited by Xzener
Link to comment
Share on other sites

Thats probably from starting it via the group policy startup script. It is probably just a bad idea to start it that way.

 

Like I said, it only stood up to a cursory examination.

;)

Link to comment
Share on other sites

Xzener

Right. MBS isn't liking it either, I'm receiving null errors for user... Its displaying my user picture, but is clearly not using my profile. Its doing some strange stuff. I will resort back to logging in, launching the programs, then locking via screensaver 5min later.

 

Thanks for the help Bigjohn!

Link to comment
Share on other sites

GhostRider

It is a while since I wrote any real code but thinking about this maybe starting the server from a script is not working as there is no window?

 

I used to run a script without a window using a feature of VB Script setting run mode to 0. I had a wrapper VBScript which Iauched the actual script without a window which just had two lines in it like this:

 

Set oShell = CreateObject("WScript.Shell")
oShell.Run """c:\path_to_script\scriptname.bat""", 0, True
 

 

Maybe worth trying lauching it this way?

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...