Jump to content
  • 0

error after applying payment


MDHMatt

Question

10 answers to this question

Recommended Posts

  • 0
22 hours ago, Paul said:

Was the email sent? Did you make any changes to the email template recently? If you made changes to the template and are using undefined tags, or have entered them incorrectly, it can produce an error.

Ive not changed the email templates they are the stock installs. Ive had issues since upgrading to 4.2.2 and php 7.1 :(

Ive watched the logs and it dosen't show any errors when running which is making me assume its sent them. I see no errors in the mail logs either. I did clear out the cron logs in the database and forced a cron run and got this;

Attempting to run all tasks for MDHosting.
Attempting to apply credits to open invoices.
There are no invoices to which credits may be applied.
The apply credits task has completed.
Attempting to deliver invoices scheduled for delivery.
Error: tempnam(): file created in the system's temporary directory #0 [internal function]: UnknownException::setErrorHandler(8, 'tempnam(): file...', '/home/****/...', 179, Array) #1 /home/*/*/billing/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(164): call_user_func(Array, 8, 'tempnam(): file...', '/home/*****/...', 179, Array) #2 [internal function]: Monolog\ErrorHandler->handleError(8, 'tempnam(): file...', '/home/*/...', 179, Array) #3 /home/*/*/billing/vendors/h2o/h2o/loaders.php(179): tempnam('18188455885ad5e...', '') #4 /home/*/*/billing/vendors/h2o/h2o/loaders.php(166): H2o_File_Cache->__construct(Array) #5 /home/*/*/billing/vendors/h2o/h2o/loaders.php(38): h2o_cache(Array) #6 /home/*/*/billing/vendors/h2o/h2o/loaders.php(33): H2o_File_Loader->setOptions(Array) #7 /home/***/*/billing/vendors/h2o/h2o.php(75): H2o_File_Loader->__construct(Array, Array) #8 /home/*/*/billing/app/models/emails.php(902): H2o->__construct() #9 /home/*/*/billing/app/models/emails.php(567): Emails->buildEmail('invoice_deliver...', '1', 'en_uk', Array) #10 /home/*/*/billing/components/invoice_delivery/invoice_delivery.php(162): Emails->send('invoice_deliver...', '1', 'en_uk', 'karenharrison12...', Array, NULL, NULL, Array, Array) #11 /home/****/*/billing/app/controllers/cron.php(1649): InvoiceDelivery->deliverInvoices(Array, 'email', 'karenharrison12...', NULL, Array) #12 /home/*****/*/billing/app/controllers/cron.php(1420): Cron->sendInvoices(Array, Object(stdClass), 'email', 'paid') #13 /home/*/*/billing/app/controllers/cron.php(175): Cron->deliverInvoices('54b100e4c6c54b3...') #14 /home/*/*/billing/app/controllers/cron.php(127): Cron->all('54b100e4c6c54b3...') #15 /home/*/*/billing/vendors/minphp/bridge/src/Lib/Dispatcher.php(143): Cron->index() #16 /home/*/*/billing/index.php(21): Dispatcher::dispatch('/billing/cron/?...') #17 {main}Attempting to provision paid pending services.
The paid pending services task has completed.
Attempting to unsuspend paid suspended services.
The unsuspend services task has completed.
Attempting to cancel scheduled services.
The cancel scheduled services task has completed.
Attempting to process service changes.
The process service changes task has completed.
Attempting to process renewing services.
Renewed service #6 for client 1505.
Renewed service #9 for client 1502.
The process renewing services task has completed.
Attempting to update exchange rates.
Exchange rates were updated successfully.
The exchange rates task has completed.
Attempting plugin cron for order accept_paid_orders.
Finished plugin cron for order accept_paid_orders.
Attempting plugin cron for support_manager poll_tickets.
Finished plugin cron for support_manager poll_tickets.
Attempting plugin cron for support_manager close_tickets.
Finished plugin cron for support_manager close_tickets.
Attempting plugin cron for mass_mailer export.
Finished plugin cron for mass_mailer export.
Attempting plugin cron for mass_mailer mass_mail.
Finished plugin cron for mass_mailer mass_mail.
Attempting to clean up old logs.
0 old Gateway logs have been deleted.
0 old Module logs have been deleted.
The clean logs task has completed.
All tasks have been completed.
Attempting to run all system tasks.
Attempting to validate the license.
The license validation task has completed.
Attempting to backup the database to AmazonS3.
The backup completed successfully.
The AmazonS3 database backup task has completed.
Attempting to backup the database via SFTP.
exec() has been disabled for security reasons
The SFTP database backup task has completed.
All system tasks have been completed.

 

Link to comment
Share on other sites

  • 0
1 hour ago, MDHMatt said:

Ive not changed the email templates they are the stock installs. Ive had issues since upgrading to 4.2.2 and php 7.1 :(

Ive watched the logs and it dosen't show any errors when running which is making me assume its sent them. I see no errors in the mail logs either. I did clear out the cron logs in the database and forced a cron run and got this;


Attempting to run all tasks for MDHosting.
Attempting to apply credits to open invoices.
There are no invoices to which credits may be applied.
The apply credits task has completed.
Attempting to deliver invoices scheduled for delivery.
Error: tempnam(): file created in the system's temporary directory #0 [internal function]: UnknownException::setErrorHandler(8, 'tempnam(): file...', '/home/****/...', 179, Array) #1 /home/*/*/billing/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(164): call_user_func(Array, 8, 'tempnam(): file...', '/home/*****/...', 179, Array) #2 [internal function]: Monolog\ErrorHandler->handleError(8, 'tempnam(): file...', '/home/*/...', 179, Array) #3 /home/*/*/billing/vendors/h2o/h2o/loaders.php(179): tempnam('18188455885ad5e...', '') #4 /home/*/*/billing/vendors/h2o/h2o/loaders.php(166): H2o_File_Cache->__construct(Array) #5 /home/*/*/billing/vendors/h2o/h2o/loaders.php(38): h2o_cache(Array) #6 /home/*/*/billing/vendors/h2o/h2o/loaders.php(33): H2o_File_Loader->setOptions(Array) #7 /home/***/*/billing/vendors/h2o/h2o.php(75): H2o_File_Loader->__construct(Array, Array) #8 /home/*/*/billing/app/models/emails.php(902): H2o->__construct() #9 /home/*/*/billing/app/models/emails.php(567): Emails->buildEmail('invoice_deliver...', '1', 'en_uk', Array) #10 /home/*/*/billing/components/invoice_delivery/invoice_delivery.php(162): Emails->send('invoice_deliver...', '1', 'en_uk', 'karenharrison12...', Array, NULL, NULL, Array, Array) #11 /home/****/*/billing/app/controllers/cron.php(1649): InvoiceDelivery->deliverInvoices(Array, 'email', 'karenharrison12...', NULL, Array) #12 /home/*****/*/billing/app/controllers/cron.php(1420): Cron->sendInvoices(Array, Object(stdClass), 'email', 'paid') #13 /home/*/*/billing/app/controllers/cron.php(175): Cron->deliverInvoices('54b100e4c6c54b3...') #14 /home/*/*/billing/app/controllers/cron.php(127): Cron->all('54b100e4c6c54b3...') #15 /home/*/*/billing/vendors/minphp/bridge/src/Lib/Dispatcher.php(143): Cron->index() #16 /home/*/*/billing/index.php(21): Dispatcher::dispatch('/billing/cron/?...') #17 {main}Attempting to provision paid pending services.
The paid pending services task has completed.
Attempting to unsuspend paid suspended services.
The unsuspend services task has completed.
Attempting to cancel scheduled services.
The cancel scheduled services task has completed.
Attempting to process service changes.
The process service changes task has completed.
Attempting to process renewing services.
Renewed service #6 for client 1505.
Renewed service #9 for client 1502.
The process renewing services task has completed.
Attempting to update exchange rates.
Exchange rates were updated successfully.
The exchange rates task has completed.
Attempting plugin cron for order accept_paid_orders.
Finished plugin cron for order accept_paid_orders.
Attempting plugin cron for support_manager poll_tickets.
Finished plugin cron for support_manager poll_tickets.
Attempting plugin cron for support_manager close_tickets.
Finished plugin cron for support_manager close_tickets.
Attempting plugin cron for mass_mailer export.
Finished plugin cron for mass_mailer export.
Attempting plugin cron for mass_mailer mass_mail.
Finished plugin cron for mass_mailer mass_mail.
Attempting to clean up old logs.
0 old Gateway logs have been deleted.
0 old Module logs have been deleted.
The clean logs task has completed.
All tasks have been completed.
Attempting to run all system tasks.
Attempting to validate the license.
The license validation task has completed.
Attempting to backup the database to AmazonS3.
The backup completed successfully.
The AmazonS3 database backup task has completed.
Attempting to backup the database via SFTP.
exec() has been disabled for security reasons
The SFTP database backup task has completed.
All system tasks have been completed.

 

are you on shared hosting? because it appears some php functions required by blesta aka exec(),etc has been disabled on that shared hosting server, which would explain why you are having issues.

Link to comment
Share on other sites

  • 0
5 hours ago, timnboys said:

are you on shared hosting? because it appears some php functions required by blesta aka exec(),etc has been disabled on that shared hosting server, which would explain why you are having issues.

Nope its on my own dedicated system with cpanel licence. Ive just been playing about with phpmyadmin looking for instances of the invoice for the named details above. Turns out the cron job is trying to send a invoice that id set not to send and was closed off ages ago. Looking in the database the invoice sent date was Null, modified it to the day after generated and cleared the cron logs. re ran cron and all is clear?

Should invoices sent to do not send be tying to send??
 

@Paul is there a way to clear the cron logs database after x time? mine had got over 30mb and over 1000 pages! surely cron logs from 6 month ago are not relevent anymore

Link to comment
Share on other sites

  • 0
18 minutes ago, MDHMatt said:

Nope its on my own dedicated system with cpanel licence. Ive just been playing about with phpmyadmin looking for instances of the invoice for the named details above. Turns out the cron job is trying to send a invoice that id set not to send and was closed off ages ago. Looking in the database the invoice sent date was Null, modified it to the day after generated and cleared the cron logs. re ran cron and all is clear?

Should invoices sent to do not send be tying to send??
 

@Paul is there a way to clear the cron logs database after x time? mine had got over 30mb and over 1000 pages! surely cron logs from 6 month ago are not relevent anymore

The cron log is rotated out automatically. Check your rotation policy at Settings > System > Basic Setup. Also check that the automation task "Clean up Logs" is scheduled to run under Settings > Company > Automation.

Since the cron runs every 5 minutes, and there are many tasks to process, it's normal for there to be a lot of records. Just don't arbitrarily delete things, the system relies on the existence of certain logs in the way it schedules/processes things, and manually deleting things can cause things to run in-duplicate.

Link to comment
Share on other sites

  • 0

@Paul @timnboys so ive tried sending an invoice today and im still getting the same error. its failing when trying to send the invoices, i have a feeling that its something to do with where its saving the temp file. I have the blesta temp dir set to /home/username/billing/tmp and is fully writable but it seems to be failing and trying to write to the system /tmp which looking at the docs is what its meant to do.

The invoice is created fine its just struggling to send them??? 

Link to comment
Share on other sites

  • 0
9 hours ago, MDHMatt said:

@Paul @timnboys so ive tried sending an invoice today and im still getting the same error. its failing when trying to send the invoices, i have a feeling that its something to do with where its saving the temp file. I have the blesta temp dir set to /home/username/billing/tmp and is fully writable but it seems to be failing and trying to write to the system /tmp which looking at the docs is what its meant to do.

The invoice is created fine its just struggling to send them??? 

Have you checked the permissions making sure apache or nginx whatever server software you use has write access to it? As you can check using ls -l /tmp && chown -R apache:apache /tmp && chown -R apache:apache /home/username/billing that is the command for centos it us the same for ubuntu except you replace apache with www-data 

That command will output the long listing of the directory including which user owns it and then chowns or changes ownership of the entire directory including subdirectorys including files and should fix the permissions issue

Link to comment
Share on other sites

  • 0
27 minutes ago, MDHMatt said:

@Paul @timnboys so i just tried switching from php 7.1 down to php 7 and it worked without a hitch! any tests i can do to test my php7.1 install

did you also disable selinux if you have it on your linux distro? as I have known selinux to cause multiple issues like this including blocking licensing calls,etc 

as selinux is such a pain that by default if any process tries to write to any directory, it stops it

the best way to test is do this

setenforce 0

getenforce => "permissive"

once it states permissive, you should be able to try again and if it fixes that, hey selinux was your problem.

of course those commands might be specific to centos though, as I don't know if ubuntu or any other non rpm based distro has selinux though.

like I said could be selinux being picky as usual.

then again seems related to h20 php parser:

https://github.com/speedmax/h2o-php/issues/84

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...