NextcloudPi redis fails to start

Good evening,

I recently had a power failure and when my Odroid rebooted with NextcloudPi I can no longer log in to nextcloud. I can log into the Web Panel, and the status page tells me that the “Nextcloud Check” has an error and the “Redis Service” is down.

I’ve tried to restart the redis server via SSH “sudo service redis-server start” and I get the following:

Job for redis-server.service failed because the control process exited with error code.

When I check the Redis-server status I get this

● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-08-12 00:27:07 UTC; 54s ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 5409 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILU

Aug 12 00:27:07 nextcloudpi systemd[1]: redis-server.service: Service RestartSec=100ms expired, sc
Aug 12 00:27:07 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart count
Aug 12 00:27:07 nextcloudpi systemd[1]: Stopped Advanced key-value store.
Aug 12 00:27:07 nextcloudpi systemd[1]: redis-server.service: Start request repeated too quickly.
Aug 12 00:27:07 nextcloudpi systemd[1]: redis-server.service: Failed with result ‘exit-code’.
Aug 12 00:27:07 nextcloudpi systemd[1]: Failed to start Advanced key-value store.

I’ve tried to re-install it with no luck.

Any help you can give me would be greatly appreciated.

Thanks,
Robert

Try “sudo journalctl -u redis-server.service” and see what it says. (I don’t have access to the same configuration as I run Nextcloud on UBOS, so I might be slightly off; but it should give you a more detailed error message.)

Thanks, that gave a little more insight, the log was mostly repetitive but this was the common part:

Aug 13 22:03:59 nextcloudpi systemd[1]: redis-server.service: Service RestartSec=100ms expired, sche
Aug 13 22:03:59 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter
Aug 13 22:03:59 nextcloudpi systemd[1]: Stopped Advanced key-value store.
Aug 13 22:03:59 nextcloudpi systemd[1]: Starting Advanced key-value store…
Aug 13 22:03:59 nextcloudpi redis-server[2190]: *** FATAL CONFIG FILE ERROR ***
Aug 13 22:03:59 nextcloudpi redis-server[2190]: Reading the configuration file, at line 171
Aug 13 22:03:59 nextcloudpi redis-server[2190]: >>> ‘logfile /var/log/redis/redis-server.log’
Aug 13 22:03:59 nextcloudpi redis-server[2190]: Can’t open the log file: Permission denied
Aug 13 22:03:59 nextcloudpi systemd[1]: redis-server.service: Control process exited, code=exited, s
Aug 13 22:03:59 nextcloudpi systemd[1]: redis-server.service: Failed with result ‘exit-code’.
Aug 13 22:03:59 nextcloudpi systemd[1]: Failed to start Advanced key-value store.

I’m guessing there is something wrong with the config file and somehow the permissions on the log file are wrong.

So line 171 of the config file specifies the location of the server log. So perhaps this is all a permissions issue? If so does anyone know how to change it and to what?

Thanks,
Robert

It has it right there: can’t write to the log file. Fix its permissions.

Unfortunately I’m not sure how to change its permissions and to what. I assume from reading other posts it must be made accessible by www-data but I can’t be sure.

So I simply uninstalled and purged Redis-Server and reinstalled it, it setup the log folder properly and I was able to run it again. Unfortunately that didn’t solve the Nextcloud Check - Failed issue. I’m going to attempt a nc-init and see if that helps, if not I will start from scratch again.

Thanks for all your help!

Robert