Update to 2.6.0 Alpha 134 - MySQL error

15 posts / 0 new
Last post
dl3sdn
Update to 2.6.0 Alpha 134 - MySQL error

Hi,

today I updated to 134 Gtk2 as described on Github README-Page.
Everything worked fine and CQRLog looks working fine too.

But:

When I click on "Open log" a error message pops up telling me

Database upgrade crashed with 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)

I can click the OK Button and then everything looks fine. But I'm not sure if everything works really fine.

My OS is LinuxMInt 21.3

Helge
DL3SDN

oh1kh
Update to 2.6.0 Alpha 134 - MySQL error

Hi Helge!
Was this one time error, or does it happen all the time?

If it was just one timer the I think it is ok now if there are no more errors shown. I look like it has happened during the database table updates that is a one time event when you start a new version of program.

How ever, if you used the upgrade script you should have a safe copy of your ~/.config/cqrlog folder using name cqrlog(date-time).
If it happens that error continues yo can try to rename existing ~/.config/cqrlog to another name for backup and after that copy the script backup'ed ~/.config/cqrlog(date-time) to ~/.config/cqrlog.

Before starting Cqrlog after this copy operation delete file ~/.config/cqrlog/database/ib_logfile0 and after delete make new file with same name. Console commands:

rm ~/.config/cqrlog/database/ib_logfile0
touch ~/.config/cqrlog/database/ib_logfile0

Then you can start Cqrlog again. As you are having now new version of Cqrlot at /usr/bin, but old data at ~/.config/cqrlog it will do the database upgrade process again.

There is no need to do all this if it was jut one time error and all seems to be ok.
Just continue usage to see that all works, but keep your backups up to date.

--
Saku
OH1KH

dl3sdn
Hi Saku,

Hi Saku,

thank you for the quick response.

The error showed up all the time. I replaced the cqrlog-folder with the backuped folder, deleted the ib_logfile0 and created new ib_logfile0.
Than started cqrlog - and the error shows up again all the time.

Helge
DL3SDN

F5JQF
Hello both of you,

Hello both of you,
I followed your discussion regarding this error message. I have the same observation. I have exactly the same problem.
I also did the manipulations suggested by Saku, but after an hour of use, following the entry of a new QSO in remote mode, the message appeared and CQRlog was frozen.
I temporarily solved this problem by simply installing the binary of the Alpha 119 version. I had reported it to Saku, some time ago already.
After each release of Alpha version and after compilation in GtK2 for what concerns me, I try it to see if the problem is still present. Unfortunately, I solve this defect by replacing the binary in /usr/bin/cqrlog (119) and everything works without this problem.

A big thank you to Saku for his work and his involvement for our pleasure.

73, Yves F5JQF

Yves, F5JQF
CQRlog Ver.Alpha_(xxx) / Hamlib 4.5.5 / Linux Mint 21.3 Cinnamon
..

oh1kh
Update to 2.6.0 Alpha 134 - MySQL error

Hi both!

Ok.
Let's pinpoint a bit of this:

CqrlogAlpha 134 not good 119 works.
Was the 119 last version that works. Did version 120 fail, or when that did happen first time?

"Happens all the time" needs more information:

- all the time when no qsos added or touched in any way?
Cqrlog just running: what widows are open then?

- all the time when remote ? What remote?

-----------------------

My guess is that some of the online logs are in use and this happens when new qso is saved and should be uploaded.
That is what the error text perhaps is trying to say , when taking a closer look.

And this is the part of Cqrlog that I do not like at all. It is a mess that is very complicated to understand and follow.
Maybe because I do not use any online logs and so have no need to know the ideas of them. And have saved myself from bugs there.

Few questions, I my guess about online logs were right:
0) what online logs are used?
1) If all online logs are disabled and also immediate uploads are disabled (all checkboxes as unchecked) does the problem exist then?
2) if just immediate uploads are unchecked does the problem exist then?
3) if all qsos are manual uploaded to online logs and after that QSOList/OnlineLog/Remove all upload triggers is executed. Does it remove the problem?

Let's start with those.

--
Saku
OH1KH

dl3sdn
Hi Saku,

Hi Saku,

I do not use online logs and never did it in the past.

"Happens all the time" means at each start of cqrlog. When I click on "open Log" I get the error. Then I click on OK or close the window and from then on everything looks okay and I can work with the program. I never had the popup error while using cqrlog. And never any freezing of program.

But one more thing i found today:
When I download data from LoTW or eQSL and I get information, that there are qso not found in log and then click to show the error file nothing happens if I click on "Yes". The info-window closes and that's it. For me this is no great problem, because I can open the error file manually.

