Не удалось выполнить калибровочный тест - connectex: соединение не может быть установлено, поскольку целевая машина активно отказалась от него.

Я разрабатываю некоторые тесты с датчиком и python, но при выполнении спецификаций я получаю ошибку соединения, я проверил ошибку датчика и обнаружил, что grpc открывает соединение на 65271, и выдается ошибка для порта 65268.

Я что-то пропустил (это моя первая попытка)?

19-01-2021 17:20:38.022 [python] [INFO] Python: 3.9.0
19-01-2021 17:20:38.022 [python] [DEBUG] Loading step implementations from C:\workspace\test_gauge\step_impl dirs.
19-01-2021 17:20:38.061 [python] [DEBUG] Starting grpc server..
19-01-2021 17:20:38.066 [Gauge] [DEBUG] Attempting to connect to grpc server at port: 65268
19-01-2021 17:20:38.067 [Gauge] [DEBUG] Successfully made the connection with runner with port: 65268
19-01-2021 17:20:38.067 [Gauge] [DEBUG] Validation started.
19-01-2021 17:20:38.075 [Gauge] [DEBUG] Validation completed.
19-01-2021 17:20:38.075 [Gauge] [DEBUG] Run started
19-01-2021 17:20:38.076 [Gauge] [DEBUG] Starting Html Report plugin
19-01-2021 17:20:38.083 [Gauge] [DEBUG] Downloading https://downloads.gauge.org/plugin/python?l=python&p=html-report,java,python,screenshot&o=windows&a=amd64
19-01-2021 17:20:38.103 [Gauge] [DEBUG] Attempting to connect to grpc server at port: 65271
19-01-2021 17:20:38.103 [Gauge] [DEBUG] Successfully made the connection with plugin with port: 65271
19-01-2021 17:20:38.103 [Gauge] [DEBUG] Initialising suite data store.
19-01-2021 17:20:38.176 [Gauge] [DEBUG] Downloading https://downloads.gauge.org/plugin/screenshot?l=python&p=html-report,java,python,screenshot&o=windows&a=amd64
19-01-2021 17:20:38.217 [python] [CRITICAL] Exception occurred while loading step implementations from file: step_impl\webui\pages\login_page.py.
19-01-2021 17:20:38.220 [Gauge] [ERROR] Error Message: transport is closing
19-01-2021 17:20:38.220 [Gauge] [ERROR] Stacktrace: 
19-01-2021 17:20:38.220 [Gauge] [ERROR] Error Message: Runner is not Alive
19-01-2021 17:20:38.220 [Gauge] [ERROR] Stacktrace: 
19-01-2021 17:20:38.221 [html-report] [DEBUG] Transformed SuiteResult to report structure
19-01-2021 17:20:38.231 [Gauge] [ERROR] Error occurred while waiting for runner process to finish.
Error : exit status 1
19-01-2021 17:20:38.251 [Gauge] [DEBUG] Sending kill message to Html Report plugin.
19-01-2021 17:20:38.251 [html-report] [INFO] Successfully generated html-report to => C:\workspace\test_gauge\reports\html-report\index.html
19-01-2021 17:20:38.251 [html-report] [DEBUG] Done generating HTML report using theme from C:\Users\imrankhan\AppData\Roaming\gauge\plugins\html-report\4.0.12\themes\default
**19-01-2021 17:20:40.221 [Gauge] [ERROR] Failed to kill Runner: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:65268: connectex: No connection could be made because the target machine actively refused it."**
19-01-2021 17:20:40.221 [Gauge] [INFO] Specifications:  0 executed  0 passed    0 failed    0 skipped
19-01-2021 17:20:40.222 [Gauge] [INFO] Scenarios:   0 executed  0 passed    0 failed    0 skipped
19-01-2021 17:20:40.222 [Gauge] [INFO] 
Total time taken: 145ms
19-01-2021 17:20:40.224 [Gauge] [INFO] Updates are available. Run `gauge update -c` for more info.

person ImranRazaKhan    schedule 19.01.2021    source источник


Ответы (2)


Когда я вчера просмотрел журналы и много исследовал, похоже, что основная причина этой проблемы не в датчике, а в моих собственных сценариях (я думаю, вы тоже)

Обратите внимание, что есть ключевая строка [python] [CRITICAL] Исключение при загрузке реализации шага из файла: step_impl\webui\pages\login_page.py. в вашем журнале это знак, свидетельствующий о том, что с вашими скриптами Python что-то не так. Если вы не поймете, в чем дело с вашими скриптами на Python, эта проблема будет постоянно.

На первый взгляд, есть еще одна проблема, заключающаяся в том, что Gauge runner блокирует отображение подробной ошибки ваших скриптов Python (и моих), что вводит нас в заблуждение, когда мы указываем основную причину для Gauge runner, а не скрипты Python.

Короче говоря, Gauge runner не распечатывает подробные журналы ошибок для сценариев Python, но они есть.

person Michael Ma    schedule 03.02.2021

У меня точно такая же проблема, и я поднял тикет в github. Не повезло, потому что пока нет ответов. Эта проблема сводит меня с ума...

person Michael Ma    schedule 02.02.2021