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

do exit 0 for no service started #868

Closed
vdelendik opened this issue Aug 31, 2023 · 2 comments
Closed

do exit 0 for no service started #868

vdelendik opened this issue Aug 31, 2023 · 2 comments
Assignees
Milestone

Comments

@vdelendik
Copy link
Contributor

2023-08-31T14:10:47.413Z INF/device:resources:service 92 [52...d9] STFService up to date
2023-08-31T14:10:47.414Z INF/device:plugins:service 92 [52...d9] Launching agent
2023-08-31T14:10:50.169Z INF/device:plugins:service 92 [52...d9] Agent says: "Starting minitouch agent"
2023-08-31T14:10:50.257Z INF/device:plugins:service 92 [52...d9] Agent says: "Listening on @stfagent"
2023-08-31T14:10:50.260Z INF/device:plugins:service 92 [52...d9] Launching service
2023-08-31T14:10:50.261Z INF/device:plugins:service 92 [52...d9] using 'startservice' command for API 25
2023-08-31T14:10:50.281Z INF/device:plugins:service 92 [52...d9] Agent says: "InputClient started"
2023-08-31T14:10:52.323Z INF/provider 7 [] Providing 0 of 1 device(s); waiting for "52...d9"
2023-08-31T14:10:52.843Z FTL/device 92 [52...d9] Setup had an error Error: Service had an error: "Error: Not found; no service started."
at /opt/lib/units/device/plugins/service.js:104:23
From previous event:
at /opt/lib/units/device/plugins/service.js:79:14
at processImmediate (node:internal/timers:466:21)
2023-08-31T14:10:52.844Z FTL/util:lifecycle 92 [52...d9] Shutting down due to fatal error with optional error : undefined
2023-08-31T14:10:52.921Z INF/provider 7 [
] Cleaning up device worker "52...d9"
2023-08-31T14:10:52.921Z ERR/provider 7 [] Device worker "52...d9" died with code 1
2023-08-31T14:10:52.921Z INF/provider 7 [
] Restarting device worker "52...d9"
2023-08-31T14:10:55.679Z INF/db 111 [52...d9] Connecting to 10.199.0.16:28015
2023-08-31T14:10:55.711Z INF/device:support:push 111 [52...d9] Sending output to "tcp://10.199.0.16:7270"
2023-08-31T14:10:55.714Z INF/device 111 [52...d9] Preparing device
2023-08-31T14:10:58.441Z INF/device:support:sub 111 [52...d9] Receiving input from "tcp://10.199.0.16:7250"
2023-08-31T14:10:58.450Z INF/device:support:sub 111 [52...d9] Subscribing to permanent channel "ALL"
2023-08-31T14:10:58.993Z INF/device:support:properties 111 [52...d9] Loading properties
2023-08-31T14:10:59.219Z INF/device:support:sdk 111 [52...d9] Supports SDK 25
2023-08-31T14:10:59.220Z INF/device:support:abi 111 [52...d9] Supports ABIs armeabi-v7a, armeabi
2023-08-31T14:10:59.555Z INF/device:resources:minicap 111 [52...d9] Installing "/opt/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/armeabi-v7a/bin/minicap" as "/data/local/tmp/minicap"
2023-08-31T14:10:59.557Z INF/device:resources:minicap 111 [52...d9] Installing "/opt/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/armeabi-v7a/lib/android-25/minicap.so" as "/data/local/tmp/minicap.so"
2023-08-31T14:10:59.558Z INF/device:resources:minicap 111 [52...d9] Installing "/opt/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk" as "/data/local/tmp/minicap.apk"
2023-08-31T14:11:00.844Z INF/device:resources:service 111 [52...d9] Checking whether we need to install STFService
2023-08-31T14:11:02.333Z INF/provider 7 [
] Providing 0 of 1 device(s); waiting for "52...d9"
2023-08-31T14:11:03.451Z INF/device:resources:service 111 [52...d9] Running version check
2023-08-31T14:11:05.944Z INF/device:resources:service 111 [52...d9] STFService up to date
2023-08-31T14:11:05.945Z INF/device:plugins:service 111 [52...d9] Launching agent
2023-08-31T14:11:08.763Z INF/device:plugins:service 111 [52...d9] Agent says: "Starting minitouch agent"
2023-08-31T14:11:08.817Z INF/device:plugins:service 111 [52...d9] Agent says: "Listening on @stfagent"
2023-08-31T14:11:08.851Z INF/device:plugins:service 111 [52...d9] Launching service
2023-08-31T14:11:08.851Z INF/device:plugins:service 111 [52...d9] using 'startservice' command for API 25
2023-08-31T14:11:08.932Z INF/device:plugins:service 111 [52...d9] Agent says: "InputClient started"
2023-08-31T14:11:11.574Z FTL/device 111 [52...d9] Setup had an error Error: Service had an error: "Error: Not found; no service started."
at /opt/lib/units/device/plugins/service.js:104:23
From previous event:
at /opt/lib/units/device/plugins/service.js:79:14
at processImmediate (node:internal/timers:466:21)
2023-08-31T14:11:11.587Z FTL/util:lifecycle 111 [52...d9] Shutting down due to fatal error with optional error : undefined
2023-08-31T14:11:11.692Z INF/provider 7 [] Cleaning up device worker "52...d9"
2023-08-31T14:11:11.692Z ERR/provider 7 [
] Device worker "52...d9" died with code 1
2023-08-31T14:11:11.692Z INF/provider 7 [] Restarting device worker "52...d9"
2023-08-31T14:11:12.344Z INF/provider 7 [
] Providing 0 of 1 device(s); waiting for "52...d9"
2023-08-31T14:11:14.907Z INF/db 124 [52...d9] Connecting to 10.199.0.16:28015
2023-08-31T14:11:14.957Z INF/device:support:push 124 [52...d9] Sending output to "tcp://10.199.0.16:7270"
2023-08-31T14:11:14.963Z INF/device 124 [52...d9] Preparing device
2023-08-31T14:11:19.785Z INF/device:support:sub 124 [52...d9] Receiving input from "tcp://10.199.0.16:7250"
2023-08-31T14:11:19.924Z INF/device:support:sub 124 [52...d9] Subscribing to permanent channel "ALL"
2023-08-31T14:11:20.312Z INF/device:support:properties 124 [52...d9] Loading properties
2023-08-31T14:11:20.510Z INF/device:support:sdk 124 [52...d9] Supports SDK 25
2023-08-31T14:11:20.516Z INF/device:support:abi 124 [52...d9] Supports ABIs armeabi-v7a, armeabi
2023-08-31T14:11:20.851Z INF/device:resources:minicap 124 [52...d9] Installing "/opt/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/armeabi-v7a/bin/minicap" as "/data/local/tmp/minicap"
2023-08-31T14:11:20.853Z INF/device:resources:minicap 124 [52...d9] Installing "/opt/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/armeabi-v7a/lib/android-25/minicap.so" as "/data/local/tmp/minicap.so"
2023-08-31T14:11:20.855Z INF/device:resources:minicap 124 [52...d9] Installing "/opt/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk" as "/data/local/tmp/minicap.apk"
2023-08-31T14:11:22.080Z INF/device:resources:service 124 [52...d9] Checking whether we need to install STFService
2023-08-31T14:11:22.361Z INF/provider 7 [
] Providing 0 of 1 device(s); waiting for "52...d9"
2023-08-31T14:11:25.677Z INF/device:resources:service 124 [52...d9] Running version check
2023-08-31T14:11:28.344Z INF/device:resources:service 124 [52...d9] STFService up to date
2023-08-31T14:11:28.346Z INF/device:plugins:service 124 [52...d9] Launching agent

