dongyi1111 2019-02-19 18:41
浏览 305

INFO放弃了:cocorico进入FATAL状态,太多开始重试太快

For weeks I have had this same error:

INFO gave up: cocorico entered FATAL state, too many start retries too quickly

When I try to run cocorico with docker I get these errors as follows:

usermod: no changes
2019-02-19 17: 21: 32,530 CRIT Supervisor running as root (no user in config file)
2019-02-19 17: 21: 32,530 INFO Included extra file "/etc/supervisord.d/cocorico.conf" during parsing
2019-02-19 17: 21: 32,530 INFO included extra file "/etc/supervisord.d/mongo.conf" during parsing
2019-02-19 17: 21: 32,530 INFO Included extra file "/etc/supervisord.d/mysql.conf" during parsing
2019-02-19 17: 21: 32,644 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2019-02-19 17: 21: 32,667 INFO supervisord started with pid 10
2019-02-19 17: 21: 33,671 INFO spawned: 'cocorico' with pid 13
2019-02-19 17: 21: 33,681 INFO spawned: 'mongo' with pid 14
2019-02-19 17: 21: 33,688 INFO spawned: 'mysql' with pid 15
2019-02-19 17: 21: 35,308 INFO success: cocorico entered RUNNING state, process has stayed up for> than 1 seconds (startsecs)
2019-02-19 17: 21: 35,308 INFO success: mongo entered RUNNING state, process has stayed up for> than 1 seconds (startsecs)
2019-02-19 17: 21: 35,308 INFO success: mysql entered RUNNING state, process has stayed up for> than 1 seconds (startsecs)
2019-02-19 17: 24: 57,891 INFO exited: cocorico (exit status 1; not expected)
2019-02-19 17: 24: 58,946 INFO spawned: 'cocorico' with pid 1013
2019-02-19 17: 24: 59,589 INFO exited: cocorico (exit status 1; not expected)
2019-02-19 17: 25: 00,594 INFO spawned: 'cocorico' with pid 1026
2019-02-19 17:25: 01,224 INFO exited: cocorico (exit status 1; not expected)
2019-02-19 17: 25: 03,229 INFO spawned: 'cocorico' with pid 1039
2019-02-19 17:25: 03,882 INFO exited: cocorico (exit status 1; not expected)
2019-02-19 17: 25: 06,889 INFO spawned: 'cocorico' with pid 1052
2019-02-19 17:25: 07,520 INFO exited: cocorico (exit status 1; not expected)
2019-02-19 17:25: 08,522 INFO gave up: cocorico entered FATAL state, too many start retries too quickly

I can not find the error. My system:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION=”Ubuntu 18.04.2 LTS”

My frontend in localhost work normally

But admin area not run I'm receiving this error in http://localhost/admin/login:

symfony exception detected / symfony 4

Warning: get_class() expects parameter 1 to be object, null given 500 Internal Server Error - ContextErrorException

Stack Trace in src/Cocorico/ReviewBundle/Security/Voter/ReviewVoter.php at line 50


    public function vote(TokenInterface $token, $booking, array $attributes)
    {
        // check if class of this object is supported by this voter
        if (!$this->supportsClass(get_class($booking))) {
            return VoterInterface::ACCESS_ABSTAIN;
        }
    ```
    RESUMED ALL:

    Stack Trace
    in

    ```
     1 - src/Cocorico/ReviewBundle/Security/Voter/ReviewVoter.php at line 50   + 

    2 - at ErrorHandler ->handleError ('2', 'get_class() expects parameter 1 to be object, null given', '/cocorico/src/Cocorico/ReviewBundle/Security/Voter/ReviewVoter.php', '50', array('token' => object(AnonymousToken), 'booking' => null, 'attributes' => array('ROLE_ADMIN'))) 

    3 - at get_class (null) 
    in src/Cocorico/ReviewBundle/Security/Voter/ReviewVoter.php at line 50 +
        public function vote(TokenInterface $token, $booking, array $attributes)
        {
            // check if class of this object is supported by this voter
            if (!$this->supportsClass(get_class($booking))) {
                return VoterInterface::ACCESS_ABSTAIN;
            }

    4 - at ReviewVoter ->vote (object(AnonymousToken), null, array('ROLE_ADMIN')) 
    in app/cache/dev/classes.php at line 2870 +
    $grant = 0;
    foreach ($attributes as $attribute) {
    foreach ($this->voters as $voter) {
    $result = $voter->vote($token, $object, array($attribute));
    switch ($result) {
    case VoterInterface::ACCESS_GRANTED:
    ++$grant;

    5 - at AccessDecisionManager ->decideUnanimous (object(AnonymousToken), array('ROLE_ADMIN'), null) 
    in app/cache/dev/classes.php at line 2797 +
    }
    public function decide(TokenInterface $token, array $attributes, $object = null)
    {
    return $this->{$this->strategy}($token, $attributes, $object);
    }
    public function supportsAttribute($attribute)
    {

    6 - at AccessDecisionManager ->decide (object(AnonymousToken), array('ROLE_ADMIN'), null) 
    in app/cache/dev/classes.php at line 2925   + 
    if (!is_array($attributes)) {
    $attributes = array($attributes);
    }
    return $this->accessDecisionManager->decide($token, $attributes, $object);
    }
    }
    }

    7 - at AuthorizationChecker ->isGranted (array('ROLE_ADMIN'), null) 
    in vendor/symfony/symfony/src/Symfony/Component/Security/Core/SecurityContext.php at line 102   +

    8 - at SecurityContext ->isGranted ('ROLE_ADMIN') 
    in vendor/sonata-project/user-bundle/Controller/AdminSecurityController.php at line 61   + 
         ? $this->container->get('form.csrf_provider')->generateCsrfToken('authenticate')
                : null;
            if ($this->container->get('security.context')->isGranted('ROLE_ADMIN')) {
                $refererUri = $request->server->get('HTTP_REFERER');
                return new RedirectResponse($refererUri && $refererUri != $request->getUri() ? $refererUri : $this->container->get('router')->generate('sonata_admin_dashboard'));

    9 - at AdminSecurityController ->loginAction () 

    10 - at call_user_func_array (array(object(AdminSecurityController), 'loginAction'), array()) 
    in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 139   + 
            $arguments = $this->resolver->getArguments($request, $controller);
            // call controller
            $response = call_user_func_array($controller, $arguments);
            // view
            if (!$response instanceof Response) {

    11 - at HttpKernel ->handleRaw (object(Request), '1') 
    in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 62   + 
            $request->headers->set('X-Php-Ob-Level', ob_get_level());
            try {
                return $this->handleRaw($request, $type);
            } catch (\Exception $e) {
                if (false === $catch) {
                    $this->finishRequest($request, $type);

    12 - at HttpKernel ->handle (object(Request), '1', true) 
    in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php at line 69   + 
          $this->container->set('request', $request, 'request');
            try {
                $response = parent::handle($request, $type, $catch);
            } catch (\Exception $e) {
                $this->container->set('request', null, 'request');
                $this->container->leaveScope('request');

    13 - at ContainerAwareHttpKernel ->handle (object(Request), '1', true) 
    in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php at line 185   + 
                $this->boot();
            }
            return $this->getHttpKernel()->handle($request, $type, $catch);
        }
        /**

    14 - at Kernel ->handle (object(Request)) 
    in web/app_dev.php at line 30   + 
    $kernel = new AppKernel('dev', true);
    $kernel->loadClassCache();
    $request = Request::createFromGlobals();
    $response = $kernel->handle($request);
    $response->send();
    $kernel->terminate($request, $response);


Logs - 1 error


    INFO - The Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead. 
    INFO - The Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead. 
    INFO - Matched route "sonata_user_admin_security_login". 
    INFO - Populated the TokenStorage with an anonymous Token. 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Lexik\Bundle\CurrencyBundle\EventListener\LocaleListener::setCurrencyFormatterLocale". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\TranslatorListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Cocorico\CoreBundle\Listener\UserTypeCookieListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Knp\Bundle\MenuBundle\EventListener\VoterInitializerListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "SimpleThings\EntityAudit\Request\CurrentUserListener::handle". 
    INFO - The Sonata\UserBundle\Controller\AdminSecurityController class extends Symfony\Component\DependencyInjection\ContainerAware that is deprecated since version 2.8, to be removed in 3.0. Use the ContainerAwareTrait instead. 
    DEBUG - Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\SecurityListener::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController". 
    INFO - The "security.context" service is deprecated since Symfony 2.6 and will be removed in 3.0. 
    INFO - The Symfony\Component\Security\Core\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage or Symfony\Component\Security\Core\Authorization\AuthorizationChecker instead. 
    INFO - The "form.csrf_provider" service is deprecated since Symfony 2.4 and will be removed in 3.0. Use the "security.csrf.token_manager" service instead. 
    INFO - The Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfTokenManagerAdapter::generateCsrfToken method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead. 
    CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Warning: get_class() expects parameter 1 to be object, null given" at /cocorico/src/Cocorico/ReviewBundle/Security/Voter/ReviewVoter.php line 50 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Lexik\Bundle\CurrencyBundle\EventListener\LocaleListener::setCurrencyFormatterLocale". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\TranslatorListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Cocorico\CoreBundle\Listener\UserTypeCookieListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "Knp\Bundle\MenuBundle\EventListener\VoterInitializerListener::onKernelRequest". 
    DEBUG - Notified event "kernel.request" to listener "SimpleThings\EntityAudit\Request\CurrentUserListener::handle". 
    INFO - The possibility to register the same extension twice ("Text") is deprecated since version 1.23 and will be removed in Twig 2.0. Use proper PHP inheritance instead. 
    DEBUG - Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\SecurityListener::onKernelController". 
    DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController".


Stack Trace (Plain Text) -


    [1] Symfony\Component\Debug\Exception\ContextErrorException: Warning: get_class() expects parameter 1 to be object, null given
        at n/a
            in /cocorico/src/Cocorico/ReviewBundle/Security/Voter/ReviewVoter.php line 50

        at Symfony\Component\Debug\ErrorHandler->handleError('2', 'get_class() expects parameter 1 to be object, null given', '/cocorico/src/Cocorico/ReviewBundle/Security/Voter/ReviewVoter.php', '50', array('token' => object(AnonymousToken), 'booking' => null, 'attributes' => array('ROLE_ADMIN')))
            in  line 

        at get_class(null)
            in /cocorico/src/Cocorico/ReviewBundle/Security/Voter/ReviewVoter.php line 50

        at Cocorico\ReviewBundle\Security\Voter\ReviewVoter->vote(object(AnonymousToken), null, array('ROLE_ADMIN'))
            in /cocorico/app/cache/dev/classes.php line 2870

        at Symfony\Component\Security\Core\Authorization\AccessDecisionManager->decideUnanimous(object(AnonymousToken), array('ROLE_ADMIN'), null)
            in /cocorico/app/cache/dev/classes.php line 2797

        at Symfony\Component\Security\Core\Authorization\AccessDecisionManager->decide(object(AnonymousToken), array('ROLE_ADMIN'), null)
            in /cocorico/app/cache/dev/classes.php line 2925

        at Symfony\Component\Security\Core\Authorization\AuthorizationChecker->isGranted(array('ROLE_ADMIN'), null)
            in /cocorico/vendor/symfony/symfony/src/Symfony/Component/Security/Core/SecurityContext.php line 102

        at Symfony\Component\Security\Core\SecurityContext->isGranted('ROLE_ADMIN')
            in /cocorico/vendor/sonata-project/user-bundle/Controller/AdminSecurityController.php line 61

        at Sonata\UserBundle\Controller\AdminSecurityController->loginAction()
            in  line 

        at call_user_func_array(array(object(AdminSecurityController), 'loginAction'), array())
            in /cocorico/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 139

        at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
            in /cocorico/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 62

        at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
            in /cocorico/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php line 69

        at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
            in /cocorico/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 185

        at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
            in /cocorico/web/app_dev.php line 30

I'm using symfony 4 on my system

But not sure if this is causing this problem

  • 写回答

1条回答 默认 最新

  • dongyou9818 2019-03-01 19:39
    关注

    This issue Fixed in: This bug fixed. Thanks!

    https://github.com/Cocolabs-SAS/cocorico/commit/813dd0fdcecb133162a27e15efc2c2808607919a
    
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器