Manjaro 18.10 [CQRLOG 2.3.0 + mariadb 15.1]

15 posts / 0 new
Last post
W3JDG
Manjaro 18.10 [CQRLOG 2.3.0 + mariadb 15.1]

Hello,

I just switched from Ubuntu to Manjaro 18.10 (XFCE). I installed and configured MariaDB first, and then I installed the package cqrlog-bin (https://aur.archlinux.org/packages/cqrlog-bin/) from AUR.

The installation goes well, but when I run CQRLOG for the first time I get this error:

" TMySQL57Connection : Error executing query: Cannot add or update a child row: a foreign key constraint fails (`cqrlog001`.`upload_status`, CONSTRAINT `upload_status_ibfk_1` FOREIGN KEY (`id_log_changes`) REFERENCES `log_changes` (`id`) ON DELETE SET NULL). "

Subsequent attempts to run CQRLOG with --debug=1 enabled, show an error when trying to connect to the database using mariadb: " TMySQL56Connection : Server connect failed. "

Also, when trying to open the log (which failed to be created in the first place), the following error is shown: ' "" is an invalid integer. '.

Here's a dump from the last lines in the mysql.err file:

2019-10-14 0:41:22 0 [Note] InnoDB: Using Linux native AIO
2019-10-14 0:41:22 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-10-14 0:41:22 0 [Note] InnoDB: Uses event mutexes
2019-10-14 0:41:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-10-14 0:41:22 0 [Note] InnoDB: Number of pools: 1
2019-10-14 0:41:22 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-10-14 0:41:22 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2019-10-14 0:41:22 0 [Note] InnoDB: Initializing buffer pool, total size = 80M, instances = 1, chunk size = 80M
2019-10-14 0:41:22 0 [Note] InnoDB: Completed initialization of buffer pool
2019-10-14 0:41:22 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-10-14 0:41:22 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-10-14 0:41:22 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-10-14 0:41:22 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-10-14 0:41:22 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-10-14 0:41:22 0 [Note] InnoDB: Waiting for purge to start
2019-10-14 0:41:22 0 [Note] InnoDB: 10.4.8 started; log sequence number 460993; transaction id 393
2019-10-14 0:41:22 0 [Note] InnoDB: Loading buffer pool(s) from /home/jad/.config/cqrlog/database/ib_buffer_pool
2019-10-14 0:41:22 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2019-10-14 0:41:22 0 [Note] Server socket created on IP: '::'.
2019-10-14 0:41:22 0 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
2019-10-14 0:41:22 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
2019-10-14 0:41:22 0 [Note] Reading of all Master_info entries succeeded
2019-10-14 0:41:22 0 [Note] Added new Master_info '' to hash table
2019-10-14 0:41:22 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.4.8-MariaDB' socket: '/home/jad/.config/cqrlog/database/sock' port: 64000 Arch Linux
2019-10-14 0:41:22 0 [Note] InnoDB: Buffer pool(s) load completed at 191014 0:41:22
2019-10-14 0:41:23 9 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
2019-10-14 0:44:27 9 [ERROR] Transaction not registered for MariaDB 2PC, but transaction is active
2019-10-14 0:44:27 9 [ERROR] Transaction not registered for MariaDB 2PC, but transaction is active
2019-10-14 0:45:24 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
2019-10-14 0:45:24 0 [Note] InnoDB: FTS optimize thread exiting.
2019-10-14 0:45:24 0 [Note] InnoDB: Starting shutdown...
2019-10-14 0:45:24 0 [Note] InnoDB: Dumping buffer pool(s) to /home/jad/.config/cqrlog/database/ib_buffer_pool
2019-10-14 0:45:24 0 [Note] InnoDB: Buffer pool(s) dump completed at 191014 0:45:24
2019-10-14 0:45:25 0 [Note] InnoDB: Shutdown completed; log sequence number 468422; transaction id 399
2019-10-14 0:45:25 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-10-14 0:45:25 0 [Note] /usr/sbin/mysqld: Shutdown complete

I hope this information is useful in helping me diagnose this error. As far as I understand the symptoms, I believe this might be just a matter of configuring the mariadb/mysql access.

Thanks in advance for any help you can provide me. I really look forward to continue using CQRLOG on my new system configuration.

73 de Jorge, W3JDG

oh1kh
Manjaro 18.10 [CQRLOG 2.3.0 + mariadb 15.1]

Hi Jorge!
Did you read this thread? https://www.cqrlog.com/node/2305

Looks a bit similar issue.

--
Saku
OH1KH

W3JDG
Hi Saku,

Hi Saku,

thanks for the reply. I have attempted the following proposed solution by hb9eko in the comments of https://www.cqrlog.com/comment/7491#comment-7491 :

1. Remove CQRLog installation with packet manager
2. Remove MariaDB installation with packet manager
3. Delete var/lib/mysql: sudo rm /var/lib/mysql (or rename it: sudo mv /var/lib/mysql /var/lib/mysql.old )
4. Re-install MariaDB with the packet manager
5. Initialise MariaDB with the following commands: (found here: https://manjaro.site/a-complete-guide-to-install-mariadb-server-on-manja... )
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation
6. Re-install CQRLog with the packet manager
7. Re-initialise database according to SQ6POC:
sudo cp -r /var/lib/mysql/mysql ~/.config/cqrlog/database
sudo chown -R ~/.config/cqrlog/database
cd ~/.config/cqrlog/ctyfiles && touch -t 1901101200 -m *
8. Start CQRLog and update DXCC/IOTA/QSL Managers
9. Restart CQRLog

However, once I perform the above steps, I see a log created (under "Log 001"), and when i try to open it I get a window with the following error:


"" is an invalid integer.

Press OK to ignore and risk data corruption.
Press Abort to kill the program.

As far as I've been able to understand, the Issue I'm experiencing has to do with my MariaDB installation, and also now that I'm at the 'bleeding edge' of Linux Distributions.

Please let me know if there's any more information I can provide you that could help debug this issue.

73 de W3JDG

oh1kh
"" is an invalid integer

Hi!

You did not state when this happens.
Can you start cqrlog from console with command:
cqrlog debug=1 > /tmp/debug.txt
And when it has stopped attach the debug.txt to your next message.

I guess that it happens at "database connect" after you have selected log 001 and pressed "Open"

You did clean the whole installation, but you did not clear the hidden folder that holds your settings and logs (at least that is not mentioned on your list).
If you do not have any qsos in log you could try to clear your log, too.

To do this open console and type:
rm -rf ~/.config/cqrlog

!! NOTE !! This really removes all logs and settings!

After that open cqrlog and let it create new log as it now thinks you have never used cqrlog before.

--
Saku
OH1KH

W3JDG
Manjaro 18.10 [CQRLOG 2.3.0 + mariadb 10.4.8]

Hello Saku,

thanks for the reply. I have cleared my log and removed ~/.config/cqrlog. Fortunately this was a fresh install and I have not imported my QSOs from my old system yet. So I don't mind removing any of the configs.

When initializing the program from scratch (after deleting the .config folder), I am presented with the error:

TMySQL57Connection : Error executing query: Cannot add or update a child row: a foreign key constraint fails (`cqrlog001`.`upload_status`, CONSTRAINT `upload_status_ibfk_1` FOREIGN KEY (`id_log_changes`) REFERENCES `log_changes` (`id`) ON DELETE SET NULL).

After this, I selected 'OK' (ignoring the error and risking data corruption), and were presented with the CQRLOG main window.

I am attaching the text file with the debug output that you asked for.

I believe this is definitely a mariadb problem, as when I attempt to log into mysqld using the command "mysqld -u root -p", I am presented with the following error:

019-10-20 15:04:29 0 [Note] mysqld (mysqld 10.4.8-MariaDB) starting as process 9908 ...
2019-10-20 15:04:29 0 [Warning] Can't create test file /home/mysql/MUTAKRAKISH.lower-test
mysqld: Can't change dir to '/home/mysql/' (Errcode: 13 "Permission denied")
2019-10-20 15:04:29 0 [ERROR] Aborting

I'm still scratching my head with this error, as I have configured everything according to the documentation I've found. So far I'm really enjoying Manjaro/Arch, but there's just some things I can't seem to get my head around!

Thanks again for your help with this matter.

Best,

Jorge
W3JDG

File: 

W3JDG
Correction

I realized I was using the command 'mysqld' instead of 'mysql'. The database seems to be working correctly, but something is still not right, as CQRLOG can't connect when it starts up.

oh1mrr
Maybe you have wrong order

Maybe you have wrong order here...
"sudo systemctl start mariadb
sudo systemctl enable mariadb"

Should be first "enable" then "start" ????

<p>Jarmo</p>

oh1kh
Manjaro 18.10 [CQRLOG 2.3.0 + mariadb 10.4.8]

Hi Jorge!

Your debug dump looks good. I did not see anything wrong at first look.
It is normal to get "cant connect" messages at cqrlog start. Depending of PC speed there may be one or several of those messages. If I remember right cqrlog will try 10 (or 8 ) times to connect before giving up.
This is because it is taking some time to get the mysql_safe thread running (start shown few lines earlier)


56 us states loaded
Grid map created
/usr/bin/mysqld
MySQLProcess.Executable: /usr/bin/mysqld_safe Parameters: --defaults-file=/home/saku/.config/cqrlog/database/mysql.cnf
--datadir=/home/saku/.config/cqrlog/database/
--socket=/home/saku/.config/cqrlog/database/sock
--port=64000


Trying to connect to database
191021 09:53:19 mysqld_safe Logging to '/home/saku/.config/cqrlog/database//mysql.err'.
191021 09:53:19 mysqld_safe Starting mysqld daemon with databases from /home/saku/.config/cqrlog/database/
TMySQL57Connection : Server connect failed.
Trying:1
select * from tables where table_schema = 'cqrlog_common'

Now when you have log 001 created how does the debug.txt look when you open cqrlog with log 001?
Your last attached dump was done when creating a new log.

--
Saku
OH1KH

W3JDG
Manjaro 18.10 [CQRLOG 2.3.0 + mariadb 10.4.8]

Hello Saku,

thanks for the thorough feedback. So, apparently the mysql installation is working then. That's reassuring :) I have opened CQRLOG and tried to open log001. Once I do, I am presented with the ' "" is an invalid integer.' error. Please find a debug dump attached to this comment.

Thanks for helping me with my installation.

Best,

Jorge
W3JDG

File: 

oh1kh
Manjaro 18.10 [CQRLOG 2.3.0 + mariadb 10.4.8]

Hi Jorge!

Looks like DXCC database has something wrong.
-----------
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF

TApplication.HandleException "" is an invalid integer
-----------

Open console and give command:
touch --date=2000-01-01 ~/.config/cqrlog/ctyfiles/*.*

Then start cqrlog. It should say that dxcc and qsl mgr are old, should we load new ones (2 questions). Answer YES to both.
After that, does cqrlog open normally ?

--
Saku
OH1KH

W3JDG
Manjaro 18.10 [CQRLOG 2.3.0 + mariadb 10.4.8]

Hi Saku,

I have performed your touch command, and when I open CQRLOG I am not presented with any other messages. I prompts me to select a log, I select log001 and when I try to open it I see the same window saying:

-----------------------------
"" is an invalid integer.

Press OK to ignore and risk data corruption.
Press Abort to kill the program.
----------------------------

I press OK, and nothing happens. I then close CQRLOG. Please find tattached the debug dump file.

Could it be that the DB is not created correctly? Some syntax differences between mysql and mariadb?

Thanks,

Jorge
W3JDG

File: 

oh1kh
HI!

HI!

Could you try this hb9eko fix again that you have listed in your message.
Except:

After point 1.
check that there is no forder /usr/share/cqrlog Remove if exist.
if you do not have any log data remove folder ~/.config/cqrlog
continue from point 2.

at point 7.
there is error: sudo chown -R ~/.config/cqrlog/database
it should be: sudo chown -R your_username.your_username ~/.config/cqrlog/database

your_username seems to be jad (?)

before point 8.
load beta 003 to folder /tmp from this link: https://cqrlog.com/files/beta/cqrlog_20190726_amd64.tar.gz
open console type :
cd /tmp
tar vxf cqrlog_20190726_amd64.tar.gz
sudo cp cqrlog-20190726/usr/bin/cqrlog /usr/bin

continue with point 8. you should see 2.3.0 (003) at splash screen

Does it work then?

--
Saku
OH1KH

oh1kh
HI!

HI!

Could you try this hb9eko fix again that you have listed in your message.
Except:

After point 1.
check that there is no forder /usr/share/cqrlog Remove if exist.
if you do not have any log data remove folder ~/.config/cqrlog
continue from point 2.

at point 7.
there is error: sudo chown -R ~/.config/cqrlog/database
it should be: sudo chown -R your_username.your_username ~/.config/cqrlog/database

your_username seems to be jad (?)

before point 8.
load beta 003 to folder /tmp from this link: https://cqrlog.com/files/beta/cqrlog_20190726_amd64.tar.gz
open console type :
cd /tmp
tar vxf cqrlog_20190726_amd64.tar.gz
sudo cp cqrlog-20190726/usr/bin/cqrlog /usr/bin

continue with point 8. you should see 2.3.0 (003) at splash screen

Does it work then?

--
Saku
OH1KH

oh1kh
Maybe you have wrong order

I think that does not matter here.
"sudo systemctl start mariadb" starts mariadb service if it is not running.

"sudo systemctl enable mariadb" puts mariadb to systemctl list as "allowed to run". This needs to be done just once.
If mariadb is not wanted to run "sudo systemctl disable mariadb " must be run once.

I think when "save data to local machine" is selected there is no need to run mysql server as system service at all. It must be installed so that cqrlog can start mysqld_safe thread that is a mysql server itself.

--
Saku
OH1KH

W3JDG
Problem Solved via Updates

Hi Saku,

After several months of being busy doing other non-ham stuff I performed a system wide package update, which included reinstalling CQRLog's binary from the AUR repository, as well as deleting my ~/.config/cqrlog/ folder. And now CQRLog is working as expected. Perhaps the latest build addresses these MariaDB issues.

Sorry that I dropped off the line with my issue.

Thank you very much for your help,

Jorge
W3JDG