@vdelendik vdelendik changed the title do exit 1 for no service started do exit 0 for no service started Jan 10, 2024
@vdelendik
Copy link
Contributor Author

updated exit code status to 0 as there is no sense to continue with restarts if STFService couldn't be installed on device.
also going to move to the stf as it should be covered on this side

@vdelendik vdelendik transferred this issue from zebrunner/mcloud-device Jan 10, 2024
@vdelendik vdelendik added this to the 2.6.3 milestone Jan 10, 2024
vdelendik added a commit that referenced this issue Jan 18, 2024
#868 Exit code 0 for 'no service started'
@dhreben
Copy link
Contributor

dhreben commented Jan 22, 2024

Verified

  1. Force stop STF service on device
  2. docker logs -f device-H.....2369

Expected result: Exit status: 0

2024-01-22T13:54:09.310Z FTL/device:plugins:service 21 [FA74SBN02369] Service connection could not be relaunched Error: Service had an error: "Error: Not found; no service started."
    at /opt/lib/units/device/plugins/service.js:104:23
From previous event:
    at /opt/lib/units/device/plugins/service.js:79:14
    at processImmediate (node:internal/timers:466:21)
2024-01-22T13:54:09.310Z FTL/util:lifecycle 21 [FA74SBN02369] Shutting down due to fatal error with optional error :  undefined
2024-01-22T13:54:09.323Z INF/provider 8 [*] Cleaning up device worker "FA74SBN02369"
2024-01-22T13:54:09.324Z ERR/provider 8 [*] Device worker "FA74SBN02369" died with code 1
2024-01-22T13:54:09.325Z INF/util:lifecycle 8 [*] Winding down for graceful exit, with optional error :  ExitError: Exit code "1"
    at ChildProcess.exitListener (/opt/lib/units/provider/index.js:208:29)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
  code: 1
}
Warning: .then() only accepts functions but was passed: [object Object]
    at /opt/lib/units/provider/index.js:305:42
    at processImmediate (node:internal/timers:466:21)
From previous event:
    at Timeout.work [as _onTimeout] (/opt/lib/units/provider/index.js:289:17)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
Unhandled rejection ExitError: Exit code "1"
    at ChildProcess.exitListener (/opt/lib/units/provider/index.js:208:29)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
2024-01-22T13:54:09.336Z WRN/db 8 [*] Connection closed
Exit status: 0

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

No branches or pull requests

3 participants