MacPorts Install problem

For discussion of topics specific to MythTV on OSX
BradleyinDC
Junior
Posts: 34
Joined: Fri Sep 16, 2022 6:31 pm
United States of America

Re: MacPorts Install problem

Post by BradleyinDC »

pvr4me wrote:
Tue Sep 20, 2022 2:48 pm
Does the error log show anything different?
Sorry, forgot that, this was just the response to shutting down and leaving it off overnight part of the previous suggestion

That was the whole dialog though.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MacPorts Install problem

Post by pvr4me »

BradleyinDC wrote:
Tue Sep 20, 2022 4:53 pm
pvr4me wrote:
Tue Sep 20, 2022 2:48 pm
Does the error log show anything different?
Sorry, forgot that, this was just the response to shutting down and leaving it off overnight part of the previous suggestion

That was the whole dialog though.
I meant for you to rerun the following command:

Code: Select all

sudo tail -n 50 /opt/dvr/var/db/mariadb/localhost.err
Craig
Formerly the MacPorts guy.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MacPorts Install problem

Post by pvr4me »

BTW, if you decide to abandon the project or even put it aside for a period of time, you ought to run the following command.

Code: Select all

sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mariadb-server.plist
This instructs the Mac operating system to stop trying to run the database server software. If you don't do this, the OS will try to run the database software every 5 minutes (288 times per day). Since the database aborts each time it tries to start, this will cause the error log to grow endlessly. It would still take months or years for this to actually use enough space to cause a problem, but why wait?

Note that you _won't_ get a message if the command succeeds. You will get an error message if it is unsuccessful.

FWIW,

Craig
Formerly the MacPorts guy.
User avatar
jhoyt
Senior
Posts: 143
Joined: Thu Aug 27, 2015 10:11 am
United States of America

Re: MacPorts Install problem

Post by jhoyt »

pvr4me wrote:
Tue Sep 20, 2022 2:48 pm
Hey unix gurus! How do we test that user "_mysql" has appropriate privileges for '/opt/dvr/var/db/mariadb/aria_log_control' ??
Craig, these should do the trick:

Code: Select all

if sudo -u "_mysql" test -w '/opt/dvr/var/db/mariadb/aria_log_control'; then echo "writable";else echo "not-writable";fi
if sudo -u "_mysql" test -r '/opt/dvr/var/db/mariadb/aria_log_control'; then echo "readable";else echo "not-readable";fi
User avatar
jhoyt
Senior
Posts: 143
Joined: Thu Aug 27, 2015 10:11 am
United States of America

Re: MacPorts Install problem

Post by jhoyt »

Also - it might be worth going into Preference -> Security & Privacy first to check the "General" tab to see if security is blocking mysqld.

It's also worth checking the firewall settings to see if a connection needs to be added (or approved) for mysqld. An easy check of the firewall theory would be to temporarily disable the firewall, startup mysqld, and see if anything improves. BUT - make sure to turn your firewall back on after testing...

Finally, you may need to go into the Privacy tab and give mysqld access to the filesystem.
BradleyinDC
Junior
Posts: 34
Joined: Fri Sep 16, 2022 6:31 pm
United States of America

Re: MacPorts Install problem

Post by BradleyinDC »

pvr4me wrote:
Tue Sep 20, 2022 5:20 pm

I meant for you to rerun the following command:

Code: Select all

sudo tail -n 50 /opt/dvr/var/db/mariadb/localhost.err
Craig
Last login: Tue Sep 20 10:01:08 on ttys000
jbradleyjansen@MacBook-Pro-BigSur ~ % sudo tail -n 50 /opt/dvr/var/db/mariadb/localhost.err
Password:

220919 9:18:55 [Note] /opt/dvr/lib/mariadb/bin/mysqld: Shutdown complete

220920 1:37:58 [Note] /opt/dvr/lib/mariadb/bin/mysqld: Normal shutdown

