CQRLOG will not load. Hangs when connecting to database on local server. Can connect to server normally via commandline or mysql utility, but it seems to fail from cqrlog. Shows database connection window only.
--debug=1 shows following;
olaf@Fanless:~$ cqrlog --debug=1
(cqrlog:2829): IBUS-WARNING **: 23:20:14.641: Unable to connect to ibus: Could not connect: Connection refused
Cqrlog Ver:2.3.0 (001) Date:2018-06-17
**** DEBUG LEVEL 1 ****
SSL libraries:
/usr/lib/i386-linux-gnu/libssl.so.1.0.0
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.0
Loading libmysqlclient: /usr/lib/i386-linux-gnu/libmysqlclient.so
**************************
MySQL version: 5.7
**************************
**********************************
MySQL version assigned: 5.7
**********************************
Loaded 133585 LoTW users
Loaded 125280 eQSL users
Loaded 37042 SCP calls
*
User home directory: /home/olaf/
Program home directory: /home/olaf/.config/cqrlog/
Data directory: /home/olaf/.config/cqrlog/database/
Memebers directory: /home/olaf/.config/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlogTConnection to MySQL: 5.7
*
56 us states loaded
select * from tables where table_schema = 'cqrlog_common'
SELECT log_nr,log_name FROM cqrlog_common.log_list order by log_nr
use cqrlog001
use cqrlog001
use cqrlog001
use cqrlog001
use cqrlog001
SELECT * FROM cqrlog_config
System should be up to date.
Any advice is appreciated.
73 de Olaf - LA3RK
Hi Olaf!
First the IBUS. Put words:
cqrlog.com ibus
to google search. IBUS can make problems to some input fields. Normally you should not see IBUS warning in debug text, it indicates that something is wrong with that.
But it should not affect to database itself.
As seen from your debug you do not have "save data on local machine" checkbox set (Database connection window). There should be lines about starting "mysql_safe" if "save data on local machine" is checked. It means you use external database server either in same PC or via network.
If you use mysql server at same PC check that in Database connection window server is localhost or 127.0.0.1 and port is 3306 (it is 64000 only if you check "save data on local machine").
And that your username and password are ok. Defaults are cqrlog and cqrlog, but if external mysql server is in use they must be same that are used for granting access to external server.
Little more information of mysql server in use is needed and is the debug.txt complete from start up till hangup?
--
Saku
OH1KH
Thanks for advice. Connection to external database is ok when testing via mysql and username password is same in cqrlog. Have been using external database for a long time without major problems apart from slow backup when closing cqrlog.
Today opening works ok for some reason, but seems slow. Another matter is that backup when closing cqrlog is extremely slow when using external database.
I may have to change to local database and instead replicate to server to keep access to log when out of shack.
Mysql server is on a Synology DS218 and using Maria DB5 standard package on the synology server.
And the debug.txt was complete until cqrlog was killed after 10 minutes wait. Tpdays debug log below (not complete, only until rigctld responses seen).
73 de Olaf - LA3RK
olaf@Fanless:~$ cqrlog --debug=2
(cqrlog:4654): IBUS-WARNING **: 22:49:42.618: Unable to connect to ibus: Could not connect: Connection refused
Cqrlog Ver:2.3.0 (001) Date:2018-06-17
**** DEBUG LEVEL 2 ****
SSL libraries:
/usr/lib/i386-linux-gnu/libssl.so.1.0.0
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.0
Loading libmysqlclient: /usr/lib/i386-linux-gnu/libmysqlclient.so
**************************
MySQL version: 5.7
**************************
**********************************
MySQL version assigned: 5.7
**********************************
Loaded 133801 LoTW users
Loaded 125340 eQSL users
Loaded 37042 SCP calls
*
User home directory: /home/olaf/
Program home directory: /home/olaf/.config/cqrlog/
Data directory: /home/olaf/.config/cqrlog/database/
Memebers directory: /home/olaf/.config/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlog/
TConnection to MySQL: 5.7
*
56 us states loaded
select * from tables where table_schema = 'cqrlog_common'
SELECT log_nr,log_name FROM cqrlog_common.log_list order by log_nr
use cqrlog001
use cqrlog001
use cqrlog001
use cqrlog001
use cqrlog001
SELECT * FROM cqrlog_config
select * from db_version
[UpgradeMainDatabase] Old version: 15 cDB_MAIN_VER: 15
select * from cqrlog_common.db_version
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF
Settings:
-----------------------------------------------------
RigCtldPath:/usr/bin/rigctld
RigCtldArgs:-m 2 -r -t 4532 rigctld -m 229 -r /dev/ttyUSB0 -s 38400
RunRigCtld: FALSE
RigDevice:
RigCtldPort:4532
RigCtldHost:localhost
RigPoll: 500
RigSendCWR: FALSE
RigId: 2
rigctld started!
Connected to localhost:4532
Settings:
-----------------------------------------------------
RotCtldPath:/usr/bin/rotctld
RotCtldArgs:
RunRotCtld: FALSE
RotDevice:
RotCtldPort:4533
RotCtldHost:localhost
RotPoll: 500
RotId: 1
rotctld started!
Connected to localhost:4533
FreqmemSql:select id,freq,mode,bandwidth from freqmem order by id
FreqmemFirst:0 FreqmemLast:0
Sending: fmv
CW init
address: localhost
port: 4532
CW speed changed to:23
SELECT * FROM profiles WHERE visible > 0 ORDER BY nr
SELECT * FROM profiles WHERE nr = 5
SELECT * FROM profiles WHERE visible > 0 ORDER BY nr
SELECT * FROM profiles WHERE nr = 5
select locator from profiles where nr = 5
select locator from profiles where nr = 5
5-JO59HW;Oslo;K3;
select * from view_cqrlog_main_by_qsodate where qsodate >= '2019-09-20' order by qsodate,time_on
LoadForm: frmNewQSO
Msg from rig: 3507000
CW
200
CWint connected to hamlib
CW speed changed to:23
NOTE: Window with stalled focus found!, faking focus-out event
NOTE: Window with stalled focus found!, faking focus-out event
NOTE: Window with stalled focus found!, faking focus-out event
NOTE: Window with stalled focus found!, faking focus-out event
FreqmemSql:select id,freq,mode,bandwidth from freqmem where (mode = 'CW') order by id
FreqmemFirst:0 FreqmemLast:0
Sending: fmv
Msg from rig: VFOA
Whole MSG:|3507000
|
Whole MSG:|CW
200
|
Msg from rig: 3507000
Whole MSG:|VFOA
Olaf Devik LA3RK
HI Olaf!
Somehow it feels like you have some problems with network you are using. If understood ok your mysql server is "somewere" out of hamshack.
Perhaps you should run some network performance tests using the database server, I.E port 3306 traffic.
Backup is slow if access to database server is slow. I have tested external database usage via openvpn and ssh tunnel. SSH is a bit faster but things go slow anyway.
Backing up with mysqldump locally at server side is faster. It is also better as cqlog's backup is only ADIF export of all qsos. It does not backup any log settings etc.
If you use "save data on local machine" copying whole ~/.config/cqrlog directory will backup everything, but backup at cqrlog close will backup just qsos.
I use this kind of backup at server's crontab
/usr/bin/mysql -B -N -e 'show databases like "cqr%"' | /usr/bin/xargs /bin/echo -n mysqldump --databases > /tmp/mycmd.txt
That will create mycmd.txt that, when executed, will backup all cqrlog releated databases from server.
I have database server at same laptop that I run cqrlog. So I use localhost 3306 as server definition for cqrlog.
That database will replicate to my server machine's database via WiFi. Replication is two directional as I have cqrweblog running at server machine. I can connect to it from "outside world" using openvpn and log qsos with any device that has web browser.
When I come back to shack and start laptop it will replicate qsos added via openvpn to hamshack laptop.
As replication works in background cqrlog has always fast access to localhost database server.
--
Saku
OH1KH
Saku
Thanks for advice, you confirm what I have experienced, cqrlog backup is slow when using external database. My database is on local network, but connected wireless, have not checked speed/turnaround.
I was hoping to use the external database as the main database and use mysql replication to also access from other locations. Seems I have to rethink and instead use local database and update a copy on the server when closing cqrlog.
Main idea is to be able to access log also when outside house, eg from summerhouse. Seems I have some work to do in order to set up a efficient solution. Synology server is running all time, is located on home network and can be accessed from the outside both via port 3306 and via ssh.
You state that you log qso's via web browser is that a private solution or something that is generally available. Would be nice to check log via webbrowser and without opening cqrlog.
73 de Olaf - LA3RK
Olaf Devik LA3RK
Hi Olaf !
WiFi may sometimes be the bottleneck. If the signal is not strong (like in my case) your neighbour's WiFi at same channel may override your connect.
When I'm playing with ESP12e WiFi microcontroller designs I sometimes lost my WiFi because ESP is so strong just few centimeters from laptop.
Cqrweblog is very nice program that is just suitable for outside operations. You just need web browser and internet connection with you and server with cqrlog database and internet connection at home.
Look from here: https://www.dl8bh.de/cqrweblog/
--
Saku
OH1KH
Saku
Thanks for advice. Got the web access to run without problems. Next will be to follow your advice and run the database locally on the station computer and set up server at replication of station computer database. And using cron for backup as you suggest is maybe a good solution.
After all more than 15000 qsos in log and I would hate to loose the data.
73 de Olaf - LA3RK
Olaf Devik LA3RK
Fine !
Cqrweblog is a nice piece of software for outdoor operations where internet is available.
You can set database backup hourly in crontab to be sure. It runs there without any effect to cqrlog use. Just make the naming using date&time so that you will have history enough to go back if you do not notice a problem at once.
You can then make another daily cron for removing too old files.
This one removes *.wav files older than 2 days that I use for removing wsjt-x saved audio files:
eval $(find *.wav -mtime +2 -type f | awk '{print "/bin/rm -f "$1}')
--
Saku
OH1KH