上周服务器意外重启了一次 没有关闭azkaban ,周一开发反馈无法执行任务
排查了一下azkaban-exec-server 没有什么报错 然后排查azkaban-web-server ,发现
azkaban 一直在尝试连接某个端口
java.util.concurrent.ExecutionException: org.apache.http.conn.HttpHostConnectException: Connect to uhadoop-mvd4qu-core6:6836 [uhadoop-mvd4qu
-core6/192.168.102.11] failed: Connection refused (Connection refused)
问了一下也没查到这个端口是干嘛了 。查了一下官方文档 这应该是azkaban的临时端口 存在数据库里
use azkaban
mysql> select * from executors;
+----+----------------------+-------+--------+
| id | host | port | active |
+----+----------------------+-------+--------+
| 1 | uhadoop-mvd4qu-core6 | 29210 | 1 |
| 2 | uhadoop-mvd4qu-core6 | 27310 | 0 |
| 3 | uhadoop-mvd4qu-core6 | 6836 | 1 |
| 11 | uhadoop-mvd4qu-core6 | 14886 | 0 |
+----+----------------------+-------+--------+
数据库里一堆端口 看来这些active的就是之前用的临时端口 。意外重启之后更新不了
直接
truncate executors;
重启exec之后生成了新的
mysql> select * from executors;
+----+----------------------+-------+--------+
| id | host | port | active |
+----+----------------------+-------+--------+
| 1 | uhadoop-mvd4qu-core6 | 11142 | 0 |
+----+----------------------+-------+--------+
但是 是0 如果这时候启动webserver
会提示你没有活动的端口
手动update一下
update executors set active=1 where port=11142 ;
虽然webserver能启动了但是提示这个错误
2021/09/06 14:33:46.706 +0800 ERROR [ExecutorManager] [AzkabanWebServer-QueueProcessor-Thread] [Azkaban] Rolling back executor assignment fo
r execution id:3714
azkaban.executor.ExecutorManagerException: executor became inactive before setting up the flow 3714
想起了azkaban的端口是需要手动激活的
curl http://${executorHost}:${executorPort}/executor?action=activate
激活一下 再测试 就可以执行了