Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion Debian/Ubuntu
  • Search

Problem with "internal" mails (crontab,backup...)

Debian/Ubuntu related topics
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
kobo1d
Posts: 47
Joined: Sun Nov 27, 2016 7:59 pm

Problem with "internal" mails (crontab,backup...)
  • Quote

Post by kobo1d » Sun Nov 27, 2016 8:32 pm

hello.

when i create backups, the process works, but the status-email wont get sent.
this is how my backup-log looks in the end:

Code: Select all

2016-11-27 20:50:02 Size: 1 Mb
2016-11-27 20:50:02 Runtime: 1 minute
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
exim: can't get the current working directory: No such file or directory
i also noticed that the server is running about a week and i never got a single cron notification mail.
so i guess its broken there too, but theres not log for it. (notificatiosn are turned on)

BUT, when i create new users, those emails are sent and recieved. no problems there!

is sending vestacp also mails when it is updating itself?! or any more situations which i could test?

thanks!
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Problem with "internal" mails (crontab,backup...)
  • Quote

Post by mehargags » Mon Nov 28, 2016 6:05 am

Please Please Please state your OS and version when reporting a problem. If it is Ubuntu, I guess this can be problem with $VESTA global variable not populated as @ScIT reported in the other thread here Can't login to vesta after upgrade to V17
Top

kobo1d
Posts: 47
Joined: Sun Nov 27, 2016 7:59 pm

Re: Problem with "internal" mails (crontab,backup...)
  • Quote

Post by kobo1d » Mon Nov 28, 2016 6:20 am

i am using debian 8 & "echo $VESTA" replies: "/usr/local/vesta"
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Problem with "internal" mails (crontab,backup...)
  • Quote

Post by mehargags » Mon Nov 28, 2016 8:13 am

do echo as user "admin" or the VestaCP user you are using to make sure the value is there

so su as the user and then echo

I found some similar threads that may help

viewtopic.php?t=9401
viewtopic.php?f=10&t=6651&start=10#p26993

I also suggest you
Delete /usr/local/vesta/data/queue/backup.pipe
Truncate your /usr/local/vesta/log/backup.log
then reboot your server once to see if the problem persists when you run a backup. Tail /usr/local/vesta/log/backup.log for fresh errors
Top

kobo1d
Posts: 47
Joined: Sun Nov 27, 2016 7:59 pm

Re: Problem with "internal" mails (crontab,backup...)
  • Quote

Post by kobo1d » Mon Nov 28, 2016 2:56 pm

hey. thanks for your help, but i didnt get it working yet.

i did "su admin", which didnt work first, because i had the chroot settings wrong.
after allowing admin to login and echo vesta, it gives me the same replie as root:
/usr/local/vesta

i checked the pages you linked, but i didnt really understand that mysql problem.
looking at my sql or backup log doesnt show me any mysql-errors like those.

also i unziped the backup and all files are there and not corrupted.
its really just the mail, which wont get send, in the end.


any more ideas plz?!
Top

kobo1d
Posts: 47
Joined: Sun Nov 27, 2016 7:59 pm

Re: Problem with "internal" mails (crontab,backup...)
  • Quote

Post by kobo1d » Mon Nov 28, 2016 3:04 pm

if it helps, i can share some of my research facts.

the part where user gets created inside vesta and then get mailed the details, looks like this:

/usr/local/vestacp/web/add/user/index.php

Code: Select all

    // Send email to the new user
    if ((empty($_SESSION['error_msg'])) && (!empty($v_notify))) {
        $to = $_POST['v_notify'];
        $subject = _translate($_POST['v_language'],"Welcome to Vesta Control Panel");
        $hostname = exec('hostname');
        unset($output);
        $from = _translate($_POST['v_language'],'MAIL_FROM',$hostname);
        if (!empty($_POST['v_fname'])) {
            $mailtext = _translate($_POST['v_language'],'GREETINGS_GORDON_FREEMAN',$_POST['v_fname'],$_POST['v_lname']);
        } else {
            $mailtext = _translate($_POST['v_language'],'GREETINGS');
        }
        $mailtext .= _translate($_POST['v_language'],'ACCOUNT_READY',$_SERVER['HTTP_HOST'],$_POST['v_username'],$_POST['v_password']);
        send_email($to, $subject, $mailtext, $from);
    }
this code works. but i cant find any web files about adding/creating backups.
the only code about it, is directly inside the bash script:

/usr/local/vestacp/bin/v-backup-user

Code: Select all

cat $BACKUP/$user.log |$SENDMAIL -s "$subj" $email $notify
this above code looks like its not working. when i temporary remove this line, there are no more errors in the log!
(but of course also no mail)

dunno if that helped...


*edit* sending mails with sendmail from console works, when i tried it manually.
Top

kobo1d
Posts: 47
Joined: Sun Nov 27, 2016 7:59 pm

Re: Problem with "internal" mails (crontab,backup...)
  • Quote

Post by kobo1d » Tue Nov 29, 2016 2:08 pm

further reasearch brought me to this:
This error is usually caused by running a command from a directory that no longer exist.

Try changing your directory and re-run the command.
addin a "pwd" command in the shell script before the sendmail command, returns this:

Code: Select all

/backup/tmp.CkmYvp4pdN
and its definitly the problem, because this directory doesnt exist anymore at the moment,
when sendmail command is executed.

adding a "cd /backup" before the sendmail command then finally fixed it :-)
2016-11-29 15:05:01 Local: /backup/admin.2016-11-29.tar
2016-11-29 15:05:01 Size: 1 Mb
2016-11-29 15:05:01 Runtime: 1 minute
/backup/tmp.XeVtfBjspX
/backup

i am going to report this to the bugtracker now!

https://github.com/serghey-rodin/vesta/issues/965
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Problem with "internal" mails (crontab,backup...)
  • Quote

Post by mehargags » Tue Nov 29, 2016 5:57 pm

may be silly... but did you check you SPAM folder of your mailbox ? maybe the mail is being stuck there.

Also invesitgate youe EXIM queue, see if the mails are frozen there.
Exim -bp to check mailqueue

then spot the mails if they are stuck in the queue

check Exim Cheatsheet
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Debian/Ubuntu”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password