背景:
- 我们正在尝试通过 AWS-Greengrass 连接器服务将 App 作为 docker 容器部署到边缘设备(在 Linux 环境中将 Greengrass 核心作为容器运行)。
- 我们正在为 docker 应用程序部署在云中配置 greengrass 组连接器。
问题:
从 AWS greengrass 组(AWS 云)进行部署时,我们能够看到成功的部署消息,但应用程序没有部署到边缘设备(将 greengrass 核心作为容器运行)。
日志:
- DockerApplicationDeploymentLog:
[2020-11-05T10:35:42.632Z][致命]-lambda_runtime.py:381,由于异常无法初始化 Lambda 运行时:“getgrnam(): name not found: 'docker'” [2020-11-05T10 :35:44.789Z][WARN]-ipc_client.py:162,deprecated arg port=8000 将被忽略 [2020-11-05T10:35:45.012Z][WARN]-ipc_client.py:162,deprecated arg port= 8000 将被忽略 [2020-11-05T10:35:45.012Z][INFO]-docker_deployer.py:41,docker deployer 启动 [2020-11-05T10:35:45.012Z][INFO]-docker_deployer.py: 45,检查输入 [2020-11-05T10:35:45.012Z][INFO]-docker_deployer.py:52,docker 组权限 [2020-11-05T10:35:45.02Z][FATAL]-lambda_runtime.py:141 ,由于异常,无法导入处理函数“handlers.function_handler”:“getgrnam(): name not found: 'docker'”
- 运行时系统日志:
[2020-11-05T10:31:49.78Z][DEBUG]-重启worker,因为它被杀死了。{“workerId”:“8b0ee21d-e481-4d27-5e30-cb4d912547f5”,“funcArn”:“arn:aws:lambda:ap-south-1:aws:function:DockerApplicationDeployment:6”} [2020-11-05T10: 31:49.78Z][DEBUG]-后备工作人员。{“workerId”:“8b0ee21d-e481-4d27-5e30-cb4d912547f5”,“funcArn”:“arn:aws:lambda:ap-south-1:aws:function:DockerApplicationDeployment:6”} [2020-11-05T10: 31:49.78Z][DEBUG]-开始尝试:{“尝试计数”:0,“workerId”:“8b0ee21d-e481-4d27-5e30-cb4d912547f5”,“funcArn”:“arn:aws:lambda:ap- south-1:aws:function:DockerApplicationDeployment:6"} [2020-11-05T10:31:49.78Z][DEBUG]-创建目录。{“目录”:“/greengrass/ggc/packages/1.11. {“functionArn”:“arn:aws:lambda:ap-south-1:aws:function:DockerApplicationDeployment:6”,“workerId”:“8b0ee21d-e481-4d27-5e30-cb4d912547f5”} [2020-11-05T10: 31:49.82Z][DEBUG]-启动工作进程。{"workerId": "8b0ee21d-e481-4d27-5e30-cb4d912547f5"} [2020-11-05T10:31:49.829Z][DEBUG]-工作进程已启动。{"workerId": "8b0ee21d-e481-4d27-5e30-cb4d912547f5", "pid": 20471} [2020-11-05T10:31:49.83Z][DEBUG]-开始工作结果:{"workerId": "8b0ee21d -e481-4d27-5e30-cb4d912547f5", "funcArn": "arn:aws:lambda:ap-south-1:aws:function:DockerApplicationDeployment:6", "state": "Starting", "initDurationSeconds": 0.012234454} [2020-11-05T10:31:49.831Z][INFO]-创建的工人。{“functionArn”:“arn:aws:lambda:ap-south-1:aws:function:DockerApplicationDeployment:6”,“workerId”:“8b0ee21d-e481-4d27-5e30-cb4d912547f5”,“pid”:20471} [ 2020-11-05T10:31:53.155Z][DEBUG]-收到凭据提供程序请求 {"serverLambdaArn":"arn:aws:lambda:::function:GGTES", "clientId":"8b0ee21d-e481-4d27- 5e30-cb4d912547f5"} [2020-11-05T10:31:53.156Z][DEBUG]-WorkManager 开始工作 {"workerId": "148f7a1a-168f-40a5-682d-92e00d56a5df", "funcArn": "arn:aws: lambda:::function:GGTES", "invocationId": "955c2c43-1187-4001-7988-4213b95eb584"} [2020-11-05T10:31:53.156Z][DEBUG]-成功获取工作。{“invocationId”:“955c2c43-1187-4001-7988-4213b95eb584”,“fromWorkerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”,“ofFunction”:“arn:aws:lambda:::function:GGTES”} [2020-11-05T10:31:53.156Z][调试]-发布工作结果。{“invocationId”:“955c2c43-1187-4001-7988-4213b95eb584”,“ofFunction”:“arn:aws:lambda:::function:GGTES”} [2020-11-05T10:31:53.156Z][调试] -WorkManager 放置工作结果。{“workerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”,“invocationId”:“955c2c43-1187-4001-7988-4213b95eb584”} [2020-11-05T10:31:53.156Z][DEBUG]-WorkManager把工作结果成功。{“workerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”,“invocationId”:“955c2c43-1187-4001-7988-4213b95eb584”} [2020-11-05T10:31:53。156Z][DEBUG]-成功发布工作结果。{“invocationId”:“955c2c43-1187-4001-7988-4213b95eb584”,“ofFunction”:“arn:aws:lambda:::function:GGTES”} [2020-11-05T10:31:53.157Z][调试] - 处理凭据提供程序请求 {"clientId": "8b0ee21d-e481-4d27-5e30-cb4d912547f5"} [2020-11-05T10:31:53.158Z][DEBUG]-GET 工作项。{“fromWorkerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”,“ofFunction”:“arn:aws:lambda:::function:GGTES”} [2020-11-05T10:31:53.158Z][调试] -工人计时器不存在。{“workerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”} 53.157Z][DEBUG]-处理凭据提供程序请求 {"clientId":"8b0ee21d-e481-4d27-5e30-cb4d912547f5"} [2020-11-05T10:31:53.158Z][DEBUG]-GET 工作项。{“fromWorkerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”,“ofFunction”:“arn:aws:lambda:::function:GGTES”} [2020-11-05T10:31:53.158Z][调试] -工人计时器不存在。{“workerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”} 53.157Z][DEBUG]-处理凭据提供程序请求 {"clientId":"8b0ee21d-e481-4d27-5e30-cb4d912547f5"} [2020-11-05T10:31:53.158Z][DEBUG]-GET 工作项。{“fromWorkerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”,“ofFunction”:“arn:aws:lambda:::function:GGTES”} [2020-11-05T10:31:53.158Z][调试] -工人计时器不存在。{“workerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”} 不存在。{“workerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”} 不存在。{“workerId”:“148f7a1a-168f-40a5-682d-92e00d56a5df”}