Mailing List Archive

1 2 3  View All
Re: Remotely monitor Backend is running [ In reply to ]
Hi Bill!

> The list of files in the libmyth-python package is here and it looks OK. Assuming you're on Bionic
>
> https://packages.ubuntu.com/bionic/all/libmyth-python/filelist
>
> I can't explain why they're not being loaded.

And now with Stephen pointing out in my output error it is using version
0.29 my eyes bullseyed-focused on the listing “/usr/lib/python2.7/dist-packages/MythTV-0.28._1.egg-info“ – the third file listed but “first one” when comes to visual (by line
length). “Even worse” is the package list is 0.28!

Will do the repository update and report back. ...(See my message to
Stephen – getting closer!)

Barry
Re: Remotely monitor Backend is running [ In reply to ]
Hi Stephen!

>> libmyth-python is already the newest version
>> (2:29.1+fixes.20180414.329c235-0ubuntu3).
> This will be the problem, I think. It is libmyth-python 0.29.1, not
> v30. So you will need to install the MythTV v30 repository and
> update:
>
> sudo add-apt-repository ppa:mythbuntu/30
> sudo apt update
> sudo apt full-upgrade


“Funny” how that version 0.29 got overlooked! ..OK, did the correction,
rerun python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' …. Well, seems better:

barry@NZXT:~$ python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py'
Unable to get BackendStatusPort settings from MythTV database, using
defaults
barry@NZXT:~$

Try changing HOST= ‘localhost’ to using the IP address of the Backend….
same error.

And thanks for the detailed instructions on ssh (your next message).
Have some familiarity, mainly with Raspberry Pi’s, but your details with
copying the keys and restarting just modules is something I’ve bumbled
around with. Will do that later today.

Barry
Re: Remotely monitor Backend is running [ In reply to ]
On Fri, 15 Oct 2021 10:13:30 -0500, you wrote:

>Hi Stephen!
>
>>> libmyth-python is already the newest version
>>> (2:29.1+fixes.20180414.329c235-0ubuntu3).
>> This will be the problem, I think. It is libmyth-python 0.29.1, not
>> v30. So you will need to install the MythTV v30 repository and
>> update:
>>
>> sudo add-apt-repository ppa:mythbuntu/30
>> sudo apt update
>> sudo apt full-upgrade
>
>
>?Funny? how that version 0.29 got overlooked! ..OK, did the correction,
>rerun python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py' ?. Well, seems better:
>
>barry@NZXT:~$ python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py'
>Unable to get BackendStatusPort settings from MythTV database, using
>defaults
>barry@NZXT:~$

That message means that you did not use the -n option to tell it which
PC to talk to, so it tried to find a database on the local PC to get
the address and port number from. As there is no local database, it
was unable to connect to it and gives you that message. Getting that
message means that you have all the required Python modules, so that
is good news.

>Try changing HOST= ?localhost? to using the IP address of the Backend?.
>same error.

I am not sure what you did there - what you need to do is use -n <IP
address> on the command line.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Remotely monitor Backend is running [ In reply to ]
Hi Stephen!

> That message means that you did not use the -n option to tell it which
> PC to talk to, so it tried to find a database on the local PC to get
> the address and port number from. As there is no local database, it
> was unable to connect to it and gives you that message. Getting that
> message means that you have all the required Python modules, so that
> is good news.
>
>> Try changing HOST= ?localhost? to using the IP address of the Backend?.
>> same error.
> I am not sure what you did there - what you need to do is use -n <IP
> address> on the command line.


Last part first: within the python script I had changed


HOST = 'localhost'

PORT = 6544


to


HOST = ‘192.168.4.3’

PORT = 6544


The IP address being that of the Backend.



Back to the first section, adding the -n switch…


From your Python script:

parser.add_argument('-n', '--host', action='store', help='MythTV backend
hostname or IP address (default: '+host+')')


Well, that’s where the -n comes from (my ‘cookbook’ learning and
patching together isn’t the best way!)


python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' -n 192.168.4.3

Unable to get BackendStatusPort settings from MythTV database, using
defaults



python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py -n 192.168.4.3'

python: can't open file '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py -n 192.168.4.3': [Errno 2] No
such file or directory



python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' -n --host 192.168.4.3

Unable to get BackendStatusPort settings from MythTV database, using
defaults

usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]

test-mythbackend_v1_3-101421.py: error: argument -n/--host: expected one
argument



python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' -n --host '192.168.4.3'

Unable to get BackendStatusPort settings from MythTV database, using
defaults

usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]

test-mythbackend_v1_3-101421.py: error: argument -n/--host: expected one
argument



python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' -n 192.168.4.3

Unable to get BackendStatusPort settings from MythTV database, using
defaults


- - -


python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' -h

Unable to get BackendStatusPort settings from MythTV database, using
defaults

usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]


Test that mythbackend is running and responding to API calls (Version: 1.3)


optional arguments:

-h, --help show this help message and exit

-V, --version

display the version number and exit

-n HOST, --host HOST

MythTV backend hostname or IP address (default: localhost)

-p PORT, --port PORT

MythTV backend API port number (default: 6544)



python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' -V

Unable to get BackendStatusPort settings from MythTV database, using
defaults

Version 1.3



It seems like from Terminal I’m not passing the host’s IP address on to
the Python script.


For ‘fun’ cd’d to the subdirectory so I’m working where the Python
script is – same error.


OK, now you get to tell me what simple little thing I’m overlooking! And
just for more fun checked:


barry@NZXT:~/MythTV Backend Scripts$ ping -c2 192.168.4.3

PING 192.168.4.3 (192.168.4.3) 56(84) bytes of data.

64 bytes from 192.168.4.3: icmp_seq=1 ttl=64 time=0.206 ms

64 bytes from 192.168.4.3: icmp_seq=2 ttl=64 time=0.150 ms


--- 192.168.4.3 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1005ms

rtt min/avg/max/mdev = 0.150/0.178/0.206/0.028 ms

barry@NZXT:~/MythTV Backend Scripts$ ping -c2 192.168.4.3 -p 6544

PATTERN: 0x6544

PING 192.168.4.3 (192.168.4.3) 56(84) bytes of data.

64 bytes from 192.168.4.3: icmp_seq=1 ttl=64 time=0.184 ms

64 bytes from 192.168.4.3: icmp_seq=2 ttl=64 time=0.193 ms


--- 192.168.4.3 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1007ms

rtt min/avg/max/mdev = 0.184/0.188/0.193/0.014 ms


Thanks!

Barry
Re: Remotely monitor Backend is running [ In reply to ]
On 10/16/21 10:13 AM, Barry Martin wrote:
>
> Hi Stephen!
>
>> That message means that you did not use the -n option to tell it which
>> PC to talk to, so it tried to find a database on the local PC to get
>> the address and port number from. As there is no local database, it
>> was unable to connect to it and gives you that message. Getting that
>> message means that you have all the required Python modules, so that
>> is good news.
>>
>>> Try changing HOST= ?localhost? to using the IP address of the Backend?.
>>> same error.
>> I am not sure what you did there - what you need to do is use -n <IP
>> address> on the command line.
>
>
> Last part first: within the python script I had changed
>
>
> HOST = 'localhost'
>
> PORT = 6544
>
>
> to
>
>
> HOST = ‘192.168.4.3’
>
> PORT = 6544
>
>
> The IP address being that of the Backend.
>
>
>
> Back to the first section, adding the -n switch…
>
>
> From your Python script:
>
> parser.add_argument('-n', '--host', action='store', help='MythTV backend hostname or IP address (default: '+host+')')
>
>
> Well, that’s where the -n comes from (my ‘cookbook’ learning and patching together isn’t the best way!)
>
>
> python '/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py' -n 192.168.4.3
>
> Unable to get BackendStatusPort settings from MythTV database, using defaults
>
>
>
> python '/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py -n 192.168.4.3'
>
> python: can't open file '/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py -n 192.168.4.3': [Errno 2] No such file or directory
>
>
>
> python '/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py' -n --host 192.168.4.3
>
> Unable to get BackendStatusPort settings from MythTV database, using defaults
>
> usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]
>
> test-mythbackend_v1_3-101421.py: error: argument -n/--host: expected one argument
>
>
>
> python '/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py' -n --host '192.168.4.3'
>
> Unable to get BackendStatusPort settings from MythTV database, using defaults
>
> usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]
>
> test-mythbackend_v1_3-101421.py: error: argument -n/--host: expected one argument
>
>
>
> python '/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py' -n 192.168.4.3
>
> Unable to get BackendStatusPort settings from MythTV database, using defaults
>
>
> - - -
>
>
> python '/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py' -h
>
> Unable to get BackendStatusPort settings from MythTV database, using defaults
>
> usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]
>
>
> Test that mythbackend is running and responding to API calls (Version: 1.3)
>
>
> optional arguments:
>
> -h, --help show this help message and exit
>
> -V, --version
>
> display the version number and exit
>
> -n HOST, --host HOST
>
> MythTV backend hostname or IP address (default: localhost)
>
> -p PORT, --port PORT
>
> MythTV backend API port number (default: 6544)
>
>
>
> python '/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py' -V
>
> Unable to get BackendStatusPort settings from MythTV database, using defaults
>
> Version 1.3
>
>
>
> It seems like from Terminal I’m not passing the host’s IP address on to the Python script.
>
>
> For ‘fun’ cd’d to the subdirectory so I’m working where the Python script is – same error.
>
>
> OK, now you get to tell me what simple little thing I’m overlooking! And just for more fun checked:
>
>
> barry@NZXT:~/MythTV Backend Scripts$ ping -c2 192.168.4.3
>
> PING 192.168.4.3 (192.168.4.3) 56(84) bytes of data.
>
> 64 bytes from 192.168.4.3: icmp_seq=1 ttl=64 time=0.206 ms
>
> 64 bytes from 192.168.4.3: icmp_seq=2 ttl=64 time=0.150 ms
>
>
> --- 192.168.4.3 ping statistics ---
>
> 2 packets transmitted, 2 received, 0% packet loss, time 1005ms
>
> rtt min/avg/max/mdev = 0.150/0.178/0.206/0.028 ms
>
> barry@NZXT:~/MythTV Backend Scripts$ ping -c2 192.168.4.3 -p 6544
>
> PATTERN: 0x6544
>
> PING 192.168.4.3 (192.168.4.3) 56(84) bytes of data.
>
> 64 bytes from 192.168.4.3: icmp_seq=1 ttl=64 time=0.184 ms
>
> 64 bytes from 192.168.4.3: icmp_seq=2 ttl=64 time=0.193 ms
>
>
> --- 192.168.4.3 ping statistics ---
>
> 2 packets transmitted, 2 received, 0% packet loss, time 1007ms
>
> rtt min/avg/max/mdev = 0.184/0.188/0.193/0.014 ms
>

