Nextcloud version: 12.0.2
Operating system and version: Ubuntu 16.04
Apache or nginx version: 2.4.18
PHP version: 7.0.22
Is this the first time you’ve seen this error?: No
Can you reliably replicate it? (If so, please outline steps):
Install Nextcloud using the steps shown on the following page:
~Also, the code that was used to create the nextcloud is in the first comment in the youtube video. Don’t want to post it here to clutter up the thread, but for your reference it is there.~
Restart VM and the problem is created.
The issue you are facing:
Nextcloud works perfect until the VM server is restarted. After restarting the VM, Nextcloud will now startup and I get an “Unable to connect” on local server or outside clients (connection refused).
The output of your Nextcloud log in Admin > Logging: I am new to linux so not sure how to get this file.
The output of your config.php file in
/path/to/nextcloud (make sure you remove any identifiable information!):
$CONFIG = array (
'instanceid' => 'ock5p5g2ptzq',
'passwordsalt' => 'b9cTKHAc1aSLpZtazoIX9DJtKcjYlw',
'secret' => 'iXTI8rVws/hPH6gabSaPOvi6SBxIi2V2BI/WG+bbv5+gnpOB',
0 => '192.168.1.205',
1 => 'website.com/nextcloud',
3 => 'website.com',
4 => 'PublicIPAddress',
'datadirectory' => '/var/www/html/nextcloud/data',
'overwrite.cli.url' => 'http://offsite.saiengineers.com/nextcloud',
'dbtype' => 'mysql',
'version' => '18.104.22.168',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'password',
'installed' => true,
The output of your Apache/nginx/system log in
Is the following link OK for the system log?
I am a newbie at Linux but wanted to setup a cloud service. Everything went great until i restarted my VM and then the service would not work anymore. I tried deleting the VM and starting from scratch thinking I messed something up, but I was left with the same results again when I resetup the Nextcloud. Any help would be greatly appreciated, I am hoping it is something easy that this newbie is missing. Please let me know if you need anymore information and I will try and upload whatever you need to help me fix this problem. Thank you for your time.
Do the system services start again after the reboot?
Sorry for my limited knowledge but if I type:
It will show the apache restarted OK.
But if I type in:
service mysql restart
I get an error:
Job for mysql.service failed because the control process exited with error code. See “systemctl status mysql.service” and journalctl -xe" for detail
So I am assuming it is a problem with the mysql?
Thank you again for your time in this matter.
Also, the code that was used to create the nextcloud is in the first comment in the youtube video. Don’t want to post it here to clutter up the thread, but for your reference it is there.
show the output of
systemctl status mysql
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: en
Active: activating (start-post) (Result: exit-code) since Sun 2017-08-27 19:5
Process: 48802 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 48795 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exi
Main PID: 48802 (code=exited, status=1/FAILURE); : 48804 (mysql-systemd
├─48804 /bin/bash /usr/share/mysql/mysql-systemd-start post
└─48820 sleep 1
Aug 27 19:50:38 ubuntu systemd: Starting MySQL Community Server…
Aug 27 19:50:38 ubuntu mysql-systemd-start: my_print_defaults: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf at line 23!
Aug 27 19:50:38 ubuntu mysql-systemd-start: my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
Aug 27 19:50:38 ubuntu mysqld: mysqld: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf at line 23!
Aug 27 19:50:38 ubuntu mysqld: mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
Aug 27 19:50:38 ubuntu systemd: mysql.service: Main process exited, code=exited, status=1/FAILURE
This is my “my.cnf” file. Sorry for the big text, I don’t know how to fix that!!
’# The MySQL database server configuration file.
’# You can copy this to one of:
’# - “/etc/mysql/my.cnf” to set global options,
’# - “~/.my.cnf” to set user-specific options.
’# One can use all long options that the program supports.
’# Run program with --help to get a list of available options and with
’# --print-defaults to see which it would actually understand and use.
’# For explanations see
’# * IMPORTANT: Additional settings that can override those from this file!
’# The files must end with ‘.cnf’, otherwise they’ll be ignored.
'log-bin = /var/log/mysql/mariadb-bin
’log-bin-index = /var/log/mysql/mariadb-bin.index
’binlog_format = mixed
Line 23 is: log-bin = /var/log/mysql/mariadb-bin
Ok, I took lines 23, 24 and 25 and commented them out and now the mysql starts up and NextCloud is running again. Are those lines necessary, if not, I will leave them how they are so the server continues to run and not worry about it. Thanks for your help, getting those logs helped me look and see what lines were causing the trouble. Learning as I go here.
Edit: Thank you edited my previous post based on your comment to make it a little easier on the eyes.
did your my.cnf had
at the beginning of the my.cnf?
use back tick `` to formatting your text. So it’s more readable
No, what I posted is exactly what what in the my.cnf file. But it looks like something with those 23, 24 and 25 lines are messing it up because when I took them away, it started back up. Are those lines necessary, I have no clue what they do. According to the tutorial, they were to be put in for: “Disabling MariaDB binary logging.”