The only reason for updating from 2.5.2 was the fact, that I needed group edit of the DOK-field.

I am thrilled with the commitment you show in helping us to solve problems. This is Ham Spirit at its best.
Thank you for your time and your hard work.

vy 73 de Helge, DL3SDN

F5JQF
Hello to both of you,

Hello to both of you,
I will try to answer Saku with more details knowing that English is not my native language!..
-------------------------
Linux Mint 21.3 - cinnamon v6.0.4 - X11 display server
- CQRlog 2.6.0 (119) GtK2 + Wsjtx + GridTracker v2 -
Server version: 10.6.18-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
--------------------------
I have been using HamQth and Clublog online logs for many years. I have been confirming my QSOs only via LOTW and Eqsl for a very long time also with CQRlog.
Bandmap, DXcluster and RBN monitor are also in service as well as solar propagation indices.
CQRlog is configured for 4 TX (FT897D, IC7610, IC7700 and Sun SDR2DX).
In fact, it doesn't matter which transceiver is used, it's just to detail my configuration.
When a contact is made in FT8 / FT4 for example, the information is sent to CQRlog, the contact is added to the list of my QSOs, as soon as the new QSO is sent to HamQth and Clublog, the small "detail" window closes and everything is ok for a new contact. In this explanation CQRlog is in remote mode.
If I select a contact from the Dxcluster or Bandmap everything goes well too.

-------------------------------
CQRlog 2.6.0 (135) GtK2 + Wsjtx + GridTracker v2 -
Linux Mint 21.3 - cinnamon v6.0.4 - X11 display server
Server version: 10.6.18-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04-
--------------------------------
Updated CQRlog by compiling the latest Alpha version (135) in fact all the ones after 119.

My software configuration remains the same (online log, Lotw, Eqsl etc ....) as well as my hardware configuration.

When adding a new contact CQRlog freezes or if for example I do an adif export or if I make a backup when closing CQRlog.