Make sure there's a ~/.mythtv/config.xml file on this host. Python
bindings need this too. The contents look like any other remote
mythfrontend's would.

Even better than ping: nmap -p 3306,6544 --reason 192.168.4.3

Expect to see:

PORT STATE SERVICE REASON
3306/tcp open mysql syn-ack
6544/tcp open mythtv syn-ack

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Remotely monitor Backend is running [ In reply to ]
On Sat, 16 Oct 2021 10:13:04 -0500, you wrote:

>
>Hi Stephen!
>
>> That message means that you did not use the -n option to tell it which
>> PC to talk to, so it tried to find a database on the local PC to get
>> the address and port number from. As there is no local database, it
>> was unable to connect to it and gives you that message. Getting that
>> message means that you have all the required Python modules, so that
>> is good news.
>>
>>> Try changing HOST= ?localhost? to using the IP address of the Backend?.
>>> same error.
>> I am not sure what you did there - what you need to do is use -n <IP
>> address> on the command line.
>
>
>Last part first: within the python script I had changed
>
>
>HOST = 'localhost'
>
>PORT = 6544
>
>
>to
>
>
>HOST = ?192.168.4.3?
>
>PORT = 6544
>
>
>The IP address being that of the Backend.
>
>
>
>Back to the first section, adding the -n switch?
>
>
> From your Python script:
>
>parser.add_argument('-n', '--host', action='store', help='MythTV backend
>hostname or IP address (default: '+host+')')
>
>
>Well, that?s where the -n comes from (my ?cookbook? learning and
>patching together isn?t the best way!)
>
>
>python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py' -n 192.168.4.3
>
>Unable to get BackendStatusPort settings from MythTV database, using
>defaults
>
>
>
>python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py -n 192.168.4.3'
>
>python: can't open file '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py -n 192.168.4.3': [Errno 2] No
>such file or directory
>
>
>
>python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py' -n --host 192.168.4.3
>
>Unable to get BackendStatusPort settings from MythTV database, using
>defaults
>
>usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]
>
>test-mythbackend_v1_3-101421.py: error: argument -n/--host: expected one
>argument
>
>
>
>python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py' -n --host '192.168.4.3'
>
>Unable to get BackendStatusPort settings from MythTV database, using
>defaults
>
>usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]
>
>test-mythbackend_v1_3-101421.py: error: argument -n/--host: expected one
>argument
>
>
>
>python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py' -n 192.168.4.3
>
>Unable to get BackendStatusPort settings from MythTV database, using
>defaults
>
>
>- - -
>
>
>python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py' -h
>
>Unable to get BackendStatusPort settings from MythTV database, using
>defaults
>
>usage: test-mythbackend_v1_3-101421.py [-h] [-V] [-n HOST] [-p PORT]
>
>
>Test that mythbackend is running and responding to API calls (Version: 1.3)
>
>
>optional arguments:
>
>-h, --help show this help message and exit
>
>-V, --version
>
>display the version number and exit
>
>-n HOST, --host HOST
>
>MythTV backend hostname or IP address (default: localhost)
>
>-p PORT, --port PORT
>
>MythTV backend API port number (default: 6544)
>
>
>
>python '/home/barry/MythTV Backend
>Scripts/test-mythbackend_v1_3-101421.py' -V
>
>Unable to get BackendStatusPort settings from MythTV database, using
>defaults
>
>Version 1.3
>
>
>
>It seems like from Terminal I?m not passing the host?s IP address on to
>the Python script.
>
>
>For ?fun? cd?d to the subdirectory so I?m working where the Python
>script is ? same error.
>
>
>OK, now you get to tell me what simple little thing I?m overlooking! And
>just for more fun checked:
>
>
>barry@NZXT:~/MythTV Backend Scripts$ ping -c2 192.168.4.3
>
>PING 192.168.4.3 (192.168.4.3) 56(84) bytes of data.
>
>64 bytes from 192.168.4.3: icmp_seq=1 ttl=64 time=0.206 ms
>
>64 bytes from 192.168.4.3: icmp_seq=2 ttl=64 time=0.150 ms
>
>
>--- 192.168.4.3 ping statistics ---
>
>2 packets transmitted, 2 received, 0% packet loss, time 1005ms
>
>rtt min/avg/max/mdev = 0.150/0.178/0.206/0.028 ms
>
>barry@NZXT:~/MythTV Backend Scripts$ ping -c2 192.168.4.3 -p 6544
>
>PATTERN: 0x6544
>
>PING 192.168.4.3 (192.168.4.3) 56(84) bytes of data.
>
>64 bytes from 192.168.4.3: icmp_seq=1 ttl=64 time=0.184 ms
>
>64 bytes from 192.168.4.3: icmp_seq=2 ttl=64 time=0.193 ms
>
>
>--- 192.168.4.3 ping statistics ---
>
>2 packets transmitted, 2 received, 0% packet loss, time 1007ms
>
>rtt min/avg/max/mdev = 0.184/0.188/0.193/0.014 ms
>
>
>Thanks!
>
>Barry

