Announcement

Collapse
No announcement yet.

Catchable fatal error with crontab

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Catchable fatal error with crontab

    Hello,

    I recently installed Espo which is a great solution for us. I'm trying to setup the crontab but it doesn't work.
    If i try to run cron.php through ssh i also get the errors:

    PHP Catchable fatal error: Argument 1 passed to Espo\Core\Container::get() must be an instance of Espo\Core\string, string given, called in /volume1/web/EspoCRM/application/Espo/Core/Application.php on line 48 and defined in /volume1/web/EspoCRM/application/Espo/Core/Container.php on line 41

    Catchable fatal error: Argument 1 passed to Espo\Core\Container::get() must be an instance of Espo\Core\string, string given, called in /volume1/web/EspoCRM/application/Espo/Core/Application.php on line 48 and defined in /volume1/web/EspoCRM/application/Espo/Core/Container.php on line 41

    Is this a bug in Espo?

    Regards,

    Ronnie

  • #2
    Hello Ronnie,
    I can't reproduce. Everything works good.
    Did you keep all requirements upon installing EspoCRM and configuring cron?
    https://www.espocrm.com/documentatio...configuration/.
    What php version do you use?
    Please check the system requirements in Administration -> System Requirements.

    Comment


    • #3
      Hello Maximus,

      I did keep all requirements during install as described in de document.
      The PHP version is 7.3.7 and all System requirements are succesfull (see attached photo).

      I installed Espo on a Synology with the webstation package installed.
      Everything runs great except the mail import function.
      Mail accounts are configured and the test says ok, but no mail is imported in Espo.
      Is there a way to manually start the mail import just to check if this works?
      Any other tips/advice that i can try?

      Regards,
      Ronnie

      Comment


      • #4
        Is there a way to manually start the mail import just to check if this works?
        To start cron manually 1 time you need to run this command in the terminal:
        Code:
        php cron.php
        Cron should be configured for the web server user (e.g. http). Please check in the Synology official documentation of how you can do this.

        Comment


        • #5
          I found out through another post on this forum that i should use:
          php73 cron.php

          Now i don't get the error.
          But still nothing seems to happen.
          I don't see any new mail in Espo
          When i test the email settings it says the connection is ok.

          What am i doing wrong?

          Regards,
          Ronnie

          Comment


          • #6
            > I found out through another post on this forum that I should use: php73 cron.php.
            > But still nothing seems to happen.
            When you run cron by this command it runs cron only one time. I think there were a lot of jobs with pending status, and per one time cron has executed only part of them.
            Please go to Administration -> Scheduled Jobs -> Jobs. After, run php73 cron.php command for a few times. Reload a web page and take a look on jobs status (whether the status was changed from pending to successful). Also, check whether emails were fetched by IMAP.

            Please check please what PHP version is using for CLI. Run this command in the terminal
            Code:
            php -v

            Comment


            • #7
              I checked the scheduled jobs and they all say Active.
              I ran php73 cron.php several times, but nothing changes.
              They all stay at active.

              The PHP version of the cli is 5.6.11 (???)
              Could this be the problem?

              If i run php56 cron.php i get the error mentioned in this post earlier.

              Comment


              • #8
                >I checked the scheduled jobs and they all say Active.
                That's you have checked Administration -> Scheduled Jobs. I need you to check in the Administration -> Scheduled Jobs -> Jobs (see screenshots).
                You have php v.5.6.11. I think this is a problem because cron is using php cli version, not that one you have on your web server. Change it to 7.3.7.
                Attached Files

                Comment


                • #9
                  Aha, When i go to Jobs i get a long list of pending jobs.
                  All named Stream: controlFollowersJob
                  Dates and time seem to be random

                  Comment


                  • #10
                    But have you tried to start cron manually for a few times and checked jobs status?
                    Have you already changed PHP CLI version to 7.3?

                    Comment


                    • #11
                      I did, nothing happens.
                      But i think i found the possible cause of the problem(s).

                      Earlier you send me a link for the requirements.
                      It seems that some permissions aren't set correctly.
                      The logs are showing some permission denied errors.

                      I will try to set this correct first to see if the problems are resolved.

                      Will let you know

                      Comment


                      • #12
                        Applied the permissions as described in the article. Now cronjobs run correctly and emails are received.
                        Thanks for the support!

                        Comment

                        Working...
                        X