Mendeley desktop does not open in Fedora 31 - fedora

I am trying to run Mendeley desktop and, technically, the only thing that I should do is download the distribution for generic linux and run ./bin/mendeleydesktop
However, when I do that, the application never lauches. I tried running it with the verbose option to get more details, and I can't see any errors.
./mendeleydesktop --log-to-stderr --verbose-log
-- 2019-12-17 18:50:48.963 MendeleySqliteDatabase::prepareEncryptedDatabaseToBeOpened: Database /home/msarthur/.local/share/data/Mendeley Ltd./Mendeley Desktop/Settings.sqlite already using default db key
-- 2019-12-17 18:50:48.971 MendeleySqliteDatabase::prepareEncryptedDatabaseToBeOpened: Database /home/msarthur/.local/share/data/Mendeley Ltd./Mendeley Desktop/Settings.sqlite already using default db key
-- 2019-12-17 18:50:48.984 MendeleySqliteDatabase::prepareEncryptedDatabaseToBeOpened: Database /home/msarthur/.local/share/data/Mendeley Ltd./Mendeley Desktop/Settings.sqlite already using default db key
-- 2019-12-17 18:50:48.985 MendeleySqliteDatabase::prepareEncryptedDatabaseToBeOpened: Database /home/msarthur/.local/share/data/Mendeley Ltd./Mendeley Desktop/Settings.sqlite already using default db key
-- 2019-12-17 18:50:49.026 MendeleyApplication::execute: startup took 127 ms
-- 2019-12-17 18:50:49.567 ConnectionTester::testDone: Platform: Linux-5.3
-- 2019-12-17 18:50:49.567 ConnectionTester::testDone: Proxy Type: NoProxy
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: Proxy Server:
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: Proxy Port: 0
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: Proxy User:
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: Proxy Has Password: false
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: verify depth 0
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: verify mode 3
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: cert 0 *.mendeley.com :07:01:c5:87:b7:3d:28:cd:37:ba:ab:25:09:75:00:cc:d4:66:35 is valid? 1
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: cert 1 Trustwave Organization Validation SHA256 CA, Level 1 :92:b8:74:4f:71:ce:d0:e2:6c:72:a3:d8:d5:d9:25:b2 is valid? 1
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: Connecting to api.mendeley.com (secure: 1, backend: Qt) - OK Done (401)
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: verify depth 0
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: verify mode 3
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: Connecting to s3.amazonaws.com (secure: 0, backend: Qt) - OK Done (307)
-- 2019-12-17 18:50:49.568 ConnectionTester::testDone: verify depth 0
-- 2019-12-17 18:50:49.569 ConnectionTester::testDone: verify mode 3
-- 2019-12-17 18:50:49.569 ConnectionTester::testDone: cert 0 s3.amazonaws.com :04:b2:eb:72:d4:41:39:bc:a3:7f:82:95:20:d5:7a:f0 is valid? 1
-- 2019-12-17 18:50:49.569 ConnectionTester::testDone: cert 1 DigiCert Baltimore CA-2 G2 (www.digicert.com) :01:82:f8:09:8e:a2:e6:26:b9:1a:3b:27:84:1f:b9:af is valid? 1
-- 2019-12-17 18:50:49.569 ConnectionTester::testDone: Connecting to s3.amazonaws.com (secure: 1, backend: Qt) - OK Done (307)
Any insights?

It seems that there is now an official distribution at: http://koji.rpmfusion.org/koji/buildinfo?buildID=12107
This package builds and opens properly

Related

mysql Replication stalled

I am having mysql 8.0 installation with replication between 2 servers in master-master configuration. While data is being replicated from server A to server B the replication is stalled from hours. Below is the snippet for show slave status \G on server B.
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 49808
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: waiting for handler commit
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
After executing show processlist; i am getting a process that is waiting from a long time , having a wait time of 50071 and increasing
system user | | NULL | Query | 50071 | waiting for handler commit
What steps shall i take to bring my replication on track?
Had the same problem. Adding:
innodb_flush_log_at_trx_commit = 2
Solved the problem for me on MySQL 8.0.13 installation.
Read here: https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit
And see also: https://dba.stackexchange.com/questions/232365/mysql-8-0-updates-are-sometimes-stalling

MariaDB Encryption at Rest via AWS KMS Plugin - Key Rotation Not Working?