It look like the problems you are having are due to the way you are
running test-mythbackend.py. The easy way to run it is to execute it
directly as a command:

test-mythbackend.py <options>

This does require that test-mythbackend.py has been given the
executable option when you downloaded it:

chmod a+x test-mythbackend.py

If you run it as an argument from a python command, then you need to
use different syntax in order to pass options to test-mythbackend.py
instead of to python. The -c option of the python command tells
python that it is to stop looking for any further options on its
command line and instead run the command directly after the -c option
and pass the rest of the python command line options to the program it
is running via -c. So instead of:

python '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' -n 192.168.4.3

it should be:

python -c '/home/barry/MythTV Backend
Scripts/test-mythbackend_v1_3-101421.py' -n 192.168.4.3

or preferably:

/home/barry/MythTV\ Backend\ Scripts/test-mythbackend_v1_3-101421.py
-n 192.168.4.3

or

"/home/barry/MythTV Backend Scripts/test-mythbackend_v1_3-101421.py"
-n 192.168.4.3

I have also put v1.4 on my web server. This makes it only try to
access the database if neither -n or -p is used on the command line.
So it will not waste time trying to access a non-existent local
database when you are using -n to tell it to talk to a different PC.
And I have also eliminated the use of text message output except for
install problems - it will now just return a result code without any
warning text messages.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Remotely monitor Backend is running [ In reply to ]
Barry a friendly word :) Are you using digest mode to get your emails or
individual emails?


You're probably not aware but for some reason each time you reply to an
email it is creating a new thread in many email browsers like
Thunderbird so for this discussion there are something like 8 or more
threads all started by you all with the title "Re: [mythtv-users]
Remotely monitor Backend is running".


One or two replies to digest emails is fine but for big discussions it's
best to turn individual emails on and make sure you reply to the correct
email so you don't break the threading.


Thanks

Paul H.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org

1 2 3  View All