220920 1:37:58 [Note] Event Scheduler: Purging the queue. 0 events
220920 1:37:58 InnoDB: Starting shutdown...
220920 1:37:59 InnoDB: Shutdown completed; log sequence number 1597945
220920 1:37:59 [Note] /opt/dvr/lib/mariadb/bin/mysqld: Shutdown complete

220920 1:39:03 InnoDB: The InnoDB memory heap is disabled
220920 1:39:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins
220920 1:39:03 InnoDB: Compressed tables use zlib 1.2.10
220920 1:39:03 InnoDB: Initializing buffer pool, size = 128.0M
220920 1:39:03 InnoDB: Completed initialization of buffer pool
220920 1:39:03 InnoDB: highest supported file format is Barracuda.
220920 1:39:03 InnoDB: Waiting for the background threads to start
220920 1:39:04 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 1597945
220920 1:39:04 [Note] Server socket created on IP: '::'.
220920 1:39:04 [Note] Event Scheduler: Loaded 0 events
220920 1:39:04 [Note] /opt/dvr/lib/mariadb/bin/mysqld: ready for connections.
Version: '5.5.52-MariaDB' socket: '/opt/dvr/var/run/mariadb/mysqld.sock' port: 3306 Source distribution
220920 1:39:34 [Note] /opt/dvr/lib/mariadb/bin/mysqld: Normal shutdown

220920 1:39:34 [Note] Event Scheduler: Purging the queue. 0 events
220920 1:39:34 InnoDB: Starting shutdown...
220920 1:39:34 InnoDB: Shutdown completed; log sequence number 1597945
220920 1:39:34 [Note] /opt/dvr/lib/mariadb/bin/mysqld: Shutdown complete

220920 6:31:49 InnoDB: The InnoDB memory heap is disabled
220920 6:31:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
220920 6:31:49 InnoDB: Compressed tables use zlib 1.2.10
220920 6:31:49 InnoDB: Initializing buffer pool, size = 128.0M
220920 6:31:49 InnoDB: Completed initialization of buffer pool
220920 6:31:49 InnoDB: highest supported file format is Barracuda.
220920 6:31:49 InnoDB: Waiting for the background threads to start
220920 6:31:50 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 1597945
220920 6:31:50 [Note] Server socket created on IP: '::'.
220920 6:31:50 [Note] Event Scheduler: Loaded 0 events
220920 6:31:50 [Note] /opt/dvr/lib/mariadb/bin/mysqld: ready for connections.
Version: '5.5.52-MariaDB' socket: '/opt/dvr/var/run/mariadb/mysqld.sock' port: 3306 Source distribution
220920 10:01:14 [ERROR] mysqld: Can't lock aria control file '/opt/dvr/var/db/mariadb/aria_log_control' for exclusive use, error: 35. Will retry for 30 seconds
220920 10:01:45 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/opt/dvr/var/db/mariadb/aria_log_control'
220920 10:01:45 [ERROR] Plugin 'Aria' init function returned error.
220920 10:01:45 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
ERROR: 1017 Can't find file: '/var/tmp/#sql14ccf_1_3' (errno: 2)
220920 10:01:45 [ERROR] Aborting

220920 10:01:46 [Note] /opt/dvr/lib/mariadb/bin/mysqld: Shutdown complete

jbradleyjansen@MacBook-Pro-BigSur ~ %
BradleyinDC
Junior
Posts: 34
Joined: Fri Sep 16, 2022 6:31 pm
United States of America

Re: MacPorts Install problem

Post by BradleyinDC »

jhoyt wrote:
Tue Sep 20, 2022 11:34 pm
Also - it might be worth going into Preference -> Security & Privacy first to check the "General" tab to see if security is blocking mysqld.

It's also worth checking the firewall settings to see if a connection needs to be added (or approved) for mysqld. An easy check of the firewall theory would be to temporarily disable the firewall, startup mysqld, and see if anything improves. BUT - make sure to turn your firewall back on after testing...

Finally, you may need to go into the Privacy tab and give mysqld access to the filesystem.
no issues with either of those
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MacPorts Install problem

