Call to undefined service on cron run

Created on 1 October 2022, about 2 years ago
Updated 21 December 2023, 12 months ago

Problem/Motivation

When I run cron I receive the following error:
[error] Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "elasticsearch_search_api.sync". in Drupal\Component\DependencyInjection\Container->get() (line 156 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

Steps to reproduce

Install the module and elastic connector. Run cron.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nicxvan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡­Switzerland sir_squall

    Hi,

    i got the same error, but I have php-curl enabled:
    Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "elasticsearch_search_api.sync". in Drupal\Component\DependencyInjection\Container->get() (line 157 of /home/clients/xxx/sites/xxx/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

  • πŸ‡¨πŸ‡­Switzerland sir_squall

    I still have the error, but elasticsearch is working fine, i have this error only when the cron run don't know why

  • πŸ‡ΊπŸ‡ΈUnited States sassafrass

    I have the same issue.

  • πŸ‡¨πŸ‡­Switzerland sir_squall

    I just check the logs and the error is still there:
    Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "elasticsearch_search_api.sync". in Drupal\Component\DependencyInjection\Container->get() (line 159 of ../web/core/lib/Drupal/Component/DependencyInjection/Container.php).

    stracktrace:
    #0 ../web/core/lib/Drupal.php(197): Drupal\Component\DependencyInjection\Container->get('elasticsearch_s...')
    #1 ../web/modules/contrib/elasticsearch_search_api/elasticsearch_search_api.module(124): Drupal::service('elasticsearch_s...')
    #2 ../web/core/lib/Drupal/Core/Cron.php(335): elasticsearch_search_api_cron()
    #3 ../web/core/lib/Drupal/Core/Extension/ModuleHandler.php(395): Drupal\Core\Cron->Drupal\Core\{closure}(Object(Closure), 'elasticsearch_s...')
    #4 ../web/core/lib/Drupal/Core/Cron.php(318): Drupal\Core\Extension\ModuleHandler->invokeAllWith('cron', Object(Closure))
    #5 ../web/core/lib/Drupal/Core/Cron.php(159): Drupal\Core\Cron->invokeCronHandlers()
    #6 ../web/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
    #7 ../web/core/modules/system/src/CronController.php(38): Drupal\Core\ProxyClass\Cron->run()
    #8 [internal function]: Drupal\system\CronController->run()
    #9 ../web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
    #10 ../web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #11 ../web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
    #12 ../web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
    #13 /home/clients/0b0410226929a2217c55e05b2a446931/sites/d9.allnews.ch/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #14 /home/clients/0b0410226929a2217c55e05b2a446931/sites/d9.allnews.ch/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
    #15 ../web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #16 ../web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #17 ../web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #18 ../web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #19 ../web/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #20 ../web/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #21 ../web/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #22 ../web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #23 ../web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #24 ../web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #25 ../web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #26 ../web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #27 ../web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #28 {main}

Production build 0.71.5 2024