![]() |
|
|||||||
| SageTV for unRAID/Docker Discussion related to SageTV for unRAID/Docker. Questions, issues, problems, suggestions, etc. relating to SageTV for unRAID/Docker should be posted here. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can some folks please try something with the web UI
The web UI includes the functionality to Power Off extenders by clicking [Power Off] from the following line in the web page:
On Sage Extender at: Kitchen: [XML] [WebRemote] [Power Off] [Reboot] When I do this from the web UI on my unRAID server I get an error like the following: Code:
Failed to send command to MVP: java.lang.Exception: Failed to find RC status in output! Can others please try to run this command on unRAID servers and post whether it works or not? Thanks.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
|
#2
|
||||
|
||||
|
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
|
#3
|
|||
|
|||
|
I did that and telnet is not installed in the docker.
But the thing is that from the web UI the telnet command actually does execute correctly as the extender will power off or power on so the telnet client is initiating and sending the "killall miniclient" command (or killall waitpoer), it is just the parsing of the output that has problems. I am guessing that the web UI is using the "org.apache.commons.net.telnet.TelnetClient" library. I say that because that is what Slugger used in his GlobalHelpers and ExtenderClient extensions to the API. But I am guessing that you are correct that it is something that a docker instance doesn't have which is causing the problem. Sean - you don't use extenders anymore do you? Here is the code from that ExtenderClient that (I think) is the same that is in the web UI. As far as I can tell the problem is with RC_WRAPPER and how it interprets the return code. Code:
class ExtenderClient {
static private final String RC_WRAPPER = '#@'
static private final String USER = 'root'
static private final Pattern RC_REGEX = Pattern.compile("${Pattern.quote(RC_WRAPPER)}\\d+${Pattern.quote(RC_WRAPPER)}")
private TelnetClient clnt
private InputStream input
private OutputStream output
/**
* Host/IP of extender device
*/
final String host
/**
* Constructor
* @param host The hostname/IP address of the extender device to connect to
* @throws IOException in case of any failure connecting to the device
*/
ExtenderClient(String host) throws IOException {
this.host = host
clnt = new TelnetClient()
clnt.connect(this.host)
input = clnt.getInputStream()
output = clnt.getOutputStream()
readFromServer()
writeToServer(USER)
}
/**
* <p>Execute a command on the device</p>
* @param cmd The command line to be executed on the device; multiple commands are supported; backgrounding processes is NOT supported
* @return The return code of the command line execution
* @throws IOException In case of any network error communicating with the device or if the return code cannot be determined from the output
*/
int executeCommand(String cmd) throws IOException {
readFromServer()
def fullCmd = "$cmd; echo \"${RC_WRAPPER}\$?${RC_WRAPPER}\""
writeToServer(fullCmd)
def data = readFromServer()
for(def line : data.split('\r\n'))
if(line ==~ RC_REGEX)
return line.substring(RC_WRAPPER.length(), line.length() - RC_WRAPPER.length()).toInteger()
throw new IOException('Failed to find RC status in output!')
}
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
|
#4
|
|||
|
|||
|
Bump
Can some other folks running unRAID and Extenders please give this a try? Thanks.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
|
#5
|
|||
|
|||
|
It does the same thing here. Although the extender does turn off.
__________________
Home Network: https://karylstein.com/technology.html |
|
#6
|
|||
|
|||
|
Thanks Karyl - so it does like like this is a bug that only affects unRAID users. The command is properly sent by the telnet script but the parsing off the response causes the Java I/O error.
So it appears that there may be something unique to the SageTV web server running in a docker, or at least in Linux, that is causing this problem. Is it possible that the problem is an incompatibility with the Regex Pattern Class? Maybe you can't use the Pattern.compile command in a docker?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server Last edited by wayner; 01-09-2018 at 10:19 PM. |
|
#7
|
||||
|
||||
|
This is just java... and so there is no difference in running it in docker vs not in docker. Now that being said, in the cases where it is working, are you using the same Java version? Docker also manages the network differently, and Docker uses linux container, and I've seen many times when scripting telnet, it can be different depending on the "host" machine. (ie, some hosts will set a TERM environment variable, and depending on the value of TERM it can affect how the telnet server respsonds.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
|
#8
|
|||
|
|||
|
In my tests I was running Sage 9 on Java 8 to the same extender. Using the web UI on a Windows server to turn off the extender didn't give an error message.
Doing the exact same task on the web UI for my unRAID server on the exact same extender does give an error message. But the task actually does complete - the extender turns off so the "killall miniclient" command does execute. The only thing that changed is the OS for my SageTV server - it is also possible that the SageTV versions are slightly different as my Windows SageTV server is probably running a slightly older version - I am assuming that my docker gets upgraded to the latest version (if there is one) when the docker restarts every Monday morning after the /appdata/ partition of my unRAID server is backed up. If is also possible that the Java may be a different point release. Does the Java version in the docker get updated or is it fixed on the Java version used when the docker was created? edit - just to clarify - Java 8 is on both servers as well.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Issues for Folks Running 480i | Diego Garcia | SageTV Media Extender | 9 | 10-08-2010 02:09 PM |
| What other Themes are folks using for Sage? | sdsean | SageTV Customizations | 8 | 09-22-2009 07:51 PM |
| For you Apple Folks.. The MacBook Wheel | SprDtyF350 | The SageTV Community | 1 | 01-19-2009 11:03 PM |
| Intersting article for folks looking to buy a video card for use with Sage | mikesm | Hardware Support | 2 | 10-26-2007 03:31 PM |
| Any SageClient folks have device driver issues? | IVB | SageTV Software | 2 | 12-18-2003 10:38 AM |