Macaca [求助] macaca reliable-master 创建分发任务报异常~

PEPSI · November 14, 2018 · Last by PEPSI replied at November 15, 2018 · 954 hits

背景:

部门近来准备进行APP-UI自动化测试框架的实施,对市面上相关的框架做了初步调研,Appnium偏重,再加上macaca可以和python(大部分测试人员为python知识储备)无缝对接,所以选择了开源的macaca进行落地,前路一路无话,了解nodejs基础,部署环境,进行基本用例设计.用例设计完毕后也不能一味的本地执行,So考虑需要分离部署和分布式执行,因此主角reliable开始登场了.

配置:

- Reliable master server OS->CentOS release 6.9 (Final)
- Reliable master server system内核->2.6.32-642.6.1.el6.x86_64
- Reliable master node version->v8.12.0
- Reliable slave OS->window7

过程:

Reliable部署过程参考---一步步布署 Reliable 系列之-Master (非 Docker) (在此表示由衷的感谢@sencho,由于服务器系统内核版本较低所以选择了非docker方式部署😅 )

问题:

Reliable master正常启动,Reliable slave正常启动,master日志显示已经成功有slave连接,master后台创建任务日志报异常,slave接收不到从服务器派发的任务信息

备注:

1. 系统搭建完毕如图(系统搭建完毕后,还没来的及高兴,问题也随之而来):

2. Reliable Slave日志:

    λ ./bin/reliable-macaca-slave-server -m 192.168.2.27:8888 --verbose
>> index.js:58:14 [master] pid:4560 worker fork success
>> index.js:61:14 [master] pid:4560 worker online
>> index.js:64:14 [master] pid:4560 listening worker id: 1, pid: 8968, address: 10.255.2.134:4000
>> index.js:149:12 [worker:1] pid:8968 slave init with
{ webPort: 8080,
verbose: true,
ios: false,
port: 4000,
master: 'http://192.168.2.27:8888',
ip: '10.255.2.134' }
>> index.js:54:12 [worker:1] pid:8968 Zmq Reconnecting...
>> index.js:78:10 [worker:1] pid:8968 Connected to the master server.
>> index.js:9:10 [worker:1] pid:8968 base middlewares attached
>> render.js:15:8 [worker:1] pid:8968 render view path: D:\reliable-macaca-slave\web\views
>> index.js:15:12 [worker:1] pid:8968 middleware: inject registed
>> index.js:15:12 [worker:1] pid:8968 middleware: favicon registed
>> index.js:15:12 [worker:1] pid:8968 middleware: powerby registed
>> index.js:15:12 [worker:1] pid:8968 middleware: static registed
>> channel.js:69:16 [worker:1] pid:8968
<--- zmq message
{ sysInfo:
{ cpus:
[ { model: 'Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz',
speed: 2592,
times:
{ user: 1092849,
nice: 0,
sys: 1105391,
idle: 25109250,
irq: 207668 } },
{ model: 'Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz',
speed: 2592,
times: { user: 175813, nice: 0, sys: 732190, idle: 26399191, irq: 499437 } },
{ model: 'Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz',
speed: 2592,
times: { user: 1004880, nice: 0, sys: 646374, idle: 25655815, irq: 5803 } },
{ model: 'Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz',
speed: 2592,
times: { user: 150634, nice: 0, sys: 114114, idle: 27042196, irq: 8970 } },
{ model: 'Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz',
speed: 2592,
times: { user: 1178088, nice: 0, sys: 830128, idle: 25298604, irq: 6349 } },
{ model: 'Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz',
speed: 2592,
times: { user: 116751, nice: 0, sys: 119075, idle: 27070869, irq: 6240 } },
{ model: 'Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz',
speed: 2592,
times: { user: 1026268, nice: 0, sys: 783000, idle: 25497302, irq: 5600 } },
{ model: 'Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz',
speed: 2592,
times: { user: 134706, nice: 0, sys: 110589, idle: 27061150, irq: 4524 } },
[length]: 8 ],
memory: 0.5015092058310607,
type: 'Windows_NT',
platform: 'win32',
uptime: '0d 7h 35m',
release: '6.1.7601',
hostname: 'Anonymous-PC',
port: undefined },
type: 'ack',
data: 'hello master',
status: 'ack' }
>> Temp directory not existed, check after one day.
>> index.js:64:14 [master] pid:4560 listening worker id: 1, pid: 8968, address: 10.255.2.134:8080
>> Slave Web Server start with options
{ webPort: 8080,
verbose: true,
ios: false,
port: 4000,
master: 'http://192.168.2.27:8888',
ip: '10.255.2.134' }
>> index.js:64:14 [master] pid:4560 listening worker id: 1, pid: 8968, address: 10.255.2.134:8080

3. Reliable master服务器日志片段:

    >> manager.js:34:12 [master] pid:24385 connect to tcp://10.255.2.134:4000**###说明:10.255.2.134是slave机器ip,通过日志看到已经连接到master服务器上
>> run.js:87:14 [master] pid:24385 dispatch success with data
{ message: 'project' }
>> project.js:19:12 [worker:7] pid:24425 insert new project queue record
>> run.js:87:14 [master] pid:24385 dispatch success with data
{ message: 'dispatch' }
>> manager.js:103:14 [master] pid:24385 no available slaves to dispatch
>> manager.js:133:14 [master] pid:24385 no available slave to dispatch
>> run.js:87:14 [master] pid:24385 dispatch success with data
{ message: 'project' }

4. 服务器显示Slave连接截图

5.在任务面板新建任务后,Reliable master报如下错误

>> badgeboard.js:32:12 [worker:4] pid:26325 TypeError: Cannot read property 'status' of null
at dataAdapter (/data/app/reliable-master/web/controllers/badgeboard.js:24:25)
at dataAdapter.next (<anonymous>)
at onFulfilled (/data/app/reliable-master/node_modules/co/index.js:65:19)
at newTickHandler (/data/app/reliable-master/node_modules/mpromise/lib/promise.js:229:18)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)

请论坛中的各位大神帮忙看一下,不胜感谢!

共收到 6 条回复 时间 点赞

大神们都很忙,帮你顶起来!

😆 相当不容易 继续鼓捣....

小马 回复

非常感谢支持~☀

山姆大叔 回复

嗯呐,感谢!🌞

macaca不错,就是资料偏少,一路要踩不少坑,坛子里牛人云集,希望楼主的问题能够尽快得到解决😃

Su 回复

感谢支持~🐹

PEPSI [Topic was deleted] 中提及了此贴 15 Nov 11:31
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up