http://opendata.kedirikab.go.id/login?p=login

Exceptions

An exception occurred in driver: SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?

Exceptions 3

Doctrine\DBAL\Exception\ ConnectionException

  1.             case '42P07':
  2.                 return new TableExistsException($message$exception);
  3.             case '08006':
  4.                 return new Exception\ConnectionException($message$exception);
  5.             case '7':
  6.                 // Prior to fixing https://bugs.php.net/bug.php?id=64705 (PHP 7.3.22 and PHP 7.4.10),
  7.                 // in some cases (mainly connection errors) the PDO exception wouldn't provide a SQLSTATE via its code.
  8.                 // The exception code would be always set to 7 here.
  1.         if ($driverEx instanceof DriverException) {
  2.             return $driverEx;
  3.         }
  4.         if ($driver instanceof ExceptionConverterDriver && $driverEx instanceof DeprecatedDriverException) {
  5.             return $driver->convertException($msg$driverEx);
  6.         }
  7.         return new Exception($msg0$driverEx);
  8.     }
  1.      *
  2.      * @return Exception
  3.      */
  4.     public static function driverException(Driver $driverThrowable $driverEx)
  5.     {
  6.         return self::wrapException($driver$driverEx'An exception occurred in driver: ' $driverEx->getMessage());
  7.     }
  8.     /**
  9.      * @return Exception
  10.      */
  1.                 $pdo->exec('SET NAMES \'' $params['charset'] . '\'');
  2.             }
  3.             return $pdo;
  4.         } catch (PDOException $e) {
  5.             throw Exception::driverException($this$e);
  6.         }
  7.     }
  8.     /**
  9.      * Constructs the Postgres PDO DSN.
  1.         $driverOptions $this->params['driverOptions'] ?? [];
  2.         $user          $this->params['user'] ?? null;
  3.         $password      $this->params['password'] ?? null;
  4.         $this->_conn $this->_driver->connect($this->params$user$password$driverOptions);
  5.         $this->transactionNestingLevel 0;
  6.         if ($this->autoCommit === false) {
  7.             $this->beginTransaction();
  1.      *
  2.      * @return DriverConnection
  3.      */
  4.     public function getWrappedConnection()
  5.     {
  6.         $this->connect();
  7.         assert($this->_conn !== null);
  8.         return $this->_conn;
  9.     }
in vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php -> getWrappedConnection (line 1290)
  1.     {
  2.         if ($qcp !== null) {
  3.             return $this->executeCacheQuery($sql$params$types$qcp);
  4.         }
  5.         $connection $this->getWrappedConnection();
  6.         $logger $this->_config->getSQLLogger();
  7.         if ($logger) {
  8.             $logger->startQuery($sql$params$types);
  9.         }
  1.     {
  2.         $this->switchPersisterContext(null$limit);
  3.         $sql              $this->getSelectSQL($criteria$assoc$lockMode$limitnull$orderBy);
  4.         [$params$types] = $this->expandParameters($criteria);
  5.         $stmt             $this->conn->executeQuery($sql$params$types);
  6.         if ($entity !== null) {
  7.             $hints[Query::HINT_REFRESH]        = true;
  8.             $hints[Query::HINT_REFRESH_ENTITY] = $entity;
  9.         }
  1.      */
  2.     public function findOneBy(array $criteria, ?array $orderBy null)
  3.     {
  4.         $persister $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
  5.         return $persister->load($criterianullnull, [], null1$orderBy);
  6.     }
  7.     /**
  8.      * Counts entities by a set of criteria.
  9.      *
  1.         return $this->find($identityNumber);
  2.     }
  3.     public function findOneByUsernameAndActive(string $username): ?KmjUserInterface 
  4.     {
  5.         return $this->findOneBy(['username' => $username'is_active' => true]);
  6.     }
  7. }
  1.     {
  2.         if (null !== $this->error) {
  3.             throw new CustomUserMessageAuthenticationException($this->error);
  4.         }
  5.         
  6.         $user $this->kmjUserRepo->findOneByUsernameAndActive($credentials['username']);
  7.         if (!$user) {
  8.             
  9.             throw new CustomUserMessageAuthenticationException('Username could not be found.');
  10.         }
  1.     }
  2.     private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticatorPreAuthenticationGuardToken $token): GuardTokenInterface
  3.     {
  4.         // get the user from the GuardAuthenticator
  5.         $user $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);
  6.         if (null === $user) {
  7.             $e = new UserNotFoundException(sprintf('Null returned from "%s::getUser()".'get_debug_type($guardAuthenticator)));
  8.             // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
  9.             $e->setUserIdentifier(method_exists($token'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername());
  1.         if (null === $guardAuthenticator) {
  2.             throw new AuthenticationException(sprintf('Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".'$token->getGuardProviderKey(), $this->providerKey));
  3.         }
  4.         return $this->authenticateViaGuard($guardAuthenticator$token);
  5.     }
  6.     private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticatorPreAuthenticationGuardToken $token): GuardTokenInterface
  7.     {
  8.         // get the user from the GuardAuthenticator
  1.             if (!$provider->supports($token)) {
  2.                 continue;
  3.             }
  4.             try {
  5.                 $result $provider->authenticate($token);
  6.                 if (null !== $result) {
  7.                     break;
  8.                 }
  9.             } catch (AccountStatusException $e) {
  1.             if (null !== $this->logger) {
  2.                 $this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey'authenticator' => \get_class($guardAuthenticator)]);
  3.             }
  4.             // pass the token into the AuthenticationManager system
  5.             // this indirectly calls GuardAuthenticationProvider::authenticate()
  6.             $token $this->authenticationManager->authenticate($token);
  7.             if (null !== $this->logger) {
  8.                 $this->logger->info('Guard authentication successful!', ['token' => $token'authenticator' => \get_class($guardAuthenticator)]);
  9.             }
  1.         foreach ($guardAuthenticators as $key => $guardAuthenticator) {
  2.             // get a key that's unique to *this* guard authenticator
  3.             // this MUST be the same as GuardAuthenticationProvider
  4.             $uniqueGuardKey $this->providerKey.'_'.$key;
  5.             $this->executeGuardAuthenticator($uniqueGuardKey$guardAuthenticator$event);
  6.             if ($event->hasResponse()) {
  7.                 if (null !== $this->logger) {
  8.                     $this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($guardAuthenticator)]);
  9.                 }
  1.     public function authenticate(RequestEvent $event)
  2.     {
  3.         $startTime microtime(true);
  4.         try {
  5.             $ret $this->listener->authenticate($event);
  6.         } catch (LazyResponseException $e) {
  7.             $this->response $e->getResponse();
  8.             throw $e;
  9.         } finally {
  1. abstract class AbstractListener implements FirewallListenerInterface
  2. {
  3.     final public function __invoke(RequestEvent $event)
  4.     {
  5.         if (false !== $this->supports($event->getRequest())) {
  6.             $this->authenticate($event);
  7.         }
  8.     }
  9.     public static function getPriority(): int
  10.     {
  1.             }
  2.         }
  3.         if (!$lazy) {
  4.             foreach ($listeners as $listener) {
  5.                 $listener($event);
  6.                 if ($event->hasResponse()) {
  7.                     return;
  8.                 }
  9.             }
  1.                         }
  2.                     }
  3.                     $this->listeners $listeners;
  4.                 }, $listenerFirewallContext::class)();
  5.                 $listener($event);
  6.             } else {
  7.                 $wrappedListener $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener);
  8.                 $wrappedListener($event);
  9.                 $wrappedListeners[] = $wrappedListener->getInfo();
  10.                 if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) {
in vendor/symfony/security-http/Firewall.php -> callListeners (line 92)
  1.             if (null !== $logoutListener) {
  2.                 yield $logoutListener;
  3.             }
  4.         };
  5.         $this->callListeners($event$authenticationListeners());
  6.     }
  7.     public function onKernelFinishRequest(FinishRequestEvent $event)
  8.     {
  9.         $request $event->getRequest();
  1.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      */
  2.     private function handleRaw(Request $requestint $type self::MAIN_REQUEST): Response
  3.     {
  4.         // request
  5.         $event = new RequestEvent($this$request$type);
  6.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  7.         if ($event->hasResponse()) {
  8.             return $this->filterResponse($event->getResponse(), $request$type);
  9.         }
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 20)
  1.     Debug::enable();
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Doctrine\DBAL\Driver\PDO\ Exception

SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?

  1.  */
  2. final class Exception extends PDOException
  3. {
  4.     public static function new(\PDOException $exception): self
  5.     {
  6.         return new self($exception);
  7.     }
  8. }
  1.         try {
  2.             parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
  3.             $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
  4.             $this->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
  5.         } catch (PDOException $exception) {
  6.             throw Exception::new($exception);
  7.         }
  8.     }
  9.     /**
  10.      * {@inheritdoc}
  1.      */
  2.     public function connect(array $params$username null$password null, array $driverOptions = [])
  3.     {
  4.         try {
  5.             $pdo = new PDO\Connection(
  6.                 $this->_constructPdoDsn($params),
  7.                 $username,
  8.                 $password,
  9.                 $driverOptions
  10.             );
  1.         $driverOptions $this->params['driverOptions'] ?? [];
  2.         $user          $this->params['user'] ?? null;
  3.         $password      $this->params['password'] ?? null;
  4.         $this->_conn $this->_driver->connect($this->params$user$password$driverOptions);
  5.         $this->transactionNestingLevel 0;
  6.         if ($this->autoCommit === false) {
  7.             $this->beginTransaction();
  1.      *
  2.      * @return DriverConnection
  3.      */
  4.     public function getWrappedConnection()
  5.     {
  6.         $this->connect();
  7.         assert($this->_conn !== null);
  8.         return $this->_conn;
  9.     }
in vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php -> getWrappedConnection (line 1290)
  1.     {
  2.         if ($qcp !== null) {
  3.             return $this->executeCacheQuery($sql$params$types$qcp);
  4.         }
  5.         $connection $this->getWrappedConnection();
  6.         $logger $this->_config->getSQLLogger();
  7.         if ($logger) {
  8.             $logger->startQuery($sql$params$types);
  9.         }
  1.     {
  2.         $this->switchPersisterContext(null$limit);
  3.         $sql              $this->getSelectSQL($criteria$assoc$lockMode$limitnull$orderBy);
  4.         [$params$types] = $this->expandParameters($criteria);
  5.         $stmt             $this->conn->executeQuery($sql$params$types);
  6.         if ($entity !== null) {
  7.             $hints[Query::HINT_REFRESH]        = true;
  8.             $hints[Query::HINT_REFRESH_ENTITY] = $entity;
  9.         }
  1.      */
  2.     public function findOneBy(array $criteria, ?array $orderBy null)
  3.     {
  4.         $persister $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
  5.         return $persister->load($criterianullnull, [], null1$orderBy);
  6.     }
  7.     /**
  8.      * Counts entities by a set of criteria.
  9.      *
  1.         return $this->find($identityNumber);
  2.     }
  3.     public function findOneByUsernameAndActive(string $username): ?KmjUserInterface 
  4.     {
  5.         return $this->findOneBy(['username' => $username'is_active' => true]);
  6.     }
  7. }
  1.     {
  2.         if (null !== $this->error) {
  3.             throw new CustomUserMessageAuthenticationException($this->error);
  4.         }
  5.         
  6.         $user $this->kmjUserRepo->findOneByUsernameAndActive($credentials['username']);
  7.         if (!$user) {
  8.             
  9.             throw new CustomUserMessageAuthenticationException('Username could not be found.');
  10.         }
  1.     }
  2.     private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticatorPreAuthenticationGuardToken $token): GuardTokenInterface
  3.     {
  4.         // get the user from the GuardAuthenticator
  5.         $user $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);
  6.         if (null === $user) {
  7.             $e = new UserNotFoundException(sprintf('Null returned from "%s::getUser()".'get_debug_type($guardAuthenticator)));
  8.             // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
  9.             $e->setUserIdentifier(method_exists($token'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername());
  1.         if (null === $guardAuthenticator) {
  2.             throw new AuthenticationException(sprintf('Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".'$token->getGuardProviderKey(), $this->providerKey));
  3.         }
  4.         return $this->authenticateViaGuard($guardAuthenticator$token);
  5.     }
  6.     private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticatorPreAuthenticationGuardToken $token): GuardTokenInterface
  7.     {
  8.         // get the user from the GuardAuthenticator
  1.             if (!$provider->supports($token)) {
  2.                 continue;
  3.             }
  4.             try {
  5.                 $result $provider->authenticate($token);
  6.                 if (null !== $result) {
  7.                     break;
  8.                 }
  9.             } catch (AccountStatusException $e) {
  1.             if (null !== $this->logger) {
  2.                 $this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey'authenticator' => \get_class($guardAuthenticator)]);
  3.             }
  4.             // pass the token into the AuthenticationManager system
  5.             // this indirectly calls GuardAuthenticationProvider::authenticate()
  6.             $token $this->authenticationManager->authenticate($token);
  7.             if (null !== $this->logger) {
  8.                 $this->logger->info('Guard authentication successful!', ['token' => $token'authenticator' => \get_class($guardAuthenticator)]);
  9.             }
  1.         foreach ($guardAuthenticators as $key => $guardAuthenticator) {
  2.             // get a key that's unique to *this* guard authenticator
  3.             // this MUST be the same as GuardAuthenticationProvider
  4.             $uniqueGuardKey $this->providerKey.'_'.$key;
  5.             $this->executeGuardAuthenticator($uniqueGuardKey$guardAuthenticator$event);
  6.             if ($event->hasResponse()) {
  7.                 if (null !== $this->logger) {
  8.                     $this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($guardAuthenticator)]);
  9.                 }
  1.     public function authenticate(RequestEvent $event)
  2.     {
  3.         $startTime microtime(true);
  4.         try {
  5.             $ret $this->listener->authenticate($event);
  6.         } catch (LazyResponseException $e) {
  7.             $this->response $e->getResponse();
  8.             throw $e;
  9.         } finally {
  1. abstract class AbstractListener implements FirewallListenerInterface
  2. {
  3.     final public function __invoke(RequestEvent $event)
  4.     {
  5.         if (false !== $this->supports($event->getRequest())) {
  6.             $this->authenticate($event);
  7.         }
  8.     }
  9.     public static function getPriority(): int
  10.     {
  1.             }
  2.         }
  3.         if (!$lazy) {
  4.             foreach ($listeners as $listener) {
  5.                 $listener($event);
  6.                 if ($event->hasResponse()) {
  7.                     return;
  8.                 }
  9.             }
  1.                         }
  2.                     }
  3.                     $this->listeners $listeners;
  4.                 }, $listenerFirewallContext::class)();
  5.                 $listener($event);
  6.             } else {
  7.                 $wrappedListener $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener);
  8.                 $wrappedListener($event);
  9.                 $wrappedListeners[] = $wrappedListener->getInfo();
  10.                 if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) {
in vendor/symfony/security-http/Firewall.php -> callListeners (line 92)
  1.             if (null !== $logoutListener) {
  2.                 yield $logoutListener;
  3.             }
  4.         };
  5.         $this->callListeners($event$authenticationListeners());
  6.     }
  7.     public function onKernelFinishRequest(FinishRequestEvent $event)
  8.     {
  9.         $request $event->getRequest();
  1.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      */
  2.     private function handleRaw(Request $requestint $type self::MAIN_REQUEST): Response
  3.     {
  4.         // request
  5.         $event = new RequestEvent($this$request$type);
  6.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  7.         if ($event->hasResponse()) {
  8.             return $this->filterResponse($event->getResponse(), $request$type);
  9.         }
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 20)
  1.     Debug::enable();
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

PDOException

SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?

  1.      * @throws PDOException In case of an error.
  2.      */
  3.     public function __construct($dsn$user null$password null, ?array $options null)
  4.     {
  5.         try {
  6.             parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
  7.             $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
  8.             $this->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
  9.         } catch (PDOException $exception) {
  10.             throw Exception::new($exception);
  11.         }
  1.      * @throws PDOException In case of an error.
  2.      */
  3.     public function __construct($dsn$user null$password null, ?array $options null)
  4.     {
  5.         try {
  6.             parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
  7.             $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
  8.             $this->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
  9.         } catch (PDOException $exception) {
  10.             throw Exception::new($exception);
  11.         }
  1.      */
  2.     public function connect(array $params$username null$password null, array $driverOptions = [])
  3.     {
  4.         try {
  5.             $pdo = new PDO\Connection(
  6.                 $this->_constructPdoDsn($params),
  7.                 $username,
  8.                 $password,
  9.                 $driverOptions
  10.             );
  1.         $driverOptions $this->params['driverOptions'] ?? [];
  2.         $user          $this->params['user'] ?? null;
  3.         $password      $this->params['password'] ?? null;
  4.         $this->_conn $this->_driver->connect($this->params$user$password$driverOptions);
  5.         $this->transactionNestingLevel 0;
  6.         if ($this->autoCommit === false) {
  7.             $this->beginTransaction();
  1.      *
  2.      * @return DriverConnection
  3.      */
  4.     public function getWrappedConnection()
  5.     {
  6.         $this->connect();
  7.         assert($this->_conn !== null);
  8.         return $this->_conn;
  9.     }
in vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php -> getWrappedConnection (line 1290)
  1.     {
  2.         if ($qcp !== null) {
  3.             return $this->executeCacheQuery($sql$params$types$qcp);
  4.         }
  5.         $connection $this->getWrappedConnection();
  6.         $logger $this->_config->getSQLLogger();
  7.         if ($logger) {
  8.             $logger->startQuery($sql$params$types);
  9.         }
  1.     {
  2.         $this->switchPersisterContext(null$limit);
  3.         $sql              $this->getSelectSQL($criteria$assoc$lockMode$limitnull$orderBy);
  4.         [$params$types] = $this->expandParameters($criteria);
  5.         $stmt             $this->conn->executeQuery($sql$params$types);
  6.         if ($entity !== null) {
  7.             $hints[Query::HINT_REFRESH]        = true;
  8.             $hints[Query::HINT_REFRESH_ENTITY] = $entity;
  9.         }
  1.      */
  2.     public function findOneBy(array $criteria, ?array $orderBy null)
  3.     {
  4.         $persister $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
  5.         return $persister->load($criterianullnull, [], null1$orderBy);
  6.     }
  7.     /**
  8.      * Counts entities by a set of criteria.
  9.      *
  1.         return $this->find($identityNumber);
  2.     }
  3.     public function findOneByUsernameAndActive(string $username): ?KmjUserInterface 
  4.     {
  5.         return $this->findOneBy(['username' => $username'is_active' => true]);
  6.     }
  7. }
  1.     {
  2.         if (null !== $this->error) {
  3.             throw new CustomUserMessageAuthenticationException($this->error);
  4.         }
  5.         
  6.         $user $this->kmjUserRepo->findOneByUsernameAndActive($credentials['username']);
  7.         if (!$user) {
  8.             
  9.             throw new CustomUserMessageAuthenticationException('Username could not be found.');
  10.         }
  1.     }
  2.     private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticatorPreAuthenticationGuardToken $token): GuardTokenInterface
  3.     {
  4.         // get the user from the GuardAuthenticator
  5.         $user $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);
  6.         if (null === $user) {
  7.             $e = new UserNotFoundException(sprintf('Null returned from "%s::getUser()".'get_debug_type($guardAuthenticator)));
  8.             // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
  9.             $e->setUserIdentifier(method_exists($token'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername());
  1.         if (null === $guardAuthenticator) {
  2.             throw new AuthenticationException(sprintf('Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".'$token->getGuardProviderKey(), $this->providerKey));
  3.         }
  4.         return $this->authenticateViaGuard($guardAuthenticator$token);
  5.     }
  6.     private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticatorPreAuthenticationGuardToken $token): GuardTokenInterface
  7.     {
  8.         // get the user from the GuardAuthenticator
  1.             if (!$provider->supports($token)) {
  2.                 continue;
  3.             }
  4.             try {
  5.                 $result $provider->authenticate($token);
  6.                 if (null !== $result) {
  7.                     break;
  8.                 }
  9.             } catch (AccountStatusException $e) {
  1.             if (null !== $this->logger) {
  2.                 $this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey'authenticator' => \get_class($guardAuthenticator)]);
  3.             }
  4.             // pass the token into the AuthenticationManager system
  5.             // this indirectly calls GuardAuthenticationProvider::authenticate()
  6.             $token $this->authenticationManager->authenticate($token);
  7.             if (null !== $this->logger) {
  8.                 $this->logger->info('Guard authentication successful!', ['token' => $token'authenticator' => \get_class($guardAuthenticator)]);
  9.             }
  1.         foreach ($guardAuthenticators as $key => $guardAuthenticator) {
  2.             // get a key that's unique to *this* guard authenticator
  3.             // this MUST be the same as GuardAuthenticationProvider
  4.             $uniqueGuardKey $this->providerKey.'_'.$key;
  5.             $this->executeGuardAuthenticator($uniqueGuardKey$guardAuthenticator$event);
  6.             if ($event->hasResponse()) {
  7.                 if (null !== $this->logger) {
  8.                     $this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($guardAuthenticator)]);
  9.                 }
  1.     public function authenticate(RequestEvent $event)
  2.     {
  3.         $startTime microtime(true);
  4.         try {
  5.             $ret $this->listener->authenticate($event);
  6.         } catch (LazyResponseException $e) {
  7.             $this->response $e->getResponse();
  8.             throw $e;
  9.         } finally {
  1. abstract class AbstractListener implements FirewallListenerInterface
  2. {
  3.     final public function __invoke(RequestEvent $event)
  4.     {
  5.         if (false !== $this->supports($event->getRequest())) {
  6.             $this->authenticate($event);
  7.         }
  8.     }
  9.     public static function getPriority(): int
  10.     {
  1.             }
  2.         }
  3.         if (!$lazy) {
  4.             foreach ($listeners as $listener) {
  5.                 $listener($event);
  6.                 if ($event->hasResponse()) {
  7.                     return;
  8.                 }
  9.             }
  1.                         }
  2.                     }
  3.                     $this->listeners $listeners;
  4.                 }, $listenerFirewallContext::class)();
  5.                 $listener($event);
  6.             } else {
  7.                 $wrappedListener $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener);
  8.                 $wrappedListener($event);
  9.                 $wrappedListeners[] = $wrappedListener->getInfo();
  10.                 if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) {
in vendor/symfony/security-http/Firewall.php -> callListeners (line 92)
  1.             if (null !== $logoutListener) {
  2.                 yield $logoutListener;
  3.             }
  4.         };
  5.         $this->callListeners($event$authenticationListeners());
  6.     }
  7.     public function onKernelFinishRequest(FinishRequestEvent $event)
  8.     {
  9.         $request $event->getRequest();
  1.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      */
  2.     private function handleRaw(Request $requestint $type self::MAIN_REQUEST): Response
  3.     {
  4.         // request
  5.         $event = new RequestEvent($this$request$type);
  6.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  7.         if ($event->hasResponse()) {
  8.             return $this->filterResponse($event->getResponse(), $request$type);
  9.         }
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 20)
  1.     Debug::enable();
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Traces 3

[3/3] ConnectionException
Doctrine\DBAL\Exception\ConnectionException:
An exception occurred in driver: SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused
	Is the server running on that host and accepting TCP/IP connections?

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:88
  at Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:182)
  at Doctrine\DBAL\DBALException::wrapException()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169)
  at Doctrine\DBAL\DBALException::driverException()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:52)
  at Doctrine\DBAL\Driver\PDOPgSql\Driver->connect()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412)
  at Doctrine\DBAL\Connection->connect()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1952)
  at Doctrine\DBAL\Connection->getWrappedConnection()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1290)
  at Doctrine\DBAL\Connection->executeQuery()
     (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:750)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load()
     (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:241)
  at Doctrine\ORM\EntityRepository->findOneBy()
     (vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php:37)
  at Kematjaya\UserBundle\Repo\KmjUserRepository->findOneByUsernameAndActive()
     (vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php:141)
  at Kematjaya\UserBundle\Security\KmjLoginAuthenticator->getUser()
     (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:113)
  at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticateViaGuard()
     (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:107)
  at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticate()
     (vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php:88)
  at Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager->authenticate()
     (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:162)
  at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->executeGuardAuthenticator()
     (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:126)
  at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->authenticate()
     (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49)
  at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate()
     (vendor/symfony/security-http/Firewall/AbstractListener.php:26)
  at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke()
     (vendor/symfony/security-bundle/Security/LazyFirewallContext.php:60)
  at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->__invoke()
     (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:70)
  at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners()
     (vendor/symfony/security-http/Firewall.php:92)
  at Symfony\Component\Security\Http\Firewall->onKernelRequest()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:139)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:20)                
[2/3] Exception
Doctrine\DBAL\Driver\PDO\Exception:
SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused
	Is the server running on that host and accepting TCP/IP connections?

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
  at Doctrine\DBAL\Driver\PDO\Exception::new()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:44)
  at Doctrine\DBAL\Driver\PDOConnection->__construct()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:27)
  at Doctrine\DBAL\Driver\PDOPgSql\Driver->connect()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412)
  at Doctrine\DBAL\Connection->connect()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1952)
  at Doctrine\DBAL\Connection->getWrappedConnection()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1290)
  at Doctrine\DBAL\Connection->executeQuery()
     (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:750)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load()
     (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:241)
  at Doctrine\ORM\EntityRepository->findOneBy()
     (vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php:37)
  at Kematjaya\UserBundle\Repo\KmjUserRepository->findOneByUsernameAndActive()
     (vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php:141)
  at Kematjaya\UserBundle\Security\KmjLoginAuthenticator->getUser()
     (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:113)
  at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticateViaGuard()
     (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:107)
  at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticate()
     (vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php:88)
  at Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager->authenticate()
     (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:162)
  at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->executeGuardAuthenticator()
     (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:126)
  at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->authenticate()
     (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49)
  at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate()
     (vendor/symfony/security-http/Firewall/AbstractListener.php:26)
  at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke()
     (vendor/symfony/security-bundle/Security/LazyFirewallContext.php:60)
  at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->__invoke()
     (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:70)
  at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners()
     (vendor/symfony/security-http/Firewall.php:92)
  at Symfony\Component\Security\Http\Firewall->onKernelRequest()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:139)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:20)                
[1/3] PDOException
PDOException:
SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused
	Is the server running on that host and accepting TCP/IP connections?

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
  at PDO->__construct()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40)
  at Doctrine\DBAL\Driver\PDOConnection->__construct()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:27)
  at Doctrine\DBAL\Driver\PDOPgSql\Driver->connect()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412)
  at Doctrine\DBAL\Connection->connect()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1952)
  at Doctrine\DBAL\Connection->getWrappedConnection()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1290)
  at Doctrine\DBAL\Connection->executeQuery()
     (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:750)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load()
     (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:241)
  at Doctrine\ORM\EntityRepository->findOneBy()
     (vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php:37)
  at Kematjaya\UserBundle\Repo\KmjUserRepository->findOneByUsernameAndActive()
     (vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php:141)
  at Kematjaya\UserBundle\Security\KmjLoginAuthenticator->getUser()
     (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:113)
  at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticateViaGuard()
     (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:107)
  at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticate()
     (vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php:88)
  at Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager->authenticate()
     (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:162)
  at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->executeGuardAuthenticator()
     (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:126)
  at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->authenticate()
     (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49)
  at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate()
     (vendor/symfony/security-http/Firewall/AbstractListener.php:26)
  at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke()
     (vendor/symfony/security-bundle/Security/LazyFirewallContext.php:60)
  at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->__invoke()
     (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:70)
  at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners()
     (vendor/symfony/security-http/Firewall.php:92)
  at Symfony\Component\Security\Http\Firewall->onKernelRequest()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:139)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:20)