FileNotFoundException found on Soffid Syncserver after reconfiguration - identity

I've just reconfigured Soffid sync server, and now I can see this error messag in the log file:
java.lang.RuntimeException:
java.io.FileNotFoundException:
/opt/soffid/iam-sync/conf/keystore.jks (Permission denied)

You should change the ownership of the directory iam-sync. You can use the chown command (Linux command):
sudo chown -R soffid /opt/soffid/iam-sync

Related

Installation of MySQL 5.7 issue on Centos 7-directory initialization issue

While installing MySQL 5.7 on centos7, I am struggling with the data directory initialization step:
bin/mysqld --initialize --user=mysql
I am getting an error as
bin/mysqld:Error on realpath on 'var\lib\mysql-files'
Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MYSQL server.Supplied value : /var/lib/mysql-files
.
Please suggest.
As described in the MySQL documentation,
/var/lib/mysql-files is the (default) directory where mysql allows import/export operations to work only with files, and the directory MUST exist.
You could try either:
Make sure the directory exists and give access to mysql
sudo mkdir -p /var/lib/mysql-files
sudo chown -R mysql:mysql /var/lib/mysql-files
sudo chmod -R 770 /var/lib/mysql-files
Or:
Disable this option from my.cnf

Cannot start MySQL on Mac - Permission denied

I am trying to run MySQL installed through HomeBrew on a Mac (High Sierra) but I am always having these problems of permissions and with the PID file. I have tried hundreds of possible solutions I found online, but I could not fix these issues:
Haline:/ Haline$ mysql.server start
Starting MySQL
./usr/local/Cellar/mysql/8.0.12/bin/mysqld_safe: line 144: /usr/local/var/mysql/Haline.local.err: Permission denied
/usr/local/Cellar/mysql/8.0.12/bin/mysqld_safe: line 144: /usr/local/var/mysql/Haline.local.err: Permission denied
/usr/local/Cellar/mysql/8.0.12/bin/mysqld_safe: line 199: /usr/local/var/mysql/Haline.local.err: Permission denied
/usr/local/Cellar/mysql/8.0.12/bin/mysqld_safe: line 144: /usr/local/var/mysql/Haline.local.err: Permission denied
ERROR! The server quit without updating PID file (/usr/local/var/mysql/Haline.local.pid).
Can anyone help me, pleeease?
According to the official troubleshooting page of Homebrew:
If commands fail with permissions errors, check the permissions of /usr/local’s subdirectories. If you’re unsure what to do, you can run cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var opt Cellar Caskroom Frameworks.
Alternatively, if you have not installed applications in /usr/local that rely on specific permissions, you can also run:
sudo chown -R $(whoami) /usr/local/*

/usr/sbin/mysqld: error while loading shared libraries: liblz4.so.1: cannot open shared object file: Permission denied

I'm installing mariadb on ubuntu 16.04.
After Installed, when I run mysql status/start, it always throws the below error
root#3ab94b27a215:~# service mysql status
/usr/sbin/mysqld: error while loading shared libraries: liblz4.so.1: cannot open shared object file: Permission denied
* MariaDB is stopped.
I find the file here
root#3ab94b27a215:~# find / -name liblz4.so.1
/usr/lib/x86_64-linux-gnu/liblz4.so.1
I set 777 permission to /usr/lib/x86_64-linux-gnu/liblz4.so.1
chmod 777 /usr/lib/x86_64-linux-gnu/liblz4.so.1
but still the error not resolved.
can you please help me on this?
This worked for me :-
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
It also disables the AppArmor for MySQL on the system though.
Got from this issue
This is what worked for me
Follow the steps below to remove mysqld from the app armor:
$ echo "/usr/sbin/mysqld { }" | sudo tee /etc/apparmor.d/usr.sbin.mysqld
$ sudo apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld
$ sudo systemctl restart mariadb
Had the same problem after mariad install and changing datadir to /home/myuser/mysql. This was the issue: https://stackoverflow.com/a/41558145/4556066 ProtectHome=false

mysql has stopped on my centos 6.5 server and failed to restart

I have tried to restart my mysqld on Centos server but gives me the below error :
170731 05:53:58 mysqld_safe Directory '/data/mysql' for UNIX socket file don't exists.
MySQL Daemon failed to start.
I have checked my mysql.sock file and is present where it should be and as defined in my.cnf
I have checked the permissions also and they are also perfect.
Any other reason its failing to restart ?
Looks like a permission error to me, try the following command.
chown -R mysql:mysql /data/mysql
This command makes the owner(group) of the folder /data/mysql to the user and group 'mysql'
After that the mysql-server should start again when running sudo service mysqld restart

cannot touch `/var/log/mysqld.log': Permission denied

i have reinstalled mysql server in cent OS RHEL5.5 , Im getting the following error
touch: cannot touch `/var/log/mysqld.log': Permission denied
chown: changing ownership of `/var/log/mysqld.log': Operation not permitted
chmod: changing permissions of `/var/log/mysqld.log': Operation not permitted
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
I have checked the permissions for log files , its having correct permissions as mysql user
-rw-r----- 1 mysql mysql 5931 Mar 9 04:36 mysqld.log
Please let me know the issue on this and how to solve it.
Thanks
Ok. I have solved the issue,
$ /usr/libexec/mysqld --skip-grant &
[1] 5388
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
150312 10:03:28 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
$ rm -rf /var/lib/mysql/ib_logfile0
$ rm -rf /var/lib/mysql/ib_logfile1
$ ls -l /var/lib/mysql
i have removed the log files and restart the mysql server.
Thanks
The workaround is:
$ sudo touch /var/log/mysqld.log
$ sudo chown mysql:mysql /var/log/mysqld.log
$ sudo chcon system_u:object_r:mysqld_log_t:s0 /var/log/mysqld.log
In my case, this happened to me after downgrading an AWS EC2 instance. The error was as follows:
$ service mysqld start
touch: cannot touch ‘/var/log/mysqld.log’: Permission denied
chown: changing ownership of ‘/var/log/mysqld.log’: Operation not permitted
chmod: changing permissions of ‘/var/log/mysqld.log’: Operation not permitted
chown: changing ownership of ‘/var/lib/mysql’: Operation not permitted
chmod: changing permissions of ‘/var/lib/mysql’: Operation not permitted
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
Turns out the issue was the new downgraded VM didn't have enough memory as MySQL was trying to reserve.
Updating the value reserved for InnoDB on etc/my.cnf solved the issue:
innodb_buffer_pool_size=4G
No other changes on the file system permissions were needed.
In my case, there is problem with ubuntu apparmor.
Solution:
Edit mysqld profiles (usually in /etc/apparmor.d/usr.sbin.mysqld) and make sure you have:
/var/log/mysqld.log rw,
systemctl reload apparmor
touch /var/log/mysqld.log
chown mysql:mysql /var/log/mysqld.log
chmod 0644 /var/log/mysqld.log
systemctl restart mysql