Jump to content
  • 0

Error when sending client an email.


coreyman

Question

So I noticed I was getting a white screen when sending a client an email from the link on their profile page. https://billing.xxx.com/admin/clients/email/11/ I enabled error logging and it complained about not being able to write to general-notice-* so I fixed permissions on there. Inside this file is the following -

[2018-12-07 14:50:01] general.NOTICE: E_NOTICE: tempnam(): file created in the system's temporary directory {"code":8,"message":"tempnam(): file created in the system's temporary directory","file":"/var/www/xxx/vendors/h2o/h2o/loaders.php","line":179}

 Something went wrong.

tempnam(): file created in the system's temporary directory

 

I went to the file created in /tmp and it is blank. The email does not send to the client. Oddly enough, the mass mail is working. I also checked the following logs and didn't find anything interesting -

 

/var/log/messages

Dec  6 12:22:45 billing kernel: [  131.527370] random: 7 urandom warning(s) missed due to ratelimiting
Dec  7 06:25:02 billing liblogging-stdlog:  [origin software="rsyslogd" swVersion="8.24.0" x-pid="326" x-info="http://www.rsyslog.com"] rsyslogd was HUPed

/var/log/apache2/error.log

[Fri Dec 07 06:25:03.296078 2018] [mpm_event:notice] [pid 402:tid 139740527572160] AH00489: Apache/2.4.25 (Debian) OpenSSL/1.0.2l configured -- resuming normal operations
[Fri Dec 07 06:25:03.296123 2018] [core:notice] [pid 402:tid 139740527572160] AH00094: Command line: '/usr/sbin/apache2'

/var/log/apache2/access.log

xx.xxx.x.xxx - - [07/Dec/2018:09:02:47 -0600] "POST /admin/clients/email/11/ HTTP/1.1" 200 1018 "https://billing.xxxx.com/admin/clients/email/11/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"

/var/log/php7.1-fpm.log

[06-Dec-2018 12:19:11] NOTICE: Terminating ...
[06-Dec-2018 12:19:11] NOTICE: exiting, bye-bye!
[06-Dec-2018 12:20:36] NOTICE: fpm is running, pid 341
[06-Dec-2018 12:20:36] NOTICE: ready to handle connections
[06-Dec-2018 12:20:36] NOTICE: systemd monitor interval set to 10000ms

All temporary files created today are 0 bytes.

-rw-------  1 www-data www-data    0 Dec  7 08:46 2QJW6O
-rw-------  1 www-data www-data    0 Dec  7 08:49 9smxqF
drwxrwxrwt  2 root     root     4096 Dec  6 12:20 .font-unix
drwxrwxrwt  2 root     root     4096 Dec  6 12:20 .ICE-unix
-rw-------  1 www-data www-data    0 Dec  7 08:47 Px1mrH
drwx------  3 root     root     4096 Dec  6 12:20 systemd-private-c67d225481514f8c98b3e6de18b4ca44-apache2.service-4uzAF7
drwx------  3 root     root     4096 Dec  6 12:20 systemd-private-c67d225481514f8c98b3e6de18b4ca44-systemd-timesyncd.service-zPBdFo
drwxrwxrwt  2 root     root     4096 Dec  6 12:20 .Test-unix
-rw-------  1 www-data www-data    0 Dec  7 08:33 vgH0r1
drwxrwxrwt  2 root     root     4096 Dec  6 12:20 .X11-unix
drwxrwxrwt  2 root     root     4096 Dec  6 12:20 .XIM-unix
-rw-------  1 www-data www-data    0 Dec  7 08:50 ZhERpV

 

Anyone have any ideas?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Hey @coreyman its good to see you on blesta i actually recently started using blesta(although i am still not ready for any production yet) i think the error is related to your php binaries i had the same error on CWP around one and a half years ago though it got fixed by recompiling the php from scratch. I have no solid proof that this is the problem with php or something is messed with the php directories.

Link to comment
Share on other sites

  • 0
30 minutes ago, TrK said:

Hey @coreyman its good to see you on blesta i actually recently started using blesta(although i am still not ready for any production yet) i think the error is related to your php binaries i had the same error on CWP around one and a half years ago though it got fixed by recompiling the php from scratch. I have no solid proof that this is the problem with php or something is messed with the php directories.

I'd rather not build PHP from scratch and use the packages provided by debian. If I knew what the problem was I could fix it, but the error is very cryptic.

Link to comment
Share on other sites

  • 0

Make sure the directories under Settings > System > General > Basic Setup in Blesta are correct and writable.

If you're not on at least Blesta v4.4.0, you should be since that tempnam notice was updated in that version per CORE-2818 for php 7.2. The H2o library will now specifically write to the system temp directory on its own. The email probably did not send because the H2o library could not save that cache file to the system temp directory and use it to perform the email tag replacement.

Link to comment
Share on other sites

  • 0
29 minutes ago, Tyson said:

Make sure the directories under Settings > System > General > Basic Setup in Blesta are correct and writable.

If you're not on at least Blesta v4.4.0, you should be since that tempnam notice was updated in that version per CORE-2818 for php 7.2. The H2o library will now specifically write to the system temp directory on its own. The email probably did not send because the H2o library could not save that cache file to the system temp directory and use it to perform the email tag replacement.

I did check Settings > System > General > Basic Setup prior to posting and they are writable. (Check image below).

Quote

the H2o library could not save that cache file to the system temp directory and use it to perform the email tag replacement.

Why would the H2o library not be able to save to /tmp ? It seems to be creating files there that are 0 bytes. This is a fresh debian stretch install. Here is the file it just created when I tried to send a mail -

-rw-------  1 www-data www-data    0 Dec  7 12:27 wONG5v

 

blestaWritable.PNG

Link to comment
Share on other sites

  • 0
49 minutes ago, Paul said:

You could be unable to write to /tmp/ if it's full, or you have quotas and have reached quota.

Not running any type of quota.

root@billing:/tmp# du -ah
4.0K    ./.XIM-unix
0       ./PDNr4K
0       ./7Ufyx7
4.0K    ./.Test-unix
0       ./wONG5v
0       ./3vrMpN
0       ./MclWBS
0       ./nycUFr
4.0K    ./.ICE-unix
0       ./zrWW0n
4.0K    ./.X11-unix
4.0K    ./.font-unix
24K     .
root@billing:/tmp# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            236M     0  236M   0% /dev
tmpfs            50M  3.5M   46M   8% /run
/dev/vda1        49G  3.1G   43G   7% /
tmpfs           247M     0  247M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           247M     0  247M   0% /sys/fs/cgroup
tmpfs            50M     0   50M   0% /run/user/0

 

Link to comment
Share on other sites

  • 0
2 hours ago, coreyman said:

I just upgraded to 4.4.1 and... so this magically works in 4.4.1 now? Weird!

(I thought I had selected the latest version from the files area, but was confused and thought 4.3.2 was the latest because it is on the bottom right.)

That's unusual. Latest version is always posted on https://www.blesta.com big download button.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...