I have set up MariaDB for encryption at rest via the AWS Key Management Service (KMS) Plugin.
Everything seems to work except for the key cycling.
I have configured the below options as per the attached config files:
/etc/my.cnf
[mysqld]
# InnoDB/XtraDB Encryption
innodb_encrypt_tables = On
innodb_encrypt_log = On
innodb_encryption_threads = 8
innodb_encryption_rotate_key_age = 1
innodb_encryption_rotation_iops = 100
/etc/my.cnf.d/aws_key_management.cnf
[mariadb]
# Load the AWs plugin and enable it for use
plugin-load-add=aws_key_management.so
# Link to the AWS KMS 'Customer Master Key' used to decrypt MariaDB
encryption keys on disk
# during MariaDB start up and save the decrypted keys into memory
aws_key_management_master_key_id = alias/MariaDB-Encryption-Key
# Specify the AWS region our KMS key is stored in
aws_key_management_region = eu-west-2
# Specify the key specification
aws_key_management_key_spec = AES_256
# Rotate all keys
aws_key_management_rotate_key = -1
# Change the plugins log level
# Options: "Off" (default), "Fatal", "Error", "Warn", "Info",
"Debug", and "Trace".
aws_key_management_log_level = Warn
!include /etc/my.cnf.d/enable_encryption.preset
As you can see, I have set all keys to rotate using aws_key_management_rotate_key = -1 and set a key age of 1 using innodb_encryption_rotate_key_age = 1, yet I can see from the keys in /var/lib/mysql/ that version 1 of the keys is still being used despite these settings having been in place for multiple days:
/var/lib/mysql/aws-kms-key.1.1
/var/lib/mysql/aws-kms-key.2.1
(Note: the final .n suffix on the file name represents the key version)
The only thing I can think of, is that my understanding of innodb_encryption_rotate_key_age being measured in days in incorrect? The documentation for this option can be seen below, and makes no reference at all to what unit of measurement is used with this numeric value?
innodb_encryption_rotate_key_age
Description: Re-encrypt in background any page having a key older than >this. When setting up Encryption, this variable must be set to a non-zero >value. Otherwise, when you enable encryption through innodb_encrypt_tables >MariaDB won't be able to automatically encrypt any unencrypted tables.
Can anyone explain why this would be and why my keys are not rotating?
MariaDB Version
mysql --version
mysql Ver 15.1 Distrib 10.2.15-MariaDB, for Linux (x86_64) using readline 5.1`
AWS KMS Plugin Version
yum list installed | grep mariadb
MariaDB-aws-key-management.x86_64 10.2.15-1.el7.centos #mariadb-main
The basic rotation
As a workaround, you can trigger the rotation via the global variable. MariaDB and/or the plugin seem to take no action based on the config value, as you've described. The upside of this, is that you don't have to restart the database.
Don't forget to remove aws_key_management_rotate_key from the config, because you won't need it.
Trigger the rotation by setting the global value from the console. Note that you don't need to reset it 0 manually after the rotation. The plugin will report generating a new set (versions) of datakeys.
MariaDB [(none)]> SET ##GLOBAL.aws_key_management_rotate_key=-1;
Query OK, 0 rows affected, 4 warnings (0.875 sec)
MariaDB [(none)]> SELECT ##GLOBAL.aws_key_management_rotate_key;
+----------------------------------------+
| ##GLOBAL.aws_key_management_rotate_key |
+----------------------------------------+
| 0 |
+----------------------------------------+
1 row in set (0.000 sec)
MariaDB [(none)]> SHOW WARNINGS;
+-------+------+---------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+---------------------------------------------------------------------+
| Note | 1105 | AWS KMS plugin: generated encrypted datakey for key id=1, version=2 |
| Note | 1105 | AWS KMS plugin: loaded key 1, version 2, key length 256 bit |
| Note | 1105 | AWS KMS plugin: generated encrypted datakey for key id=2, version=2 |
| Note | 1105 | AWS KMS plugin: loaded key 2, version 2, key length 256 bit |
+-------+------+---------------------------------------------------------------------+
4 rows in set (0.000 sec)
Reference: https://mariadb.com/kb/en/library/aws-key-management-encryption-plugin/#rotating-keys
Gotcha #1: allowed version aging
Unfortunately, this is not over. Version 2 will now be used to encrypt new pages by default, however the pages encrypted with the previous version will not be re-encrypted in the background, as one would expect. This is due to the setting innodb_encryption_rotate_key_age=0 disabling background encryption, as opposed to forcing 0 key-version age. So, the minimum age gap that we can set is 1, which allows the use of the previous version (Version 1 in my case) for encryption by the db.
Check the innodb tablespace encryption. MIN_KEY_VERSION means:
Minimum key version used to encrypt a page in the tablespace. Different pages may be encrypted with different key versions.
MariaDB [test]> SELECT NAME, MIN_KEY_VERSION, CURRENT_KEY_VERSION, ROTATING_OR_FLUSHING FROM information_schema.INNODB_TABLESPACES_ENCRYPTION;
+----------------------------+-----------------+---------------------+----------------------+
| NAME | MIN_KEY_VERSION | CURRENT_KEY_VERSION | ROTATING_OR_FLUSHING |
+----------------------------+-----------------+---------------------+----------------------+
| innodb_system | 1 | 2 | 0 |
| mysql/gtid_slave_pos | 1 | 2 | 0 |
| mysql/innodb_index_stats | 1 | 2 | 0 |
| mysql/innodb_table_stats | 1 | 2 | 0 |
| mysql/transaction_registry | 1 | 2 | 0 |
| test/tbl | 1 | 2 | 0 |
+----------------------------+-----------------+---------------------+----------------------+
6 rows in set (0.000 sec)
Repeat the rotation from step 2 once more, to have MIN_KEY_VERSION at least 2. That will also mean, that you will need to keep both version 2 and version 3 of the keys around.
Reference: https://mariadb.com/kb/en/library/information-schema-innodb_tablespaces_encryption-table/
Gotcha #2: redo log
The redo log is still encrypted with the previous key version, and MariaDB won't start if the old key is missing.
0 [ERROR] mysqld: can't open file aws-kms-key.1.1
0 [Warning] mysqld: AWS KMS plugin: key 1, version 1 could not be decrypted
0 [ERROR] InnoDB: Obtaining redo log encryption key version 1 failed (2385237688). Maybe the key or the required encryption key management plugin was not found.
...
0 [ERROR] InnoDB: No valid checkpoint found (corrupted redo log). You can try --innodb-force-recovery=6 as a last resort.
...
0 [ERROR] Unknown/unsupported storage engine: InnoDB
0 [ERROR] Aborting
Key rotation for the InnoDB redo log is only supported in MariaDB 10.4.0 and later. See MDEV-12041 about that.
Reference: https://mariadb.com/kb/en/library/encrypting-data-for-innodb-xtradb/#key-rotation

How to view error logs generated by mariadb on CentOS 7

I am new to mariadb. Today, I was attempting to import a mysql database to mariadb and during the process the import stops when a warning is encountered as shown below.
Now, I said to myself that I should check a log file so I can see the error but I can't seem to fine any log file. I ran the query below with help from Get the error log of Mariadb:
As you can see there is no path to an error log file.
Next I checked /var/lib/mysql and below is the dir content:
-rw-rw----. 1 mysql mysql 16384 Jun 5 16:03 aria_log.00000001
-rw-rw----. 1 mysql mysql 52 Jun 5 16:03 aria_log_control
-rw-rw----. 1 mysql mysql 79691776 Jun 8 08:02 ibdata1
-rw-rw----. 1 mysql mysql 50331648 Jun 8 08:02 ib_logfile0
-rw-rw----. 1 mysql mysql 50331648 Jun 5 16:03 ib_logfile1
-rw-rw----. 1 mysql mysql 6 Jun 5 16:12 IMSPRO.pid
drwx------. 2 mysql mysql 4096 Jun 8 08:02 ecommence
-rw-rw----. 1 mysql mysql 0 Jun 5 16:12 multi-master.info
drwx--x--x. 2 mysql mysql 4096 Jun 5 16:03 mysql
srwxrwxrwx. 1 mysql mysql 0 Jun 5 16:12 mysql.sock
drwx------. 2 mysql mysql 20 Jun 5 16:03 performance_schema
-rw-rw----. 1 mysql mysql 24576 Jun 5 16:12 tc.log
No file in the above dir logs error.
Below is the content of my /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
Below is the content of /etc/my.cnf.d
drwxr-xr-x. 2 root root 117 Jun 5 16:02 .
drwxr-xr-x. 91 root root 8192 Jun 7 01:14 ..
-rw-r--r--. 1 root root 295 May 29 16:48 client.cnf
-rw-r--r--. 1 root root 763 May 29 16:48 enable_encryption.preset
-rw-r--r--. 1 root root 232 May 29 16:48 mysql-clients.cnf
-rw-r--r--. 1 root root 1080 May 29 16:48 server.cnf
-rw-r--r--. 1 root root 285 May 29 16:48 tokudb.cnf
What can I do to get error log?
The way to see the warnings is to type this immediately after receiving that "Warnings: 1":
SHOW WARNINGS;
(As soon as the next other command is run, the warnings are cleared.)
In mariadb version 10.3.29,
#show variables like 'log-error';
is showing "Empty set" output
Instead, the following command is working
show global variables like 'log_error';
In my case, I edited /etc/my.cnf and added the line log_error after [mysqld]:
[mysqld]
...
log_error
After that, the query show variables like 'log_error'; displays the following (before the change, the Value column was empty):
+---------------+--------------------------+
| Variable_name | Value |
+---------------+--------------------------+
| log_error | /var/lib/mysql/host.err |
+---------------+--------------------------+
Now the error log is being written to the above file.
The exact name of the file will vary from server to server and will take the name of the current host, so expect it to be different in your particular case.

how to access a database files via the command line mysql?

I just installed mysql for the first time and created a databse with create database foo;
I think I have found where mysql stores the databases (/var/lib/mysql). When I try to cd to the foo directory I get permission denied. When I try with sudo nothing happens.
output of ls -l
-rw-rw----. 1 mysql mysql 16384 Feb 21 17:44 aria_log.00000001
-rw-rw----. 1 mysql mysql 52 Feb 21 17:44 aria_log_control
drwx------. 2 mysql mysql 4096 Mar 1 22:08 foo
-rw-rw----. 1 mysql mysql 18874368 Feb 21 17:44 ibdata1
-rw-rw----. 1 mysql mysql 5242880 Mar 1 16:05 ib_logfile0
-rw-rw----. 1 mysql mysql 5242880 Feb 21 17:34 ib_logfile1
drwx------. 2 mysql mysql 4096 Feb 21 17:34 mysql
srwxrwxrwx. 1 mysql mysql 0 Mar 1 16:05 mysql.sock
drwx------. 2 mysql mysql 4096 Feb 21 17:34 performance_schema
I know your meant to view the databases and stuff through that application on the command line but I am interested as to why I can't view the foo directory when i am root.
You can't view the foo directory because of the permissions:
owner - mysql - read, write, execute
group - mysql - no access
other - no access
First connect to mysql from command prompt using
[root#host]# mysql -u root -p
Enter password:******
Now select the database using
mysql> USE DB_Name
You can use belo command to have the list of databases
mysql> SHOW DATABASES;
To get the directory details you can use
mysql -uUSER -p -e 'SHOW VARIABLES WHERE Variable_Name = "dir_name"

Mysql - query is slow when IO on linux server wait is high

Slow query when IO wait is high.
Show from iotop command
-- TID -- PRIO -- USER -- DISK READ -- DISK WRITE -- SWAPIN -- IO> -- COMMAND
-- 2311 -- be/4 -- mysql -- 0.00 B/s -- 0.00 B/s -- 0.00% -- 96.25% -- mysql~l.sock
-- 2311 -- be/4 -- mysql -- 0.00 B/s -- 0.00 B/s -- 0.00% -- 96.25% -- mysql~l.sock
-- 2311 -- be/4 -- mysql -- 0.00 B/s -- 0.00 B/s -- 0.00% -- 96.24% -- mysql~l.sock
High IO wait start when 6:13:28 PM - 6:13:29 PM (sar command)
--------------------- CPU -- %usr -- %nice -- %sys -- %iowait -- %steal
-- 6:13:28 PM --- all ----- 2.53 --- 0.00 ---- 2.02 ----- 39.39 ------ 0.00
-- 6:13:29 PM --- all ----- 1.99 --- 0.00 ---- 1.00 ----- 49.25 ------ 0.00
Got slow query between that time
Time: 130329 18:13:29
User#Host: wdwdwd[wdwdwd] # localhost []
Query_time: 2.007902 Lock_time: 0.000025 Rows_sent: 0 Rows_examined: 1 SET timestamp=1364555609;
UPDATE log_product SET credit=credit+1 WHERE id_product='349721228' and id_user='2021841' LIMIT 1;
## Question are How to fix this process. What the real cause ? ##
Do you have an index on the "Log_Product" table by (id_user, id_product) as a single index, not TWO indexes, one by each column. Also, if the fields are numeric, you don't need quotes...