Post by pvr4me »

Code: Select all

220920 6:31:49 InnoDB: The InnoDB memory heap is disabled
220920 6:31:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
220920 6:31:49 InnoDB: Compressed tables use zlib 1.2.10
220920 6:31:49 InnoDB: Initializing buffer pool, size = 128.0M
220920 6:31:49 InnoDB: Completed initialization of buffer pool
220920 6:31:49 InnoDB: highest supported file format is Barracuda.
220920 6:31:49 InnoDB: Waiting for the background threads to start
220920 6:31:50 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 1597945
220920 6:31:50 [Note] Server socket created on IP: '::'.
220920 6:31:50 [Note] Event Scheduler: Loaded 0 events
220920 6:31:50 [Note] /opt/dvr/lib/mariadb/bin/mysqld: ready for connections.
Version: '5.5.52-MariaDB' socket: '/opt/dvr/var/run/mariadb/mysqld.sock' port: 3306 Source distribution
220920 10:01:14 [ERROR] mysqld: Can't lock aria control file '/opt/dvr/var/db/mariadb/aria_log_control' for exclusive use, error: 35. Will retry for 30 seconds
220920 10:01:45 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/opt/dvr/var/db/mariadb/aria_log_control'
220920 10:01:45 [ERROR] Plugin 'Aria' init function returned error.
220920 10:01:45 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
ERROR: 1017 Can't find file: '/var/tmp/#sql14ccf_1_3' (errno: 2)
220920 10:01:45 [ERROR] Aborting

220920 10:01:46 [Note] /opt/dvr/lib/mariadb/bin/mysqld: Shutdown complete
As I read it, yesterday between 6:31 and 10:01, the database software was running normally ("mysqld: ready for connections"). Did you do something at 10:01?

Craig
Formerly the MacPorts guy.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MacPorts Install problem

Post by pvr4me »

jhoyt wrote:
Tue Sep 20, 2022 10:49 pm
pvr4me wrote:
Tue Sep 20, 2022 2:48 pm
Hey unix gurus! How do we test that user "_mysql" has appropriate privileges for '/opt/dvr/var/db/mariadb/aria_log_control' ??
Craig, these should do the trick:

Code: Select all

if sudo -u "_mysql" test -w '/opt/dvr/var/db/mariadb/aria_log_control'; then echo "writable";else echo "not-writable";fi
if sudo -u "_mysql" test -r '/opt/dvr/var/db/mariadb/aria_log_control'; then echo "readable";else echo "not-readable";fi
@bradleyindc you should run these commands in Terminal and let us know the results.

Craig
Formerly the MacPorts guy.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MacPorts Install problem

Post by pvr4me »

BTW, when using Activity Monitor to check for mysqld, you may have to change a setting. In the View menu for that application, make sure that "All processes" is checked rather than "My processes".

Another way to check if mysqld is running is the following command in Terminal:

Code: Select all

sudo ps -Ax |grep my
Craig
Formerly the MacPorts guy.
BradleyinDC
Junior
Posts: 34
Joined: Fri Sep 16, 2022 6:31 pm
United States of America

Re: MacPorts Install problem

Post by BradleyinDC »

pvr4me wrote:
Wed Sep 21, 2022 12:08 pm

As I read it, yesterday between 6:31 and 10:01, the database software was running normally ("mysqld: ready for connections"). Did you do something at 10:01?

Craig
That may have been when I shut down the computer.
BradleyinDC
Junior
Posts: 34
Joined: Fri Sep 16, 2022 6:31 pm
United States of America

Re: MacPorts Install problem

Post by BradleyinDC »

pvr4me wrote:
Wed Sep 21, 2022 12:10 pm
jhoyt wrote:
Tue Sep 20, 2022 10:49 pm
pvr4me wrote:
Tue Sep 20, 2022 2:48 pm
Hey unix gurus! How do we test that user "_mysql" has appropriate privileges for '/opt/dvr/var/db/mariadb/aria_log_control' ??
Craig, these should do the trick:

Code: Select all

if sudo -u "_mysql" test -w '/opt/dvr/var/db/mariadb/aria_log_control'; then echo "writable";else echo "not-writable";fi
if sudo -u "_mysql" test -r '/opt/dvr/var/db/mariadb/aria_log_control'; then echo "readable";else echo "not-readable";fi
@bradleyindc you should run these commands in Terminal and let us know the results.

Craig
Restored session: Wed Sep 21 01:01:39 EDT 2022
jbradleyjansen@MacBook-Pro-BigSur ~ %
if sudo -u "_mysql" test -w '/opt/dvr/var/db/mariadb/aria_log_control'; then echo "writable";else echo "not-writable";fi
Password:
writable
jbradleyjansen@MacBook-Pro-BigSur ~ % if sudo -u "_mysql" test -r '/opt/dvr/var/db/mariadb/aria_log_control'; then echo "readable";else echo "not-readable";fi
readable
jbradleyjansen@MacBook-Pro-BigSur ~ %
BradleyinDC
Junior
Posts: 34
Joined: Fri Sep 16, 2022 6:31 pm
United States of America

Re: MacPorts Install problem

Post by BradleyinDC »

pvr4me wrote:
Wed Sep 21, 2022 12:23 pm
BTW, when using Activity Monitor to check for mysqld, you may have to change a setting. In the View menu for that application, make sure that "All processes" is checked rather than "My processes".

Another way to check if mysqld is running is the following command in Terminal:

Code: Select all

sudo ps -Ax |grep my
Craig
Activity Monitory was showing "My processes" but when switched to "All processes" still nothing (from the search bar).

From Terminal
jbradleyjansen@MacBook-Pro-BigSur ~ % sudo ps -Ax |grep my
94 ?? 0:00.93 /opt/dvr/lib/mariadb/bin/mysqld
196 ?? 0:00.25 /usr/libexec/findmydeviced
1109 ?? 0:00.10 /usr/libexec/findmydevice-user-agent
17564 ttys000 0:00.00 grep my
jbradleyjansen@MacBook-Pro-BigSur ~ %
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MacPorts Install problem

Post by pvr4me »

Well, there you go -- mysqld IS running. Now we just have to finish the configuration. Try this command:

Code: Select all

mysql -u root < /opt/dvr/share/mythtv/database/mythconverg_init.sql
It has been a while and I can't recall if there is any output from this or not. No output for sure means it worked. If that is the case, you can try the next command:

Code: Select all

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
You will get a series of warning messages. These are no cause for alarm unless your specific time zone fails to process.

If those both work, you should be able to carry on with mythtv-setup.

Craig
Formerly the MacPorts guy.
BradleyinDC
Junior
Posts: 34
Joined: Fri Sep 16, 2022 6:31 pm
United States of America

Re: MacPorts Install problem

Post by BradleyinDC »

pvr4me wrote:
Wed Sep 21, 2022 3:41 pm
Well, there you go -- mysqld IS running. Now we just have to finish the configuration. Try this command:

Code: Select all

mysql -u root < /opt/dvr/share/mythtv/database/mythconverg_init.sql
It has been a while and I can't recall if there is any output from this or not. No output for sure means it worked. If that is the case, you can try the next command:

Code: Select all

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
You will get a series of warning messages. These are no cause for alarm unless your specific time zone fails to process.

If those both work, you should be able to carry on with mythtv-setup.

Craig
jbradleyjansen@MacBook-Pro-BigSur ~ % mysql -u root < /opt/dvr/share/mythtv/database/mythconverg_init.sql
zsh: command not found: mysql
jbradleyjansen@MacBook-Pro-BigSur ~ %



jbradleyjansen@MacBook-Pro-BigSur ~ % jbradleyjansen@MacBook-Pro-BigSur ~ % mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
zsh: command not found: mysql_tzinfo_to_sql
zsh: command not found: mysql
jbradleyjansen@MacBook-Pro-BigSur ~ %
Post Reply