Bug Filed on 04-06-2016: Getting email notifications every minute, can't stop them!

1. What OS? (Wheezy or Jessie) Jessie


2. What class/size SD card? (ex. class 10 16gb) 16gb


3. What Model Pi? (A+, A, B+, B, Pi2) Pi2


4. Please describe the bug / issue. Attaching any relevant screenshots would be very helpful! Thanks in advance.

I have a Raspberry Pi 2 running Jessie . I had installed cayenne to access it remotely using my iPhone. I had also setup a trigger to send me an email if the system was offline. I have since uninstalled cayenne myDevices and deleted the trigger but I am now receiving an email every minute stating:
ā€œmyDevices is running.
webiopi is running.ā€

the subject is ā€œCron root@raspberrypi /etc/myDevices/crontab.shā€

How can I stop these email from coming and flooding my inbox?

I donā€™t have a pi with Cayenne on it right here but you can try ā€œcrontab -eā€ to see if you have anything in crontab. Just wipe out anything Cayenne related if thereā€™s anything in there.

Thanks for the tip. I had already tried that but nothing in there :slight_frown:.

Yikes, okay so hereā€™s what you should be able to do to resolve issue immediately:

sudo rm -rf /etc/myDevices && service myDevices stop

You should also remove the Pi from your account since you deleted Cayenne installation from the Pi.

  • click on the edit icon next to your Pi name in left-side device list.

Curious, how did you uninstall Cayenne?

-B

To ā€œUninstallā€ i used the option on cayenne.mydevices.com. I donā€™t remember the exact wording but when you select the properties for a device it says something like ā€œremove from device, this option can not be undoneā€.

running the above commands changed the email, now the email says:
ā€œ/bin/sh: 1: \etc\myDevices\crontab.shā€ not found"

so it seems to have cleaned up the files but is still generating the emails.

I checked with services --status-all and the myDevices service is no longer listed.

I have changed to configuration to the /etc/ssmtp/ssmtp.conf by comenting out the ā€˜mailhubā€™ as a temporary fix so that it stops sending the emails, but I need it to stop trying to send them. :grin:

Hmm okay.

Did you actually delete the trigger from your trigger setup? Or did you assume that remove the device also removed the associated triggers?

-B

I removed the trigger as well, currently no triggers in my account.

I PMā€™d you for your account info. If itā€™s okay with you, Iā€™ll pass your login credentials to the team so we can take a look.

-B

Yes, already sent.
Thanks.

@rkoutnik Can you turn off your pi and see if the notifications are still received?

No, if the pi is off the emails do not come. I did find the problem though. I had checked with crontab -e and made sure there was nothing there related to myDevices or the issue and there was not. Today I found out that crontab is user specific. So I ran sudo crontab -e and found * / * * * * * /etc/myDevices/crontab.sh
I removed the line and saved the setting, re-ediable the email mailhub and I am no longer getting the alerts.
Thanks for all the help.

You are right, oversight on my part. Should have told you to use sudo.

1 Like

You had the right idea though, thanks.

Hi @rkoutnik,

Just wanted to confirm, you are no longer receiving the emails right?

-B

Yes, the issue was resolved. It seem the uninstall did not remove the task that it had created in the rootā€™s crontab. So when I checked with crontab -e it was not shown, but checking with sudo crontab -e showed the task and I was able to remove it.

Phwew.

We are implementing an uninstall button on the dashboard, so this shouldnā€™t happen again. Thanks for working with us!

-B

I have an almost identical problem, except I started getting an email every minute after I first installed Cayenne (instead of after uninstall). Even though this bug is set as ā€œresolved,ā€ the subject is exactly the issue Iā€™m having. If I should create a new bug/question thread, Iā€™m happy to do so.

The email subject is: ā€œCron root@raspberrypi /etc/myDevices/crontab.shā€
and the content of each email is:
myDevices is running.
webiopi is running.

I restarted my raspberry, no change. In order to stop the emails (other than a possible New Yearā€™s gift), I have changed the crontab from:

          • /etc/myDevices/crontab.sh
            to:
    • 1 1 * /etc/myDevices/crontab.sh

The emails have stopped, but Iā€™m sure that Cayenne must need/expect the crontab.sh to run every minute. Because Iā€™m new to Cayenne, I donā€™t know what might not be working properly now. Iā€™ll leave it this way until I get some feedback about what I should be doing next.

As a semi-newbie, Iā€™m not sure exactly how to find out what Iā€™m running. The Cayenne web page info says ā€œOS: raspbian 7 (debian) Hardware: Model Bā€ but ssh login message says ā€œLinux raspberrypi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux.ā€

What was the event that you scheduled? Weā€™re trying to find root cause here, itā€™s been tough to locate.

-B

Iā€™m going to re-open this bug too.

I didnā€™t have an opportunity to schedule an event or do anything else. I installed Cayenne on my RPi, and the emails immediately started coming in (I received the ā€œmyDevices Cayenne - Install Completeā€ email at 9:02pm and received my first cron email at 9:02pm as well, then every minute thereafter until I could change my crontab). I donā€™t know if it matters, but I have installed a few other packages on RPi (before installing Cayenne) that I use for other projects, including Apache, ssmtp, ouimeaux and node.js.