nextcloud/app_api

SSL certificate not found / Internal Server Error - Docker AIO container

raudraido opened this issue · 6 comments

Describe the bug

After deleting default daemon, it is not possible to add back with the same data. Log: "SSL certificate not found".
After that AppAPI page in NC is not reachable anymore. Log: "Internal Server Error"

Steps/Code to Reproduce

Delete AppAPI Default Deploy Daemon and try to add it back

Expected Results

Shoud let you do that

Actual Results

SSL certificate not found

Setup configuration

AppApi 1.4.4. NC 28.0.1

@raudraido Hi! Thanks for the issue. Could you elaborate please on steps to reproduce and what daemon configuration are you trying to configure? I couldn't reproduce it locally for now.. Is there any log entries related to give more context?

I installed nextcloud-aio docker. Out of the box everything works. When I remove already installed default docker socket proxy "host:nextcloud-aio-docker-socket-proxy:2375" from AppAPI NC page and then trying to add it back with the same information, it fails with SSL error.

Could you send the screenshot of your daemon configuration options when you creating it?

Are you sure you have set all the options correctly, like default daemon configures (https://github.com/cloud-py-api/app_api/blob/main/lib/DeployActions/AIODockerActions.php#L45)?

working one

image

new added, not working

image

error log

{
"reqId": "aeZsQABurZhyxNyeNQza",
"level": 3,
"time": "2023-12-28T12:46:13+00:00",
"remoteAddr": "172.22.0.1",
"user": "admin",
"app": "index",
"method": "POST",
"url": "/apps/app_api/daemons/docker_AIO/check",
"message": "SSL certificate not found: ",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"version": "28.0.1.1",
"exception": {
"Exception": "InvalidArgumentException",
"Message": "SSL certificate not found: ",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
"line": 59,
"function": "applyHandlerOptions",
"class": "GuzzleHttp\Handler\CurlFactory",
"type": "->",
"args": [
[
"GuzzleHttp\Handler\EasyHandle",
null,
[
"GuzzleHttp\Psr7\Stream"
],
[],
null,
"*** sensitive parameters replaced ",
"
sensitive parameters replaced ",
0,
null,
null
],
[
[
[
"GuzzleHttp/7"
],
[
"nextcloud-aio-docker-socket-proxy:2375"
]
],
"
sensitive parameters replaced ",
"http://nextcloud-aio-docker-socket-proxy:2375/v1.41/_ping",
false,
false,
"And 10 more entries, set log level to debug to see all entries"
]
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php",
"line": 43,
"function": "create",
"class": "GuzzleHttp\Handler\CurlFactory",
"type": "->",
"args": [
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php",
"line": 28,
"function": "__invoke",
"class": "GuzzleHttp\Handler\CurlHandler",
"type": "->",
"args": [
"
sensitive parameters replaced ",
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php",
"line": 48,
"function": "GuzzleHttp\Handler\{closure}",
"class": "GuzzleHttp\Handler\Proxy",
"type": "::",
"args": [
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php",
"line": 35,
"function": "GuzzleHttp\Handler\{closure}",
"class": "GuzzleHttp\Handler\Proxy",
"type": "::",
"args": [
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
"line": 31,
"function": "__invoke",
"class": "GuzzleHttp\PrepareBodyMiddleware",
"type": "->",
"args": [
"
sensitive parameters replaced ",
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php",
"line": 71,
"function": "GuzzleHttp\{closure}",
"class": "GuzzleHttp\Middleware",
"type": "::",
"args": [
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
"line": 63,
"function": "__invoke",
"class": "GuzzleHttp\RedirectMiddleware",
"type": "->",
"args": [
"
sensitive parameters replaced ",
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php",
"line": 75,
"function": "GuzzleHttp\{closure}",
"class": "GuzzleHttp\Middleware",
"type": "::",
"args": [
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php",
"line": 331,
"function": "__invoke",
"class": "GuzzleHttp\HandlerStack",
"type": "->",
"args": [
"
sensitive parameters replaced ",
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php",
"line": 168,
"function": "transfer",
"class": "GuzzleHttp\Client",
"type": "->",
"args": [
"
sensitive parameters replaced ",
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php",
"line": 187,
"function": "requestAsync",
"class": "GuzzleHttp\Client",
"type": "->",
"args": [
"
sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/ClientTrait.php",
"line": 44,
"function": "request",
"class": "GuzzleHttp\Client",
"type": "->",
"args": [
"
sensitive parameters replaced ***",
"http://nextcloud-aio-docker-socket-proxy:2375/v1.41/_ping",
[
true
]
]
},
{
"file": "/var/www/html/custom_apps/app_api/lib/DeployActions/DockerActions.php",
"line": 278,
"function": "get",
"class": "GuzzleHttp\Client",
"type": "->",
"args": [
"http://nextcloud-aio-docker-socket-proxy:2375/v1.41/_ping"
]
},
{
"file": "/var/www/html/custom_apps/app_api/lib/Controller/DaemonConfigController.php",
"line": 104,
"function": "ping",
"class": "OCA\AppAPI\DeployActions\DockerActions",
"type": "->",
"args": [
"http://nextcloud-aio-docker-socket-proxy:2375"
]
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "verifyDaemonConnection",
"class": "OCA\AppAPI\Controller\DaemonConfigController",
"type": "->",
"args": [
"docker_AIO"
]
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\AppFramework\Http\Dispatcher",
"type": "->",
"args": [
[
"OCA\AppAPI\Controller\DaemonConfigController"
],
"verifyDaemonConnection"
]
},
{
"file": "/var/www/html/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\AppFramework\Http\Dispatcher",
"type": "->",
"args": [
[
"OCA\AppAPI\Controller\DaemonConfigController"
],
"verifyDaemonConnection"
]
},
{
"file": "/var/www/html/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\AppFramework\App",
"type": "::",
"args": [
"OCA\AppAPI\Controller\DaemonConfigController",
"verifyDaemonConnection",
[
"OC\AppFramework\DependencyInjection\DIContainer"
],
[
"docker_AIO",
"app_api.DaemonConfig.verifyDaemonConnection"
]
]
},
{
"file": "/var/www/html/lib/base.php",
"line": 1069,
"function": "match",
"class": "OC\Route\Router",
"type": "->",
"args": [
"/apps/app_api/daemons/docker_AIO/check"
]
},
{
"file": "/var/www/html/index.php",
"line": 39,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
"Line": 460,
"message": "SSL certificate not found: ",
"exception": [],
"CustomMessage": "SSL certificate not found: "
},
"id": "658d6e1c330f1"
}

@raudraido I was able to reproduce the issue. Thank you for informing, I'll let you know when the fix will be available.