Auto import fails over the network but manual import works

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
Post Reply
jachin99

Posts: 1293
Joined: Wed Feb 24, 2016 3:36 pm
Location:

HTPC Specs: Show details

Auto import fails over the network but manual import works

#1

Post by jachin99 » Tue Jan 08, 2019 2:38 pm

I installed epg123 on my WHS 2011 box, and I'm still testing things out. I shared the epg123 program files folder, and I have pointed a test client only instance of epg123 to said folder. I created a scheduled task on the server to update the guide at 5AM, and this completes successfully. On the client I created a task for 6 AM to import the guide but the task fails with the following being dumped to the log. You can see below that the auto import fails but the manual import succeeds. What am doing wrong? I have the WHS 2011 launchpad set to automatically start, and log in.

Code: Select all

1/8/2019 9:24:53 AM] ===============================================================================
[1/8/2019 9:24:53 AM]  Activating the epg123 client GUI. version 1.2.9.0
[1/8/2019 9:24:53 AM] ===============================================================================
[1/8/2019 9:24:54 AM] [ INFO] Successfully queried the Task Scheduler for status. Could not start. Last Run 1/8/2019 9:22:30 AM; Exit: 0xFFFFFFFF
[1/8/2019 9:25:16 AM] ===============================================================================
[1/8/2019 9:25:16 AM]  Activating the epg123 client GUI. version 1.2.9.0
[1/8/2019 9:25:16 AM] ===============================================================================
[1/8/2019 9:25:16 AM] [ INFO] Successfully queried the Task Scheduler for status. Could not start. Last Run 1/8/2019 9:22:30 AM; Exit: 0xFFFFFFFF
[1/8/2019 9:25:40 AM] [ INFO] Successfully deleted the daily update task from Task Scheduler.
[1/8/2019 9:25:40 AM] [ INFO] Successfully queried the Task Scheduler for status. No task is scheduled to run.
[1/8/2019 9:25:52 AM] [ INFO] Successfully created the daily update task in Task Scheduler for 06:00.
[1/8/2019 9:25:52 AM] [ INFO] Successfully queried the Task Scheduler for status. Ready.The task has not yet run. Exit: 0x00000001
[1/8/2019 9:26:00 AM] [ERROR] File "\\Homeserver\epg123\epg123.mxf" does not exist.
[1/8/2019 9:30:57 AM] Entering importMxfFile() for file "\\Homeserver\epg123\epg123.mxf"
[1/8/2019 9:32:23 AM] [ INFO] Successfully imported .mxf file into Media Center database. Exit code: 0
[1/8/2019 9:32:23 AM] Exiting importMxfFile(). SUCCESS.
[1/8/2019 9:32:23 AM] Entering runWmcTask(ReindexSearchRoot)
[1/8/2019 9:32:23 AM] [ INFO] SUCCESS: Attempted to run the scheduled task "Microsoft\Windows\Media Center\ReindexSearchRoot".
[1/8/2019 9:32:23 AM] [ INFO] Successfully started the ReindexSearchRoot task. Exit code: 0
[1/8/2019 9:32:23 AM] Exiting runWmcTask(ReindexSearchRoot). SUCCESS.
[1/8/2019 9:32:23 AM] Entering runWmcTask(PvrScheduleTask)
[1/8/2019 9:32:23 AM] [ INFO] SUCCESS: Attempted to run the scheduled task "Microsoft\Windows\Media Center\PvrScheduleTask".
[1/8/2019 9:32:23 AM] [ INFO] Successfully started the PvrScheduleTask task. Exit code: 0
[1/8/2019 9:32:23 AM] Exiting runWmcTask(PvrScheduleTask). SUCCESS.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#2

Post by garyan2 » Tue Jan 08, 2019 2:59 pm

Does your task contain the proper credentials? It doesn't see the file, so I'm thinking it doesn't have rights to access your shared folder.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

jachin99

Posts: 1293
Joined: Wed Feb 24, 2016 3:36 pm
Location:

HTPC Specs: Show details

#3

Post by jachin99 » Tue Jan 08, 2019 3:15 pm

I didn't set up credentials for the task itself. I assumed the manual import meant it had everything it needed so I'll look at that.

jachin99

Posts: 1293
Joined: Wed Feb 24, 2016 3:36 pm
Location:

HTPC Specs: Show details

#4

Post by jachin99 » Tue Jan 08, 2019 4:12 pm

Alright I figured it out with a little bit of googling. In spite of my successfully running the manual import, my scheduled task would not run because when the task was created it was configured to run with my local credentials WEATHER I WAS LOGGED IN OR NOT. After coming across this article - https://social.technet.microsoft.com/Fo ... progeneral - I changed the security setting under Gneral/Security options to ONLY RUN WHEN THE USER IS LOGGED ON. From here I kicked off the task manually via task scheduler, and it returned a success message.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#5

Post by garyan2 » Tue Jan 08, 2019 4:34 pm

I'm not sure if you want to keep it set up this way. It means the task will only run if you are logged in to the server. What you want to do is use an account that has access and save your password in the task. Then you can still run whether the user is logged in or not.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

jachin99

Posts: 1293
Joined: Wed Feb 24, 2016 3:36 pm
Location:

HTPC Specs: Show details

#6

Post by jachin99 » Tue Jan 08, 2019 4:53 pm

I still need to look at that but for the purpose of EPG123, almost all of my clients are constantly logged into the server. I still need to create an account for server tasks on each client but I'm not entirely sure how to do that. How would I for instance add an account on the server as an object on each client? I would have to manage permissions for an extra account as well which isn't a huge deal but I can picture this account getting overly permissive as I start using it for more tasks, which is why I'm avoiding that for time being.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#7

Post by garyan2 » Wed Jan 09, 2019 5:12 pm

I don't know how you have your clients setup wrt WHS2011, but the simplest thing to do would be to just share the epg123\output folder to everyone with read access only. Then you won't need any special accounts set up. This was actually one of the main reasons why I changed the output location of the files... to give that extra layer of control what is available on the network.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

glorp

Posts: 369
Joined: Sun Sep 23, 2012 2:54 pm
Location:

HTPC Specs: Show details

#8

Post by glorp » Wed Jan 09, 2019 5:34 pm

If you're in a Windows domain it's not an issue since any account created on the DC will be the same accounts on every client in the domain. But I'd assume there is no DC or you wouldn't be asking.

So the way to do it is to have the same user account on every computer with the same password. I kind of think these accounts need to be administrative in order to be able to kick off the client's WMC schedule reindexing task. That required a lot of privilege and IIRC I could never get it to work unless the account the EP123 scheduled task runs in was Admin. Gary probably knows more about this than I do. You may already have a suitable account if you have an admin account on each computer with the same login credentials. If not you'll need that. Then as Gary mentions, the server needs to have permissions set on the share where the MXF is so that the account you're using has at least read access for that account.

The scheduled task EPG123 creates on clients gets the security credentials of the interactive user that runs EPG123 when the task is created. You can modify those credentials afterwards using Windows Task Scheduler and you may need to do this in order to supply the account password to the *task* if it's going to run in an unattended mode in a different account than the one logged in on the desktop. When you set the options to run in a specific account and also do it when the user is not logged on, you'll be prompted for the account password when you try to save the task again. Just be aware that any changes made that way won't survive any changes you make later using EPG123's gui. You can also be a little tricky and use one of the Windows built-in accounts to avoid needing new accounts everywhere. These require no password and are recognized across any Windows computer and version as the same account when a domain controller is not present. However you'll need a privileged one with network access so SYSTEM is about the only good choice I think. Using it will also require you modify the EPG123 generated schedule task with the same caveats about changes as well as ensuring that SYSTEM has permissions for the share (it should, by default). In order to use it you edit the EPG123-created task and select the option to change user/group and type "SYSTEM" in the box for the object name.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#9

Post by garyan2 » Wed Jan 09, 2019 5:59 pm

WHS2011 is a stripped down version of Windows Server 2008 and can't do a domain controller.

You can add users to the server that are common with the client, but it requires a non-empty user password. This is actually what I did for a long time... my client had a user account (actually a family account I created for devices like an HTPC) that was automatically logged into on startup and was the same as the created user account on WHS. This way, no one had to log on to the client on startup and it had access to the server shares without issue. Just need to remember to make sure the user doesn't have to log back in after sleep or hibernation.

As far as creating the task goes, you have it correct. Except for Win10, the "user" of the task is whatever the interactive user was when the task was created. For Win10, I had to use the NETWORK SERVICE account to address a bug MS had in the anniversary update. I've left it up to the user to find out how they need to adapt to their own networked setup.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

glorp

Posts: 369
Joined: Sun Sep 23, 2012 2:54 pm
Location:

HTPC Specs: Show details

#10

Post by glorp » Wed Jan 09, 2019 7:56 pm

If NETWORK SERVICE has enough permission to run the reindexing task successfully then it would be perfect for this. Personally I've never liked the fact that I have to grant Everyone read access to the EPG123 share in order to use the scheduled task as created from the gui, so I found the common user accounts and passwords a simple way to deal with that. Of course that was back when the MXF had to be in the same directory as the .exe. I tried NETWORK SERVICE myself early on but seemed like it wouldn't reindex on W7 clients consistently which I suspected was insufficient permission on the local machines. A common admin account was the solution for me on W7 clients accessing a WSE2012 server.

jachin99

Posts: 1293
Joined: Wed Feb 24, 2016 3:36 pm
Location:

HTPC Specs: Show details

#11

Post by jachin99 » Thu Jan 10, 2019 3:12 pm

I had to make an account like you all suggested. I created this account on the server and my client, and gave it log in as a batch job rights, and now my scheduled task kicks off successfully. I am wondering if I can revoke the log in as a batch job right on the server though because I don't need the account to perform any server side tasks, and I'm setting the client's account permissions on the client itself. So far I have been able to keep my client account as a standard account with the caveat of the logo in the WMC doesn't get updated because my new account doesn't have access to the registry.

jachin99

Posts: 1293
Joined: Wed Feb 24, 2016 3:36 pm
Location:

HTPC Specs: Show details

#12

Post by jachin99 » Thu Jan 10, 2019 3:14 pm

I also see a Windows Media Center group in WHS, and each PC i have installed the connector on is included in this group. I wonder if the scheduled task can somehow act on behalf of the PC itself.

jachin99

Posts: 1293
Joined: Wed Feb 24, 2016 3:36 pm
Location:

HTPC Specs: Show details

#13

Post by jachin99 » Thu Jan 10, 2019 6:22 pm

After backing up a little bit and toying with this for hours, this is a summary of the steps I have taken to get this working, and why they were necessary.

1. I created two identical accounts on the client and server, both with the same user name and password and leave them as standard user accounts. I'm not sure what effect making them admins will have because I never tested that. I had to do this because my computers are not on a domain, and in a workgroup environment windows 7 and WHS PCs cannot see group policy objects on networked PCs so I could not give a remote user account permission to run my scheduled task.

2. On the server, share the folder, and give network service read-only access. I'm not sure why this is neccessary but not doing so caused my scheduled task to fail regularly. At times it would run once, then fail after subsequent reboots or retries. you should be done now on the server.

3. On the client side, setup your scheduled task via the EPG123 client interface, and point your task to your server's shared folder. Set your task act as your newly created account which should now be duplicated on the server, and set it to run whether you are logged in or not. At the login box put in the new account's credentials, and click the remember box.

4.On the client side, give your newly created account permission to log in as a batch job. Without this permission the task will fail because your account needs permission to make changes even while not logged in.

I'm still getting an access denied to registry error in my log of [ERROR] Unhandled exception caught from epg123Client.exe. message: Requested registry access is not allowed.
but guide updates seem to work fine because right before this error message there is an importmxffile success message.

Post Reply