Redis-server failing to start

Folks,

I'm using emonbase using the latest emonhub that cames with SD - after the first boot, I login, configured everything and worked, however after the first reboot, I'm unable to make it work again - using the browser I got the follow message:

Can't connect to redis at localhost:6379 , it may be that redis-server is not installed or started see readme for redis installation

If I try to initialize the redis-server I got a error message and here is status message:

 redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled)
   Active: failed (Result: start-limit) since Mon 2016-01-25 07:44:53 GMT; 25s ago
  Process: 1921 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FA

Jan 25 07:44:52 emonpi systemd[1]: Failed to start Advanced key-value store.
Jan 25 07:44:52 emonpi systemd[1]: Unit redis-server.service entered failed state.
Jan 25 07:44:53 emonpi systemd[1]: redis-server.service holdoff time over, scheduling restart.
Jan 25 07:44:53 emonpi systemd[1]: Stopping Advanced key-value store...
Jan 25 07:44:53 emonpi systemd[1]: Starting Advanced key-value store...
Jan 25 07:44:53 emonpi systemd[1]: redis-server.service start request repeated too quickly, ref
Jan 25 07:44:53 emonpi systemd[1]: Failed to start Advanced key-value store.
Jan 25 07:44:53 emonpi systemd[1]: Unit redis-server.service entered failed state.

I already tried a fresh image and the same happen after the first reboot.

Any clue on what can be happening here?

Best Regards!

-BD

 

squiza's picture

Re: Redis-server failing to start

I am experiencing the exact same thing. I received my new RFMPI card today. Installed it and rebooted and gone.

I am finding that the /var/lib directory is empty except for two directories (container and systemd). I have been trying to reload images over the last two hours with everything disconnected and still having no luck.

My next effort is to try the 17 Jun image and see if that helps.

 

Stuart

squiza's picture

Re: Redis-server failing to start

I noted that there was a recent change (20 hours ago at the time of writing this comment) to the way that /var/lib is mounted. I am wondering if this has something to do with it? And I am guessing that during the first boot when the system automatically updates itself that it is picking up this change.

 

Stuart

fluppie007's picture

Re: Redis-server failing to start

I think it's that. I had a working system. Did an update, rebooted and poof, this "error".

Can't connect to redis at localhost:6379 , it may be that redis-server is not
 installed or started see readme for redis installation

Edit - wrapped long line - Moderator, BT

squiza's picture

Re: Redis-server failing to start

OK, so I found that if I went back to the 17 Jun image, all was fine but I prefer the new latest evrsion.

It is definetly related to the new change whereby the /var/lib is being mounted to tmpfs. You can see below the two lines with the - which were replaced with the one line with the +

To workaround, I have disabled the cron job to update every minute which stops this change from being updated to the /etc/fstab file and then edited the /etc/fstab file to reverse the changes made.

EmonCMS comes back to life, I figure that this will have to be done everytime you do an update until this issue is fixed.

 

tmpfs /tmp tmpfs nodev,nosuid,size=30M,mode=1777 0 0
tmpfs /var/log tmpfs nodev,nosuid,size=50M,mode=1777 0 0
-tmpfs /var/lib/dhcp tmpfs nodev,nosuid,size=1M,mode=1777 0 0
-tmpfs /var/lib/openhab tmpfs nodev,nosuid,size=40M,mode=1777 0 0
+tmpfs /var/lib tmpfs nodev,nosuid,size=150M,mode=1777 0 0
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults,noatime,nodiratime 0 2
/dev/mmcblk0p2 / ext4 defaults,ro,noatime,nodiratime,errors=remount-ro 0 1

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.