Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed run demo in docker under centos #101

Closed
lijiarui opened this issue Nov 22, 2016 · 8 comments
Closed

failed run demo in docker under centos #101

lijiarui opened this issue Nov 22, 2016 · 8 comments

Comments

@lijiarui
Copy link
Member

lijiarui commented Nov 22, 2016

Run npm run doctor or wechaty run doctor(for docker user), paste output here

[@s1183.bx.sys.d ~/kzge]# wechaty run doctor
 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.wechaty.io
  ____                            _   _
 / ___|___  _ __  _ __   ___  ___| |_(_)_ __   __ _
| |   / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | |  __/ (__| |_| | | | | (_| |
 \____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
                                              |___/
  ____ _           _   ____        _
 / ___| |__   __ _| |_| __ )  ___ | |_ ___
| |   | '_ \ / _` | __|  _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
 \____|_| |_|\__,_|\__|____/ \___/ \__|___/


Starting Wechaty ... v0.6.22


> wechaty@0.6.22 doctor /wechaty
> ts-node bin/doctor

SILL Brolog WECHATY_LOG set level to silly
SILL StateMonitor constructor(Wechaty, standby)
VERB Wechaty contructor()
SILL Wechaty version() test Error: spawnSync git ENOENT

#### Wechaty Doctor

1. Wechaty version: 0.6.22
2. Linux x64 version 3.10.0-327.10.1.el7.x86_64 memory 2997/7822 MB
3. Docker: true
4. Node version: v7.1.0


 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.wechaty.io
  _____      _ _      ___
 | ____|_  _(_) |_   / _ \
 |  _| \ \/ / | __| | | | |
 | |___ >  <| | |_  | |_| |
 |_____/_/\_\_|\__|  \___/

[@s1183.bx.sys.d ~/kzge]#

Steps to reproduce the behavior (and fixes, if any)

It's hard for me to run my code under centos, then I tried run demo, I found it's hard to run too.
I tried several times but all failed.

The server under the internal network of my company, when I use my laptop to run demo under company's network, it happened frequently, so can it might be the network problem? or what can I do to fix this problem?

Could you help me find the reason?

Paste the full output logs here with WECHATY_LOG=silly set

[@s1183.bx.sys.d ~/kzge]# docker run -t -i --rm -e WECHATY_LOG="silly" --volume="$(pwd)":/bot --name=wechaty zixia/wechaty:0.6.22 run demo
 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.wechaty.io
  ____                            _   _
 / ___|___  _ __  _ __   ___  ___| |_(_)_ __   __ _
| |   / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | |  __/ (__| |_| | | | | (_| |
 \____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
                                              |___/
  ____ _           _   ____        _
 / ___| |__   __ _| |_| __ )  ___ | |_ ___
| |   | '_ \ / _` | __|  _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
 \____|_| |_|\__,_|\__|____/ \___/ \__|___/


Starting Wechaty ... v0.6.22


> wechaty@0.6.22 demo /wechaty
> ts-node example/ding-dong-bot.ts

SILL Brolog WECHATY_LOG set level to silly

| __        __        _           _
| \ \      / /__  ___| |__   __ _| |_ _   _
|  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
|   \ V  V /  __/ (__| | | | (_| | |_| |_| |
|    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
|                                     |___/

=============== Powered by Wechaty ===============
-------- https://github.com/zixia/wechaty --------

I'm a bot, my super power is talk in Wechat.

If you send me a 'ding', I will reply you a 'dong'!
__________________________________________________

Hope you like it, and you are very welcome to
upgrade me for more super powers!

Please wait... I'm trying to login in...


SILL StateMonitor constructor(Wechaty, standby)
VERB Wechaty contructor()
VERB Wechaty addListener(login, function)
VERB Wechaty addListener(logout, function)
VERB Wechaty addListener(error, function)
VERB Wechaty addListener(scan, function)
VERB Wechaty addListener(message, function)
SILL Wechaty version() test ENOENT: no such file or directory, stat '/wechaty/dist/.git'
INFO Wechaty v0.6.22 initializing...
VERB Wechaty puppet: web
VERB Wechaty head: chrome
VERB Wechaty profile: demo.wechaty.json
VERB Wechaty uuid: 699e57c5-20c7-4cd2-9de0-b8c8094f653a
SILL StateMonitor Wechaty:current() standby
VERB StateMonitor Wechaty:target(ready) <- (standby)
VERB StateMonitor Wechaty:current(ready,false) <- (standby,true)
SILL StateMonitor constructor(Puppet, dead)
VERB Config puppetInstance(PuppetWeb)
VERB PuppetWeb init() with head:chrome, profile:demo.wechaty.json
VERB StateMonitor Puppet:target(live) <- (dead)
VERB StateMonitor Puppet:current(live,false) <- (dead,true)
SILL UtilLib getPort(18788)
SILL UtilLib getPort(18788) return: 19207
VERB PuppetWeb init() getPort 19207
VERB PuppetWeb initServer()
SILL StateMonitor Puppet:target() live
VERB PuppetWebServer init() on port 19207
VERB PuppetWebServer createHttpsServer() listen on port 19207
VERB PuppetWeb initServer() done
VERB PuppetWeb initBrowser()
SILL StateMonitor constructor(Browser, close)
VERB PuppetWebBrowser constructor() with head(chrome) sessionFile(demo.wechaty.json)
VERB PuppetWebBrowserDriver constructor(chrome)
VERB PuppetWebBrowserCookie constructor(BrowserDriver, demo.wechaty.json)
SILL StateMonitor Puppet:target() live
VERB PuppetWebBrowser init()
SILL StateMonitor Browser:current() close
VERB StateMonitor Browser:target(open) <- (close)
VERB StateMonitor Browser:current(open,false) <- (close,true)
VERB PuppetWebBrowserDriver init() for head: chrome
VERB PuppetWebBrowserDriver initChromeDriver()
VERB PuppetWebBrowserDriver initChromeDriver() wechaty in docker confirmed(should not show this in CI)
VERB PuppetWebBrowserDriver initChromeDriver() new Builder()
VERB PuppetWebBrowserDriver initChromeDriver() new Builder() done
VERB PuppetWebBrowserDriver valid()
VERB PuppetWebBrowserDriver valid() getSession()
VERB PuppetWebBrowserDriver valid() getSession() done
VERB PuppetWebBrowserDriver valid() driver.getSession() done(out)
VERB PuppetWebBrowserDriver valid() driver.executeScript() done
SILL PuppetWebBrowserDriver valid() driver ok
VERB PuppetWebBrowserDriver initChromeDriver() valid() done: true
SILL PuppetWebBrowserDriver initChromeDriver() success
VERB PuppetWebBrowser init() driver.init() done
VERB PuppetWebBrowser open(https://wx.qq.com/zh_CN/htmledition/v2/images/webwxgeticon.jpg)
VERB PuppetWebBrowserCookie load() from demo.wechaty.json
SILL PuppetWebBrowserCookie load() skipped: session store file not exist
VERB PuppetWebBrowser open(https://wx.qq.com)
SILL StateMonitor Browser:target() open
VERB StateMonitor Browser:current(open,true) <- (open,false)
VERB PuppetWeb initBrowser() done
VERB PuppetWeb initBridge()
VERB PuppetWebBridge new Bridge({puppet: PuppetWeb, port: 19207})
SILL StateMonitor Puppet:target() live
VERB PuppetWebBridge init()
VERB PuppetWebBridge inject()
VERB PuppetWebBridge getInjectio()
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute("injectioReturnValue = /** * * Wechaty - Wechat for Bot, and human who talk to  ... ")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge inject() eval(Wechaty) return code[200] message[WechatyBro Inject Done] port[19207]
VERB PuppetWebBridge proxyWechaty(init, )
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge inject() Wechaty.init() return code[200] message[WechatyBro Init Succ on port: 19207] port[19207]
VERB PuppetWebBridge ding(inject())
VERB PuppetWebBridge proxyWechaty(ding, inject())
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge inject() ding success
VERB PuppetWeb initBridge() done
VERB StateMonitor Puppet:current(live,true) <- (live,false)
SILL PuppetWebWatchdog onFeed: 120000, HEARTBEAT[inited]
SILL StateMonitor Puppet:target() live
SILL StateMonitor Puppet:inprocess() false
VERB PuppetWebWatchdog clearWatchDogTimer() nothing to clear
SILL PuppetWebWatchdog clearWatchDogTimer() [NaN] seconds left
SILL PuppetWebWatchdog setWatchDogTimer(120000, HEARTBEAT:[inited])
SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
SILL PuppetWebWatchdog autoSaveSession()
VERB PuppetWebWatchdog autoSaveSession() skiped as no this.userId
SILL PuppetWebWatchdog memoryCheck() free: 2821 MB, require: 4 MB
VERB PuppetWeb init() done
VERB StateMonitor Wechaty:current(ready,true) <- (ready,false)
VERB PuppetWebWatchdog watchDogReset(120000, HEARTBEAT:[inited])
VERB PuppetWebWatchdog watchDogReset() watchdog reset after 120 seconds, last feed:[HEARTBEAT:[inited]]
INFO Bot error: Error: watchDogReset() watchdog reset after 120 seconds, last feed:[HEARTBEAT:[inited]]
VERB PuppetWebEvent onBrowserDead(watchDogReset() watchdog reset after 120 seconds, last feed:[HEARTBEAT:[inited]])
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL StateMonitor Browser:stable() is true
VERB PuppetWebEvent onBrowserDead() Browser:state target(open) current(open) stable(true)
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:inprocess() false
SILL PuppetWebWatchdog onFeed: 180000, HEARTBEAT[onBrowserDead() set a timeout of 180 seconds to prevent unknown state change]
SILL StateMonitor Puppet:target() live
SILL StateMonitor Puppet:inprocess() false
SILL PuppetWebWatchdog clearWatchDogTimer() [0] seconds left
SILL PuppetWebWatchdog setWatchDogTimer(180000, HEARTBEAT:[onBrowserDead() set a timeout of 180 seconds to prevent unknown state change])
SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
SILL PuppetWebWatchdog autoSaveSession()
VERB PuppetWebWatchdog autoSaveSession() skiped as no this.userId
SILL PuppetWebWatchdog memoryCheck() free: 2819 MB, require: 4 MB
VERB PuppetWebBrowser quit()
SILL StateMonitor Browser:current() open
VERB StateMonitor Browser:target(close) <- (open)
VERB StateMonitor Browser:current(close,false) <- (open,true)
SILL PuppetWebBrowser quit() driver.close() done
SILL PuppetWebBrowser quit() driver.quit() done
VERB PuppetWebBrowser clean(kill=false)
SILL PuppetWebBrowser clean() retryPromise: attempt 1 time for timeout 11250
VERB PuppetWebBrowser getBrowserPidList()
SILL PuppetWebBrowser getBrowserPids() child: {"PPID":"33","PID":"41","STAT":"S","COMMAND":"chromedriver"}
SILL PuppetWebBrowser getBrowserPids() child: {"PPID":"33","PID":"502","STAT":"R","COMMAND":"ps"}
VERB StateMonitor Browser:current(close,true) <- (close,false)
VERB PuppetWebEvent onBrowserDead() browser.quit() done
VERB PuppetWeb initBrowser()
SILL StateMonitor constructor(Browser, close)
VERB PuppetWebBrowser constructor() with head(chrome) sessionFile(demo.wechaty.json)
VERB PuppetWebBrowserDriver constructor(chrome)
VERB PuppetWebBrowserCookie constructor(BrowserDriver, demo.wechaty.json)
SILL StateMonitor Puppet:target() live
VERB PuppetWebBrowser init()
SILL StateMonitor Browser:current() close
VERB StateMonitor Browser:target(open) <- (close)
VERB StateMonitor Browser:current(open,false) <- (close,true)
VERB PuppetWebBrowserDriver init() for head: chrome
VERB PuppetWebBrowserDriver initChromeDriver()
VERB PuppetWebBrowserDriver initChromeDriver() wechaty in docker confirmed(should not show this in CI)
VERB PuppetWebBrowserDriver initChromeDriver() new Builder()
VERB PuppetWebBrowserDriver initChromeDriver() new Builder() done
VERB PuppetWebBrowserDriver valid()
VERB PuppetWebBrowserDriver valid() getSession()
VERB PuppetWebBrowserDriver valid() getSession() done
VERB PuppetWebBrowserDriver valid() driver.getSession() done(out)
VERB PuppetWebBrowserDriver valid() driver.executeScript() done
SILL PuppetWebBrowserDriver valid() driver ok
VERB PuppetWebBrowserDriver initChromeDriver() valid() done: true
SILL PuppetWebBrowserDriver initChromeDriver() success
VERB PuppetWebBrowser init() driver.init() done
VERB PuppetWebBrowser open(https://wx.qq.com/zh_CN/htmledition/v2/images/webwxgeticon.jpg)
VERB PuppetWebBrowserCookie load() from demo.wechaty.json
SILL PuppetWebBrowserCookie load() skipped: session store file not exist
VERB PuppetWebBrowser open(https://wx.qq.com)
SILL StateMonitor Browser:target() open
VERB StateMonitor Browser:current(open,true) <- (open,false)
VERB PuppetWebEvent onBrowserDead() new browser inited
VERB PuppetWeb initBridge()
VERB PuppetWebBridge new Bridge({puppet: PuppetWeb, port: 19207})
SILL StateMonitor Puppet:target() live
VERB PuppetWebBridge init()
VERB PuppetWebBridge inject()
VERB PuppetWebBridge getInjectio()
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute("injectioReturnValue = /** * * Wechaty - Wechat for Bot, and human who talk to  ... ")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge inject() eval(Wechaty) return code[200] message[WechatyBro Inject Done] port[19207]
VERB PuppetWebBridge proxyWechaty(init, )
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge inject() Wechaty.init() return code[200] message[WechatyBro Init Succ on port: 19207] port[19207]
VERB PuppetWebBridge ding(inject())
VERB PuppetWebBridge proxyWechaty(ding, inject())
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge inject() ding success
VERB PuppetWebEvent onBrowserDead() bridge re-inited
VERB PuppetWebBridge ding(undefined)
VERB PuppetWebBridge proxyWechaty(ding, )
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
SILL StateMonitor Browser:target() open
SILL StateMonitor Browser:current() open
VERB PuppetWebEvent onBrowserDead() ding() works well after reset
VERB PuppetWebEvent onBrowserDead() new browser borned
SILL PuppetWebWatchdog onFeed: 60000, POISON[onBrowserDead() new browser borned]
VERB PuppetWebWatchdog onFeed(type=POSISON) WANG! I dead!
SILL PuppetWebWatchdog clearWatchDogTimer() [149] seconds left
@huan
Copy link
Member

huan commented Nov 22, 2016

Has no enough information to reproduce the issue.

Please provide steps as simple as possible to let others reproducing your problem.

@Whuhxh
Copy link

Whuhxh commented Nov 23, 2016

i got the same problem

@huan
Copy link
Member

huan commented Nov 24, 2016

@Whuhxh What's the meaning of "same problem", could you describe with more details?

Do you also use CentOS, and can not run docker run zixia/wechaty demo successfully? If so, you need to provide the steps to reproduce it, Or there's no way to find the problem out.

@Whuhxh
Copy link

Whuhxh commented Nov 24, 2016

@zixia
alias wechaty='docker run -t -i --rm -e WECHATY_LOG="silly" --volume="$(pwd)":/bot --name=wechaty zixia/wechaty:0.6.22'
wechaty run demo
when i run this cmd, i got the same log

@huan
Copy link
Member

huan commented Nov 24, 2016

@Whuhxh

Three questions for you:

  1. Are you using CentOS?
  2. If 1 is true, what's the CentOS version you are using?
  3. How to get the same environment of your CentOS to reproduce it?

@Whuhxh
Copy link

Whuhxh commented Nov 24, 2016

@zixia this is my os info
[@s1183.bx.sys.d /usr/lib/node_modules]# uname -r
3.10.0-327.10.1.el7.x86_64
i mean finally i got the same result
SILL PuppetWebWatchdog onFeed: 60000, POISON[onBrowserDead() new browser borned]
VERB PuppetWebWatchdog onFeed(type=POSISON) WANG! I dead!
SILL PuppetWebWatchdog clearWatchDogTimer() [149] seconds left

@huan
Copy link
Member

huan commented Dec 7, 2016

Are there any others who can not run Wechaty Docker under CentOS?

I don't think there will be any difference between CentOS and Debian/Ubuntu, so I believe it should run without any issues because it's run by Docker.

@huan
Copy link
Member

huan commented Dec 8, 2016

Please feel free to reopen this issue if anybody can provide steps to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants