You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the question
He actualizado a syspass 3.2.2 desde la version 2.1.6 sin mayores problemas. Ahora estoy probando la API, pero no consigo tener acceso a ella. Ejecuto el comando:
El body de la petiición estaba mal formado, '{ "jsonrpc": "2.0", "method": "account/search", "params": { "authToken": "XXXXXXXX" }, "id": "1" }'
el campo "id" es entero y va sin comillas
sysPass Version
3.2 (322.21031301)
Describe the question
He actualizado a syspass 3.2.2 desde la version 2.1.6 sin mayores problemas. Ahora estoy probando la API, pero no consigo tener acceso a ella. Ejecuto el comando:
curl.exe -v -k --header 'Accept: /' --header 'Cache-Control: no-cache' --header 'Content-Type: application/json' --request POST --data '{ "jsonrpc": "2.0", "method": "account/search", "params": { "authToken": "XXXXXXXX" }, "id": "1" }' https://XXXXXX/api.php
Y la respuesta es un 404. Esta es la traza de curl:
< HTTP/1.1 404 Not Found
< Date: Tue, 19 Oct 2021 12:13:01 GMT
< Server: Apache/2.4.37 (centos) OpenSSL/1.1.1g
< X-Powered-By: PHP/7.3.20
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
File not found.
En el log de syspass aparece la siguiente cadena de errores:
[2021-10-19 12:17:18] syspass.EXCEPTION: logger {"message":"Context not initialized
#0 /var/www/html/syspass/lib/SP/Core/Context/ContextBase.php(143): SP\Core\Context\ContextBase->checkContext()
#1 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(100): SP\Core\Context\ContextBase->getContextKey(String,NULL)
#2 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(392): SP\Core\Context\SessionContext->getContextKey(String)
#3 /var/www/html/syspass/lib/SP/Core/Language.php(211): SP\Core\Context\SessionContext->getLocale()
#4 /var/www/html/syspass/lib/SP/Providers/Log/LoggerBase.php(78): SP\Core\Language->setAppLocales()
#5 /var/www/html/syspass/lib/SP/Core/Events/EventDispatcherBase.php(121): SP\Providers\Log\LoggerBase->updateEvent(String,Object(SP\Core\Events\Event))
#6 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeConfigService.php(216): SP\Core\Events\EventDispatcherBase->notifyEvent(String,Object(SP\Core\Events\Event))
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(423): SP\Services\Upgrade\UpgradeConfigService->upgrade(String,Object(SP\Config\ConfigData))
#8 /var/www/html/syspass/lib/SP/Bootstrap.php(397): SP\Bootstrap->checkConfigVersion()
#9 /var/www/html/syspass/lib/SP/Bootstrap.php(300): SP\Bootstrap->initConfig()
#10 /var/www/html/syspass/lib/SP/Bootstrap.php(227): SP\Bootstrap->initializeCommon()
#11 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#12 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(879): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#13 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#14 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#15 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#16 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}
[2021-10-19 12:17:18] syspass.EXCEPTION: logger {"message":"Contexto no inicializado
#0 /var/www/html/syspass/lib/SP/Core/Context/ContextBase.php(143): SP\Core\Context\ContextBase->checkContext()
#1 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(100): SP\Core\Context\ContextBase->getContextKey(String,Object(SP\Services\User\UserLoginResponse))
#2 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(232): SP\Core\Context\SessionContext->getContextKey(String,Object(SP\Services\User\UserLoginResponse))
#3 /var/www/html/syspass/lib/SP/Providers/Log/LoggerBase.php(80): SP\Core\Context\SessionContext->getUserData()
#4 /var/www/html/syspass/lib/SP/Core/Events/EventDispatcherBase.php(121): SP\Providers\Log\LoggerBase->updateEvent(String,Object(SP\Core\Events\Event))
#5 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeConfigService.php(216): SP\Core\Events\EventDispatcherBase->notifyEvent(String,Object(SP\Core\Events\Event))
#6 /var/www/html/syspass/lib/SP/Bootstrap.php(423): SP\Services\Upgrade\UpgradeConfigService->upgrade(String,Object(SP\Config\ConfigData))
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(397): SP\Bootstrap->checkConfigVersion()
#8 /var/www/html/syspass/lib/SP/Bootstrap.php(300): SP\Bootstrap->initConfig()
#9 /var/www/html/syspass/lib/SP/Bootstrap.php(227): SP\Bootstrap->initializeCommon()
#10 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#11 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(879): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#12 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#13 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#14 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#15 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}
[2021-10-19 12:17:18] syspass.DEBUG: upgrade.config.start {"message":"Actualizar Configuración","user":"N/A","address":"192.168.56.107","caller":"SP\Services\Upgrade\UpgradeConfigService::upgrade"} []
[2021-10-19 12:17:18] syspass.EXCEPTION: logger {"message":"Contexto no inicializado
#0 /var/www/html/syspass/lib/SP/Core/Context/ContextBase.php(143): SP\Core\Context\ContextBase->checkContext()
#1 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(100): SP\Core\Context\ContextBase->getContextKey(String,NULL)
#2 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(392): SP\Core\Context\SessionContext->getContextKey(String)
#3 /var/www/html/syspass/lib/SP/Core/Language.php(224): SP\Core\Context\SessionContext->getLocale()
#4 /var/www/html/syspass/lib/SP/Providers/Log/LoggerBase.php(104): SP\Core\Language->unsetAppLocales()
#5 /var/www/html/syspass/lib/SP/Core/Events/EventDispatcherBase.php(121): SP\Providers\Log\LoggerBase->updateEvent(String,Object(SP\Core\Events\Event))
#6 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeConfigService.php(216): SP\Core\Events\EventDispatcherBase->notifyEvent(String,Object(SP\Core\Events\Event))
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(423): SP\Services\Upgrade\UpgradeConfigService->upgrade(String,Object(SP\Config\ConfigData))
#8 /var/www/html/syspass/lib/SP/Bootstrap.php(397): SP\Bootstrap->checkConfigVersion()
#9 /var/www/html/syspass/lib/SP/Bootstrap.php(300): SP\Bootstrap->initConfig()
#10 /var/www/html/syspass/lib/SP/Bootstrap.php(227): SP\Bootstrap->initializeCommon()
#11 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#12 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(879): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#13 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#14 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#15 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#16 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}
[2021-10-19 12:17:18] syspass.ERROR: logger {"message":"Could not set locale","caller":"SP\Core\Language::setLocales"}
[2021-10-19 12:17:18] syspass.EXCEPTION: logger {"message":"Context not initialized
#0 /var/www/html/syspass/lib/SP/Core/Context/ContextBase.php(143): SP\Core\Context\ContextBase->checkContext()
#1 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(100): SP\Core\Context\ContextBase->getContextKey(String,NULL)
#2 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(392): SP\Core\Context\SessionContext->getContextKey(String)
#3 /var/www/html/syspass/lib/SP/Core/Language.php(211): SP\Core\Context\SessionContext->getLocale()
#4 /var/www/html/syspass/lib/SP/Providers/Log/LoggerBase.php(78): SP\Core\Language->setAppLocales()
#5 /var/www/html/syspass/lib/SP/Core/Events/EventDispatcherBase.php(121): SP\Providers\Log\LoggerBase->updateEvent(String,Object(SP\Core\Events\Event))
#6 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeConfigService.php(224): SP\Core\Events\EventDispatcherBase->notifyEvent(String,Object(SP\Core\Events\Event))
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(423): SP\Services\Upgrade\UpgradeConfigService->upgrade(String,Object(SP\Config\ConfigData))
#8 /var/www/html/syspass/lib/SP/Bootstrap.php(397): SP\Bootstrap->checkConfigVersion()
#9 /var/www/html/syspass/lib/SP/Bootstrap.php(300): SP\Bootstrap->initConfig()
#10 /var/www/html/syspass/lib/SP/Bootstrap.php(227): SP\Bootstrap->initializeCommon()
#11 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#12 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(879): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#13 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#14 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#15 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#16 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}
[2021-10-19 12:17:18] syspass.EXCEPTION: logger {"message":"Contexto no inicializado
#0 /var/www/html/syspass/lib/SP/Core/Context/ContextBase.php(143): SP\Core\Context\ContextBase->checkContext()
#1 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(100): SP\Core\Context\ContextBase->getContextKey(String,Object(SP\Services\User\UserLoginResponse))
#2 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(232): SP\Core\Context\SessionContext->getContextKey(String,Object(SP\Services\User\UserLoginResponse))
#3 /var/www/html/syspass/lib/SP/Providers/Log/LoggerBase.php(80): SP\Core\Context\SessionContext->getUserData()
#4 /var/www/html/syspass/lib/SP/Core/Events/EventDispatcherBase.php(121): SP\Providers\Log\LoggerBase->updateEvent(String,Object(SP\Core\Events\Event))
#5 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeConfigService.php(224): SP\Core\Events\EventDispatcherBase->notifyEvent(String,Object(SP\Core\Events\Event))
#6 /var/www/html/syspass/lib/SP/Bootstrap.php(423): SP\Services\Upgrade\UpgradeConfigService->upgrade(String,Object(SP\Config\ConfigData))
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(397): SP\Bootstrap->checkConfigVersion()
#8 /var/www/html/syspass/lib/SP/Bootstrap.php(300): SP\Bootstrap->initConfig()
#9 /var/www/html/syspass/lib/SP/Bootstrap.php(227): SP\Bootstrap->initializeCommon()
#10 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#11 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(879): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#12 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#13 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#14 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#15 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}
[2021-10-19 12:17:18] syspass.DEBUG: upgrade.config.end {"message":"Actualizar Configuración","user":"N/A","address":"192.168.56.107","caller":"SP\Services\Upgrade\UpgradeConfigService::upgrade"} []
[2021-10-19 12:17:18] syspass.EXCEPTION: logger {"message":"Contexto no inicializado
#0 /var/www/html/syspass/lib/SP/Core/Context/ContextBase.php(143): SP\Core\Context\ContextBase->checkContext()
#1 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(100): SP\Core\Context\ContextBase->getContextKey(String,NULL)
#2 /var/www/html/syspass/lib/SP/Core/Context/SessionContext.php(392): SP\Core\Context\SessionContext->getContextKey(String)
#3 /var/www/html/syspass/lib/SP/Core/Language.php(224): SP\Core\Context\SessionContext->getLocale()
#4 /var/www/html/syspass/lib/SP/Providers/Log/LoggerBase.php(104): SP\Core\Language->unsetAppLocales()
#5 /var/www/html/syspass/lib/SP/Core/Events/EventDispatcherBase.php(121): SP\Providers\Log\LoggerBase->updateEvent(String,Object(SP\Core\Events\Event))
#6 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeConfigService.php(224): SP\Core\Events\EventDispatcherBase->notifyEvent(String,Object(SP\Core\Events\Event))
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(423): SP\Services\Upgrade\UpgradeConfigService->upgrade(String,Object(SP\Config\ConfigData))
#8 /var/www/html/syspass/lib/SP/Bootstrap.php(397): SP\Bootstrap->checkConfigVersion()
#9 /var/www/html/syspass/lib/SP/Bootstrap.php(300): SP\Bootstrap->initConfig()
#10 /var/www/html/syspass/lib/SP/Bootstrap.php(227): SP\Bootstrap->initializeCommon()
#11 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#12 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(879): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#13 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#14 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#15 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#16 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}
[2021-10-19 12:17:18] syspass.ERROR: logger {"message":"Could not set locale","caller":"SP\Core\Language::setLocales"}
[2021-10-19 12:17:18] syspass.INFO: logger {"message":"Loaded icons cache","caller":"SP\Core\UI\Theme::initIcons"}
[2021-10-19 12:17:18] syspass.INFO: logger {"message":"Loaded actions cache","caller":"SP\Core\Acl\Actions::loadCache"}
Screenshots
If applicable, add screenshots to help explain your problem.
Platform (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: