Error data in log file

Hi, I created the cron.bat file for scheduler through this post but it doesn’t work and I noticed that since I have created the cron.bat file in suitecrm.log file appears this 2 lines every minute:

Tue Sep 17 09:53:20 2019 [6276][10f8cae7-eefb-87db-7cf1-5d1bb7a9b6ab][ERROR] convert: Conversion of 17/09/2019 00:00 from Y-m-d H:i:s to d/m/Y H:i failed
Tue Sep 17 09:53:39 2019 [6276][10f8cae7-eefb-87db-7cf1-5d1bb7a9b6ab][ERROR] Unable to load related bean by id

What could be the problem?
My version of SuiteCRM is 7.11.7

If you type this in the command line

php -i | grep timezone

is the timezone correct?

If not, please correct it by editing the file show with this other command:

php -i | grep php.ini

In Windows this command doesn’t work, if I go in phpinfo() page the timezone is Europe/Berlin.

The command should work if you are in the directory where php.exe is.

You can find out with

dir \php.exe /s/a 

(this will take a couple of minutes to scan your entire disk, and might turn up more than one answer…)

If you get that information from phpinfo, you are getting the information of your Web server PHP. We need the other one now, from CLI PHP (command-line) which is what runs cron.

I tried it but it give me this error

Sorry but I’m not expert in Windows cmd

You could have told me before that the error was that “grep was not found”, instead of just saying the command didn’t work. That would have saved us some time.

Use just

php -i

and scroll through all the output until you find date.timezone.

Before mooving from the folder that contains the php.exe file the error was this

The “php -i” command give me this about the timezone

It should be correct

Ok, so it’s not a problem with the timezone.

I searched Google for this problem and it seems it’s an old bug. But I don’t think it has any consequences, maybe it’s safe to ignore. What are the actual problems (in functionality, not just log messages) that you are currently facing? Let’s focus on those.

I have 2 problems:
1. after I created the file “cron.bat” the schedulers doesn’t work
2. when I import the call from a csv file the data’s field are not imported correctly (my data dormat is 23/10/2010), for example the data in the csv file is
14/03/2019 and after the import in Suite the data is 03/02/2020 or if the data in the csv file is 01/03/2019 and after the import in Suite the data is 03/01/2020
(it doesn’t work both with custom field and standard field).

About the import:

In the import wizard, step 2, click “View Import File Properties” and see if you can get the dates to import right.

About the error in the schedulers. Please try to isolate which specific scheduler job is breaking. You can do this by going in Admin / Schedulers and selectively disabling some jobs, and seeing which one is getting an error. Note the field “last ran successfully”, that should give you clues.

For the import I solved: you were right, in the import wizard, step 2, in "View Import File Properties there was a wrong data format.

For the schedulers I need to fix the reminders(both email and popup), if I go in the schedulers and I go to the jobs “Send Email Reminder” the field “last run succefully” shows “never”

Can you see any just that has a “last ran successfully” showing a recent time?

I am still not sure if your Schedulers are running, with some of them failing due to errors, or if they are not running at all… :huh:

No, all of the scheduling have the field “last run succesfully” that shows “never”,
so I immagine the scheduler doesn’t work.

Maybe you can find some one to help you locally - just get a batch file to run and call a PHP page. And maybe you can find some clues to the errors in your logs, or in Windows Event Viewer.

But for me, I’m sorry, but it is hard to help you like this, remotely, and without any information… :frowning:

If in the cron.bat I call a PHP page it works, but soon i restore the correct file it doesn’t work with suitecrm’s schedeluers.
The only errors that are in the suitecrm.log are these:

Mon Sep 23 09:59:34 2019 [6672][c79f4347-434c-5ac5-2aea-5d1bb715c125][ERROR] [ElasticSearchIndexer] Failed to index bean to index
Mon Sep 23 09:59:34 2019 [6672][c79f4347-434c-5ac5-2aea-5d1bb715c125][ERROR] [ElasticSearchIndexer] Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php:51
Stack trace:
#0 C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(72): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection()
#1 C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(90): Elasticsearch\Transport->getConnection()
#2 C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Connections\Connection.php(240): Elasticsearch\Transport->performRequest(‘PUT’, ‘/main/Calls/f30…’, Array, ‘{“meta”:{"creat…’, Array)
#3 C:\xampp\htdocs\SuiteCRM\vendor\react\promise\src\FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array)
#4 C:\xampp\htdocs\SuiteCRM\vendor\guzzlehttp\ringphp\src\Future\CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
#5 C:\xampp\htdocs\SuiteCRM\vendor\guzzlehttp\ringphp\src\Core.php(341): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
#6 C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Connections\Connection.php(294): GuzzleHttp\Ring\Core::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
#7 C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Connections\Connection.php(171): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array, Object(Elasticsearch\Connections\Connection), Object(Elasticsearch\Transport), Array)
#8 C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(106): Elasticsearch\Connections\Connection->performRequest(‘PUT’, ‘/main/Calls/f30…’, Array, ‘{“meta”:{"creat…’, Array, Object(Elasticsearch\Transport))
#9 C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Client.php(1578): Elasticsearch\Transport->performRequest(‘PUT’, ‘/main/Calls/f30…’, Array, Array, Array)
#10 C:\xampp\htdocs\SuiteCRM\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Client.php(791): Elasticsearch\Client->performRequest(Object(Elasticsearch\Endpoints\Index))
#11 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchIndexer.php(278): Elasticsearch\Client->index(Array)
#12 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php(179): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->indexBean(Object(Call))
#13 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php(135): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->performAction(Object(Call))
#14 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php(105): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndex(Object(Call))
#15 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php(77): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndexSafe(Object(Call))
#16 C:\xampp\htdocs\SuiteCRM\include\utils\LogicHook.php(272): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->beanSaved(Object(Call), ‘after_save’, ‘’)
#17 C:\xampp\htdocs\SuiteCRM\include\utils\LogicHook.php(213): LogicHook->process_hooks(Array, ‘after_save’, ‘’)
#18 C:\xampp\htdocs\SuiteCRM\data\SugarBean.php(3129): LogicHook->call_custom_logic(‘Calls’, ‘after_save’, ‘’)
#19 C:\xampp\htdocs\SuiteCRM\data\SugarBean.php(2442): SugarBean->call_custom_logic(‘after_save’, ‘’)
#20 C:\xampp\htdocs\SuiteCRM\modules\Calls\Call.php(235): SugarBean->save(false)
#21 C:\xampp\htdocs\SuiteCRM\modules\Calls\CallFormBase.php(430): Call->save(false)
#22 C:\xampp\htdocs\SuiteCRM\modules\Calls\Save.php(54): CallFormBase->handleSave(’’, true, false)
#23 C:\xampp\htdocs\SuiteCRM\include\MVC\View\SugarView.php(834): include_once(‘C:\xampp\htdocs…’)
#24 C:\xampp\htdocs\SuiteCRM\include\MVC\View\views\view.classic.php(72): SugarView->includeClassicFile(‘modules/Calls/S…’)
#25 C:\xampp\htdocs\SuiteCRM\include\MVC\View\SugarView.php(226): ViewClassic->display()
#26 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(435): SugarView->process()
#27 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(375): SugarController->processView()
#28 C:\xampp\htdocs\SuiteCRM\include\MVC\SugarApplication.php(113): SugarController->execute()
#29 C:\xampp\htdocs\SuiteCRM\index.php(52): SugarApplication->execute()
#30 {main}

In the Event viewer it appears to be nothing.

Do you mean to use Elastic Search? If not, can you please disable it?

The docs to enable it are here
You can just go there and turn it off.

No, I am not interested for now to use it. I have enabled it because i had an error in suitecrm.log that now that I have disabled the ElasticSearch it is appeared again.
The error is:

Mon Sep 23 16:58:17 2019 [6672][1][FATAL] [ERROR] Failed to remove bean to index
Mon Sep 23 16:58:17 2019 [6672][1][FATAL] [ERROR] SuiteCRM\Search\Exceptions\SearchException: Elasticsearch trying to re-indexing a bean but indexer is disabled in configuration. in C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php:123
Stack trace:
#0 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php(105): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndex(Object(Reminder_Invitee))
#1 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php(92): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndexSafe(Object(Reminder_Invitee))
#2 C:\xampp\htdocs\SuiteCRM\include\utils\LogicHook.php(272): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->beanDeleted(Object(Reminder_Invitee), ‘after_delete’, Array)
#3 C:\xampp\htdocs\SuiteCRM\include\utils\LogicHook.php(213): LogicHook->process_hooks(Array, ‘after_delete’, Array)
#4 C:\xampp\htdocs\SuiteCRM\data\SugarBean.php(3129): LogicHook->call_custom_logic(‘Reminders_Invit…’, ‘after_delete’, Array)
#5 C:\xampp\htdocs\SuiteCRM\data\SugarBean.php(5269): SugarBean->call_custom_logic(‘after_delete’, Array)
#6 C:\xampp\htdocs\SuiteCRM\modules\Reminders_Invitees\Reminder_Invitee.php(159): SugarBean->mark_deleted(‘ee899958-86ff-0…’)
#7 C:\xampp\htdocs\SuiteCRM\modules\Reminders\Reminder.php(144): Reminder_Invitee::deleteRemindersInviteesMultiple(‘e72eb4fb-d975-6…’)
#8 C:\xampp\htdocs\SuiteCRM\modules\Reminders\Reminder.php(96): Reminder::saveRemindersData(‘Meetings’, ‘bb06a51a-8959-c…’, Array)
#9 C:\xampp\htdocs\SuiteCRM\modules\Meetings\Meeting.php(324): Reminder::saveRemindersDataJson(‘Meetings’, ‘bb06a51a-8959-c…’, ‘[{“idx”:0,“id”:…’)
#10 C:\xampp\htdocs\SuiteCRM\modules\Meetings\MeetingFormBase.php(397): Meeting->save(true)
#11 C:\xampp\htdocs\SuiteCRM\modules\Meetings\Save.php(55): MeetingFormBase->handleSave(’’, true, false)
#12 C:\xampp\htdocs\SuiteCRM\include\MVC\View\SugarView.php(834): include_once(‘C:\xampp\htdocs…’)
#13 C:\xampp\htdocs\SuiteCRM\include\MVC\View\views\view.classic.php(72): SugarView->includeClassicFile(‘modules/Meeting…’)
#14 C:\xampp\htdocs\SuiteCRM\include\MVC\View\SugarView.php(226): ViewClassic->display()
#15 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(435): SugarView->process()
#16 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(375): SugarController->processView()
#17 C:\xampp\htdocs\SuiteCRM\include\MVC\SugarApplication.php(113): SugarController->execute()
#18 C:\xampp\htdocs\SuiteCRM\index.php(52): SugarApplication->execute()
#19 {main}

The error “Failed to remove bean to index” still persist and the scheduler doesn’t work.

That should be fixed in 7.11.8, which version are you running?

If you prefer to apply fix manually:

Currently I am using 7.11.7, but in these days I will do the update.
If the problem persist I will write here

I update Suite to 7.11.8 but the error in log file still persist, I also check the lines of the file \SuiteCRM\lib\Search\ElasticSearch\HelasticSearchHooks.php as the link you shared and they are the same but I don’t know why the error still persist.
This are my lines: