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

Restart service when bot is off - [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return. #158

Open
hailiang-wang opened this issue Oct 4, 2021 · 2 comments

Comments

@hailiang-wang
Copy link
Collaborator

Service does not work, with following trace.

 21:00:54 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | ERROR (server):
osschat_1  |     type: "error"
osschat_1  | INFO (server): Connected
osschat_1  | 21:09:33 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 21:18:12 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 21:26:51 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 21:35:30 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 21:44:09 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 21:52:48 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 22:01:27 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 22:10:06 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 22:18:45 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 22:27:24 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 22:36:02 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 22:44:41 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 22:53:20 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.                                                     osschat_1  | 23:01:59 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.                                                     osschat_1  | 23:10:38 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 23:19:17 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 23:27:56 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 23:36:35 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 23:45:14 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 23:53:53 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 00:02:32 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 00:11:10 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 00:17:44 INFO Chatops roomMessage(21588818228@chatroom, https://github.com/chatopera/cskefu/issues/480#issuecomment-933057883)
osschat_1  | 00:17:44 ERR Chatops roomMessage() this.bot is offline
osschat_1  | 00:17:44 INFO Chatops roomMessage(21588818228@chatroom, UrlLink<https://github.com/chatopera/cskefu/issues/480#issuecomment-933057883>)
osschat_1  | 00:17:44 ERR Chatops roomMessage() this.bot is offline
osschat_1  | INFO (http): POST / 200 - 19ms
osschat_1  | INFO (server): POST http://localhost:3000/ - 200
osschat_1  | INFO (http): POST / 200 - 0ms
osschat_1  | INFO (server): POST http://localhost:3000/ - 200
osschat_1  | 00:19:49 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 00:19:55 INFO Config registering process.on("unhandledRejection") for development/debug
osschat_1  | 00:19:55 VERB Config constructor()
osschat_1  | 00:19:55 VERB Wechaty init() getRavenDsn() return undefined, skipped.
osschat_1  | 00:19:55 VERB wechaty-puppet-service monkeyPatchMetadataFromHttp2Headers()
osschat_1  | 00:19:55 VERB ResolverWechaty setup()
osschat_1  | 00:19:55 VERB getWechaty getHAWechaty()
osschat_1  | 00:19:55 VERB getMemory getMemory(heroku-wechaty)
osschat_1  | 00:19:55 VERB getMemory getMemory() creating new file memory
osschat_1  | 00:19:55 VERB MemoryCard constructor({"name":"heroku-wechaty"})

Describe the solution you'd like

When OSSChat is restarted, the bot is up and works.

Auto detect the error and exit, as later the server would auto restart with some monitor.

@hailiang-wang hailiang-wang changed the title Restart service when bot is off Restart service when bot is off - [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return. Oct 4, 2021
@huan
Copy link
Collaborator

huan commented Oct 4, 2021

It's very hard to understand the program situation without any reproducible steps.

HAWechaty definitely has lots of bugs (it's still WIP), and the PuppetPadlocal has issues sometimes too.

If we find any reproducible steps, I'd like to dig into them and see what happens.

@hailiang-wang
Copy link
Collaborator Author

更多日志

osschat_1  |     at /app/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js:10:197
osschat_1  |     at QueueAction.work (/app/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js:8:9)
osschat_1  |     at QueueAction.AsyncAction._execute (/app/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js:76:18)
osschat_1  |     at QueueAction.execute (/app/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js:41:18)
osschat_1  |     at QueueScheduler.AsyncScheduler.flush (/app/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js:39:33)
osschat_1  |     at QueueAction.schedule (/app/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js:35:24)
osschat_1  |     at QueueScheduler.Scheduler.schedule (/app/node_modules/rxjs/dist/cjs/internal/Scheduler.js:13:57)
osschat_1  |     at Object.executeSchedule (/app/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js:7:42)
osschat_1  |     at /app/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js:10:126
osschat_1  |     at OperatorSubscriber._this._next (/app/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
osschat_1  |     at OperatorSubscriber.Subscriber.next (/app/node_modules/rxjs/dist/cjs/internal/Subscriber.js:72:18)
osschat_1  |     at /app/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:28:28
osschat_1  |     at OperatorSubscriber._this._next (/app/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
osschat_1  |     at OperatorSubscriber.Subscriber.next (/app/node_modules/rxjs/dist/cjs/internal/Subscriber.js:72:18)
osschat_1  |     at /app/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:28:28
osschat_1  |     at OperatorSubscriber._this._next (/app/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
osschat_1  |     at OperatorSubscriber.Subscriber.next (/app/node_modules/rxjs/dist/cjs/internal/Subscriber.js:72:18)
osschat_1  |     at /app/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:28:28
osschat_1  |     at OperatorSubscriber._this._next (/app/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
osschat_1  |     at OperatorSubscriber.Subscriber.next (/app/node_modules/rxjs/dist/cjs/internal/Subscriber.js:72:18)
osschat_1  |     at /app/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js:17:190
osschat_1  |     at OperatorSubscriber._this._next (/app/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
osschat_1  |     at OperatorSubscriber.Subscriber.next (/app/node_modules/rxjs/dist/cjs/internal/Subscriber.js:72:18)
osschat_1  |     at /app/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:28:28
osschat_1  |     at OperatorSubscriber._this._next (/app/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
osschat_1  |     at OperatorSubscriber.Subscriber.next (/app/node_modules/rxjs/dist/cjs/internal/Subscriber.js:72:18)
osschat_1  |     at /app/node_modules/rxjs/dist/cjs/internal/operators/map.js:10:24
osschat_1  |     at OperatorSubscriber._this._next (/app/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
osschat_1  |     at OperatorSubscriber.Subscriber.next (/app/node_modules/rxjs/dist/cjs/internal/Subscriber.js:72:18)
osschat_1  |     at AsyncAction.work (/app/node_modules/rxjs/dist/cjs/internal/observable/timer.js:28:28)
osschat_1  |     at AsyncAction._execute (/app/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js:76:18)
osschat_1  |     at AsyncAction.execute (/app/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js:64:26)
osschat_1  |     at AsyncScheduler.flush (/app/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js:39:33)
osschat_1  |     at listOnTimeout (internal/timers.js:557:17)
osschat_1  |     at processTimers (internal/timers.js:500:7)
osschat_1  | 06:28:42 VERB StateSwitch <PuppetPadlocal> ready(off, noCross=false)
osschat_1  | 06:28:42 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
osschat_1  | 06:29:22 VERB Contact say(ding)
osschat_1  | 06:30:50 VERB Contact say(ding)
osschat_1  | 06:32:18 VERB Contact say(ding)
osschat_1  | 06:33:47 VERB Contact say(ding)

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

2 participants