Schedules Direct US/Canadian/Mexico EPG Plugin (Updated August 2010) (1 Viewer)

Paul Jackson

Portal Member
May 15, 2015
31
18
58
Home Country
United States of America United States of America
In order to attempt to try to figure out what's going on I modified the schedule a direct plug-in code. I made the RunEPGImporter method public (obviously a hack and not something that should be permanent). I then added a button to the schedule direct plug-in which is clickable from the setup TV. The method calls the web service and imports the data into the database. It runs and imports the data from the web service with no issue when called from setup TV. This method is the same method that reported the exception in the TV service.

This is the exception that the TV service throws before and after the modifications.
[2015-05-22 05:20:39,337] [Log ] [SchedulesDirect EPG Client] [INFO ] - System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: The requested address is not valid in its context 127.0.0.1:50624
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at SchedulesDirect.SchedulesDirectWebService.SchedulesDirectWebServiceProxy.download(String startTime, String endTime)
at SchedulesDirect.SchedulesDirectWebService.Download(DateTime startTime, DateTime endTime)
at SchedulesDirect.Plugin.SchedulesDirectPluginTVE3.RunEpgImport()

Googling the exception doesn't yield too much definitive. I'm not sure where to look or how to look further how to attempt to resolve this.
 

breese

Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    66
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    It is begining to look as if your server has some issues with DNS or possibly highjacked.
    If you have 1 machine on the network that can access the SD web info and a server (on the same network) that cannot, then I would begin by verifiying the network setting differences between the 2.
    The fact that your server only attempts to connect to the 127 private network indicates it is not routing properly.

    There is also a possibility the server has been highjacked by some type of malware and there-for cannot route properly.
    I have the MP supplied Schedules Direct plugin running with both MP1 and MP2 with the hosts file modification and have no issues with updates from the web site.
     

    Paul Jackson

    Portal Member
    May 15, 2015
    31
    18
    58
    Home Country
    United States of America United States of America
    thanks for the quick response.

    I believe that may be a possibility but truly doesn't make sense because in both instances it is calling the same underlying code through the TV service and when it is called from the TV setup. I can successfully reach the web service when I call through the setup TV GUI. however it won't reach when its called TV service. I will in the meantime run some malware detect grams to see if it can find anything. there is absolutely no harm and trying to figure out if that's the problem but I'm not convinced this routing on this machine is the problem but also not unwilling to rule it out.

    Mcl2xml can also call the schedule direct web service from this machine. it reaches it every single time I run the program. if I'm understanding what you're saying, I wouldn't think it would consistently reach the web service. Of course, if there's something different that happens in a service call on the OS level that might explain the difference.

    so so far the only place it can not call the web service is through the TV service. every other place I call it from including the same code but from and hack I put together to call it from the setup TV gui.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Perhaps it is something to do with Windows accounts?
    TV service is usually run by a system account, whereas [presumably] you'd be running SetupTv.exe, mc2xml.exe etc. on your own account.
     

    Paul Jackson

    Portal Member
    May 15, 2015
    31
    18
    58
    Home Country
    United States of America United States of America
    Not sure why but it is something that the system level Windows account that's the problem. I changed the service to login as my user account which also has administrative privileges. Now it successfully runs. The anti-spyware yielded nothing more than tracking cookies.

    Code:
    [2015-05-22 11:11:04,804] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Starting EPG refresh job on thread #5
    [2015-05-22 11:11:04,804] [Log    ] [SchedulesDirect EPG Client] [INFO ] - UTC time is 5/22/2015 3:11:04 PM, local time is 5/22/2015 11:11:04 AM (DST is True)
    [2015-05-22 11:11:04,814] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Rename Existing Channels is set to: True, with Template: {number} {callsign}.
    [2015-05-22 11:11:04,824] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Digital Channels is set to: True, with External Input: SvhsInput1.
    [2015-05-22 11:11:04,824] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Digital Channels is set to: True, with External Audio Input: SPDIFInput1.
    [2015-05-22 11:11:04,834] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Digital Channels Country is set to: United States.
    [2015-05-22 11:11:04,844] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Analog Channels is set to: False, with External Input: SvhsInput1.
    [2015-05-22 11:11:04,844] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Analog Channels is set to: False, with External Input: SPDIFInput1.
    [2015-05-22 11:11:04,854] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Channel Sorting is set to: True.
    [2015-05-22 11:11:04,854] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Allow Channel Matching without Frequency is set to: False.
    [2015-05-22 11:11:04,864] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Delete Channels with No EPG Mapping is set to: False.
    [2015-05-22 11:11:04,964] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Username: plj49876
    [2015-05-22 11:11:04,964] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Password was set
    [2015-05-22 11:11:05,184] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Requesting 24 hours of program listings from [5/22/2015 11:11:05 AM] to [5/23/2015 11:11:05 AM]
    [2015-05-22 11:11:05,184] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: About ot call webservice
    [2015-05-22 11:11:06,504] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Called webservice
    [2015-05-22 11:11:06,504] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Got Subscription Expiration
    [2015-05-22 11:11:06,504] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Got Messages
    [2015-05-22 11:11:06,514] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: About to get stations
    [2015-05-22 11:11:06,524] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Processing lineup Local Broadcast Listings [id=PC:02155 type=LocalBroadcast postcode=02155]
    [2015-05-22 11:11:06,534] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Channel WBPXDT2 (WBPX-DT2) was found as 68-2 WBPXDT2 in EPG mapping database
    [2015-05-22 11:11:06,574] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Updated channel 68-2 WBPXDT2 [id=22 xmlid=44651.68-2.schedulesdirect.org]

    If there is no harm in letting the service run under that login, I will consider it a work around for the problem for my particular system.

    Thanks for the help.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Not sure why but it is something that the system level Windows account that's the problem. I changed the service to login as my user account which also has administrative privileges. Now it successfully runs.
    Great! :)
    Gotta say: this is the first time I've ever encountered a problem like this. It's pretty odd.

    If there is no harm in letting the service run under that login, I will consider it a work around for the problem for my particular system.
    I can't say for sure that there's no harm, but I think a handful of other people that I've helped do run the service under a different login. Give it a shot, and let us know if you run into problems.
     

    TheBigNoob

    New Member
    May 28, 2015
    3
    0
    36
    Home Country
    United States of America United States of America
    Not sure why but it is something that the system level Windows account that's the problem. I changed the service to login as my user account which also has administrative privileges. Now it successfully runs. The anti-spyware yielded nothing more than tracking cookies.

    Code:
    [2015-05-22 11:11:04,804] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Starting EPG refresh job on thread #5
    [2015-05-22 11:11:04,804] [Log    ] [SchedulesDirect EPG Client] [INFO ] - UTC time is 5/22/2015 3:11:04 PM, local time is 5/22/2015 11:11:04 AM (DST is True)
    [2015-05-22 11:11:04,814] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Rename Existing Channels is set to: True, with Template: {number} {callsign}.
    [2015-05-22 11:11:04,824] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Digital Channels is set to: True, with External Input: SvhsInput1.
    [2015-05-22 11:11:04,824] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Digital Channels is set to: True, with External Audio Input: SPDIFInput1.
    [2015-05-22 11:11:04,834] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Digital Channels Country is set to: United States.
    [2015-05-22 11:11:04,844] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Analog Channels is set to: False, with External Input: SvhsInput1.
    [2015-05-22 11:11:04,844] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Add New Analog Channels is set to: False, with External Input: SPDIFInput1.
    [2015-05-22 11:11:04,854] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Channel Sorting is set to: True.
    [2015-05-22 11:11:04,854] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Allow Channel Matching without Frequency is set to: False.
    [2015-05-22 11:11:04,864] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Delete Channels with No EPG Mapping is set to: False.
    [2015-05-22 11:11:04,964] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Username: plj49876
    [2015-05-22 11:11:04,964] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Password was set
    [2015-05-22 11:11:05,184] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Requesting 24 hours of program listings from [5/22/2015 11:11:05 AM] to [5/23/2015 11:11:05 AM]
    [2015-05-22 11:11:05,184] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: About ot call webservice
    [2015-05-22 11:11:06,504] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Called webservice
    [2015-05-22 11:11:06,504] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Got Subscription Expiration
    [2015-05-22 11:11:06,504] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: Got Messages
    [2015-05-22 11:11:06,514] [Log    ] [SchedulesDirect EPG Client] [INFO ] - TEST: About to get stations
    [2015-05-22 11:11:06,524] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Processing lineup Local Broadcast Listings [id=PC:02155 type=LocalBroadcast postcode=02155]
    [2015-05-22 11:11:06,534] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Channel WBPXDT2 (WBPX-DT2) was found as 68-2 WBPXDT2 in EPG mapping database
    [2015-05-22 11:11:06,574] [Log    ] [SchedulesDirect EPG Client] [INFO ] - Updated channel 68-2 WBPXDT2 [id=22 xmlid=44651.68-2.schedulesdirect.org]

    If there is no harm in letting the service run under that login, I will consider it a work around for the problem for my particular system.

    Thanks for the help.

    Is there anyway you could share how you did this? I seem to be having the same issues with a fresh rebuild of my tv server

    Edit: Added logs for additional info
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I seem to be having the same issues with a fresh rebuild of my tv server
    The message in your log file is different:
    [2015-05-28 16:48:24,736] [Log ] [SchedulesDirect EPG Client] [INFO ] - Unable to update Electronic Program Guide, no Internet connection detected

    ...so I suspect a different problem.
    I recommend you check that you've allowed TV Server through your security software, especially firewalls.
     

    Paul Jackson

    Portal Member
    May 15, 2015
    31
    18
    58
    Home Country
    United States of America United States of America
    Likely a different problem but here you go.
    You open up the windows services Which is part of your administrative tools.
    Scroll down to TV service.
    Right-click and select properties.
    Click on logon tab.
    Click radio button "this account" and enter the login information.

    Before you shut down the service and restart it. The user must have full access to the program/team media portal and all subdirectories as well as programdata/team media portal. The default is that only the system user has access. You can set the permissions using Windows Explorer and right clicking on the directory. The user that I tried was also a local administrator. I'm not sure if that's a requirement for it to work but just wanted to let you know.

    Keep in mind if you do change the permissions you want to be careful not to put things there accidentally.

    Once you've done this you can stop the service and then start the service back up again. Hope that works for you.
     

    TheBigNoob

    New Member
    May 28, 2015
    3
    0
    36
    Home Country
    United States of America United States of America
    thanks for the feedback everyone,

    I've tested it with and without windows firewall that also has explicit inbound and outbound rules to allow all traffic from tvservice and tvsetup. I have added the "etc/hosts" entry that was mentioned earlier this year, and that the DNS addresses resolve correctly. I've even applied Paul's fix, which now in retrospect, is a completely different issue than mine. Could there be an issue with the plugin? I've noticed that the plugin page is missing a download for it (At least it does for me at the time of posting this): https://www.team-mediaportal.com/extensions/television/schedulesdirect-guide-importer or is that

    This isn't my first rodeo with this plugin either, I was able to correctly setup with my prior install. I thought this was a case of PEBKAC but I'm growing suspicious as time wears on. I wonder why it doesn't think I have internet.
     

    Users who are viewing this thread

    Top Bottom