Out of curiosity, I compiled version 122 (I don't have 120 and 121!) .. and tried CQRlog alone and when closing the software by accepting the backup ... the error message appears and CQRlog crashes! ...

As soon as CQRlog calls the database .. crash -:(

My solution, I replace the binary ( /usr/bin/cqrlog by version 119) and everything is back to normal.

Sorry for this long message. I don't know if it can help the search for the problem?

In the meantime, as already said before, thanks again to Saku for his
involvement in this great software.

73, Yves F5JQF

Yves, F5JQF
CQRlog Ver.Alpha_(xxx) / Hamlib 4.5.5 / Linux Mint 21.3 Cinnamon
..

oh1kh
Update to 2.6.0 Alpha 134 - MySQL error

OK, Yves!

Yep, English is not my native language either! And being a Finnish native speaker it is even harder as our language has suffixes for words while English uses prepositions like in, on, at, from, to etc. that makes no sense for Finnish speaker.

But the subject.
I have to roll back and see what has been done after 119 if I can find any glues from there.
It seems to have something to do with ADIF export (export and backup use same parts), but also adding new qso that is strange as it is completely different function.

Have I ever suggested to try with new clean log?

As you are used to copy binaries you could make 135 to be /usr/bin/cqrlogX and try to start with that. It will make new ~/.config/cqrlogX folder for use.

If it works it shows that there is underlying bug with your currently used database. If could have been happened during database updates when Cqrlog version has updated. Then, when you return back to 119 it might use database in different (old) way that suits for partially upgraded database. This is just a thought...

Then the easiest way is to try to move qsos and settings to new database.

As it seems that your's and Helge's problem are not in the Online log side (what a relief) and there are no others complaining for same reasons (meaning several users) it looks like it can not be in Cqrlog program code, but in database itself.

Sometimes it can be hard. I remember from the late past that once I had mysterious problem that did not get fixed with fresh start. The mysql had something in the main config that "remembered" the external Cqrlog's own safe mode mysql usage and mixed up things.
Only way was to remove whole mysql install from PC, clean up all mysql related files from /etc and /var and then install it again.
It was way in past and I think it was before MariaDB usage.

Please tell if "CorlogX" works ok. Or if you have tried that already.

--
Saku
OH1KH

oh1kh
Update to 2.6.0 Alpha 134 - MySQL error

OK Helge!

I got it now: It is just at start, not when running the program.

There are two ways to test with fresh install:
-----------------------------------------------------------------------
Either make full ADIF backup, then you copy your ~/.config/cqrlog folder to safe place and then remove it from your home folder:

cp -a ~/.config/cqrlog /path/to your/safe/location (could be USB stick)
rm ~/.config/cqrlog

Then start Cqrlog and it will say "you have never used before...." and lets you create first new empty log.
After done, close Cqrlog, start again and see do you get error now with start of only one new empty log.

If it works you can do adif import and make all configurations and start to use your Cqrlog
-----------------------------------------------------------------------
Or you can make copy of cqrlog binary and make a parallel CqrlogX:
I.E
sudo cp /usr/bin/cqrlog /usr/bin/cqrlogX

Then start Cqrlog from console with command:
cqrlogX

It says "you have never used before...." and lets you create first new empty log.
After done, close CqrlogX, start again and see do you get error now with start of only one new empty log.

If it works ok you can start "original" Cqrlog, do adif export, start CqrlogX and do adif import.
If it still works you can make safe copy of ~/.config/cqrlog and then rename ~/.config/cqrlogX to ~/.config/cqrlog and start using the "original" again:

cp -a ~/.config/cqrlog /path/to your/safe/location (could be USB stick)
rm ~/.config/cqrlog
mv ~/.config/cqrlogX ~/.config/cqrlog
-----------------------------------------------------------------------

For the error file opening, please check preferences/External viewers.
Set all items with proper program including the full path.

Error log view is opened with program "TEXT files (*.txt)".
Select a program that works in graphical mode (I.E. NOT nano, vi etc. that are command line text editors)

--
Saku
OH1KH

F5JQF
Hello Saku,

Hello Saku,
thanks for the answer, I will try with the binary 135 how CQRlog behaves.
For information, some time ago, I completely removed CQRlog, Mariadb and associated packages. I did a "clean" installation again imported my ADIF. Until then everything was ok. Then update to the latest Alpha version (135) ..... the problem came back.

I will try just with the latest binary.

73, Yves F5JQF

Yves, F5JQF
CQRlog Ver.Alpha_(xxx) / Hamlib 4.5.5 / Linux Mint 21.3 Cinnamon
..

dl3sdn
Hello Saku,

Hello Saku,

thank you for your answer.

First:
Problem with error_log is solved. As you said, it was a wrong path in preferences.

Second:
I made a fresh install according to your first option.
After first start and clicking on creating first empty new log i got this error:

"TMySQL57Connection : Error executing query: Can't create database 'cqrlog_common' (errno: 2 "No such file or directory")."

This happens now at each start of cqrlog.

vy 73 de Helge, DL3SDN

dl3sdn
Hi Saku,

Hi Saku,

the second option with copy of binary has the same result.
"TMySQL57Connection : Error executing query: Can't create database 'cqrlog_common' (errno: 2 "No such file or directory")."

vy 73 de Helge, DL3SDN

oh1kh
Update to 2.6.0 Alpha 134 - MySQL error

HI Helge!

Have you checked that you have enough room in your hard disk?
console:
df - h

If there is different partition for /home specially that should have free space enough.

Another thing: are you trying to run Cqrlog as root user, or have you ever tried it (only once is enough).
Cqrlog should NEVER be started as root user. It needs to be run as ordinary user without root privileges.

I found similar error case from https://www.cqrlog.com/node/3068
By that it looks like reinstall of MariaDB and removing ~/.config/cqrlog folder did help.

Seems to be that I have faced that also by myself.
https://www.cqrlog.com/comment/10465#comment-10465
Restoring ~/.config/cqrlog folder from backup, checking that ~/.config/cqrlog/database folder is not empty,
and finally ensured that I have ownership of all files and folders with my user account helped.
sudo chown -R saku.saku ~/.config/cqrlog

--
Saku
OH1KH

dl3sdn
Hi Saku,

Hi Saku,

good news. The problem was the database.

On my PC I removed Mariadb and installed a new Mariadb.

But this was not enough, at each start I got
"Error during connection to database: TMySQL57Connection : Server connect failed."

I found out, that I had to install the libmysqlclient-dev package from the repository.

Now everything looks fine and I will do some more tests, hoping that there will no more errors pop up.

Once again thank you very much for your help and the work you do for all the radio amateurs.
Merry Christmas to you and your family.

vy 73 de Helge, DL3SDN

oh1kh
Update to 2.6.0 Alpha 134 - MySQL error

Hi Helge!

Nice to hear!
That proves that old messages in forum have valuable data.

I made an install script for Ubuntu that installs Cqrlog with MariaDB right away.
https://github.com/OH1KH/cqrlog/blob/loc_testing/compiled/install_cqrlog...

I checked the content now, but there is no libmysqlclient-dev package and Cqrlog installed by script runs normally.
Instead there is libmariadb-dev-compat package. It might be that this package is MariaDB replacement for libmysqlclient-dev that, by it's name, sounds to be one of MySql packages.

What ever, the main thing is that your Cqrlog is running now.

Merry Christmas and Happy New Year !

--
Saku
OH1KH