Сбой Phantomjs на Дженкинсе: автоконфигурация не удалась - PullRequest
0 голосов
/ 29 мая 2018

Я пытаюсь запустить свои угловые тест-кейсы на Дженкинсе.Но мой запуск PhantomJS не удался.

Журналы консоли:

Angular CLI: 1.6.8
Node: 8.4.0
OS: linux x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.8
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.8
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0
Test cases starting........
[36m29 05 2018 08:44:10.977:DEBUG [config]: [39mLoading config /jenkins/workspace/strategic-insights/tcpa_test_integration/web/tcpa-service/src/main/resources/assets-ts/karma.conf.js
[36m29 05 2018 08:44:10.981:DEBUG [config]: [39mautoWatch set to false, because of singleRun
[36m29 05 2018 08:44:10.982:DEBUG [plugin]: [39mLoading inlined plugin (defining framework:jasmine).
[36m29 05 2018 08:44:10.983:DEBUG [plugin]: [39mLoading inlined plugin (defining launcher:Chrome, launcher:ChromeHeadless, launcher:ChromeCanary, launcher:ChromeCanaryHeadless, launcher:Chromium, launcher:ChromiumHeadless, launcher:Dartium, test).
[36m29 05 2018 08:44:10.983:DEBUG [plugin]: [39mLoading inlined plugin (defining launcher:PhantomJS).
[36m29 05 2018 08:44:10.983:DEBUG [plugin]: [39mLoading inlined plugin (defining reporter:kjhtml).
[36m29 05 2018 08:44:10.983:DEBUG [plugin]: [39mLoading inlined plugin (defining reporter:coverage-istanbul).
[36m29 05 2018 08:44:10.983:DEBUG [plugin]: [39mLoading inlined plugin (defining reporter:junit).
[36m29 05 2018 08:44:10.983:DEBUG [plugin]: [39mLoading inlined plugin (defining framework:@angular/cli, preprocessor:@angular/cli, reporter:@angular/cli, middleware:angularCliBlocker).
[36m29 05 2018 08:44:11.161:DEBUG [web-server]: [39mInstantiating middleware
[36m29 05 2018 08:44:11.162:DEBUG [reporter]: [39mTrying to load reporter: @angular/cli
[36m29 05 2018 08:44:11.163:DEBUG [reporter]: [39mTrying to load color-version of reporter: @angular/cli (@angular/cli_color)
[36m29 05 2018 08:44:11.163:DEBUG [reporter]: [39mCouldn't load color-version.
[36m29 05 2018 08:44:11.171:DEBUG [reporter]: [39mTrying to load reporter: kjhtml
[36m29 05 2018 08:44:11.172:DEBUG [reporter]: [39mTrying to load color-version of reporter: kjhtml (kjhtml_color)
[36m29 05 2018 08:44:11.172:DEBUG [reporter]: [39mCouldn't load color-version.
[36m29 05 2018 08:44:11.174:DEBUG [reporter]: [39mTrying to load reporter: junit
[36m29 05 2018 08:44:11.174:DEBUG [reporter]: [39mTrying to load color-version of reporter: junit (junit_color)
[36m29 05 2018 08:44:11.175:DEBUG [reporter]: [39mCouldn't load color-version.
[32m29 05 2018 08:44:16.960:INFO [karma]: [39mKarma v2.0.2 server started at http://0.0.0.0:9876/
[32m29 05 2018 08:44:16.960:INFO [launcher]: [39mLaunching browser PhantomJS with unlimited concurrency
[32m29 05 2018 08:44:16.976:INFO [launcher]: [39mStarting browser PhantomJS
[36m29 05 2018 08:44:16.977:DEBUG [temp-dir]: [39mCreating temp dir at /tmp/karma-12192205
[36m29 05 2018 08:44:16.981:DEBUG [launcher]: [39m/jenkins/workspace/strategic-insights/tcpa_test_integration/web/tcpa-service/src/main/resources/assets-ts/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /tmp/karma-12192205/capture.js
[31m29 05 2018 08:44:17.170:ERROR [phantomjs.launcher]: [39mAuto configuration failed
140062385686304:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
140062385686304:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
140062385686304:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[36m29 05 2018 08:44:17.172:DEBUG [launcher]: [39mProcess PhantomJS exited with code 1
[31m29 05 2018 08:44:17.173:ERROR [launcher]: [39mCannot start PhantomJS
    Auto configuration failed
140062385686304:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
140062385686304:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
140062385686304:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[31m29 05 2018 08:44:17.173:ERROR [launcher]: [39mPhantomJS stdout: 
[31m29 05 2018 08:44:17.173:ERROR [launcher]: [39mPhantomJS stderr: Auto configuration failed
140062385686304:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
140062385686304:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
140062385686304:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[36m29 05 2018 08:44:17.173:DEBUG [temp-dir]: [39mCleaning temp dir /tmp/karma-12192205
[32m29 05 2018 08:44:17.193:INFO [launcher]: [39mTrying to start PhantomJS again (1/2).
[36m29 05 2018 08:44:17.195:DEBUG [launcher]: [39mRestarting PhantomJS
[36m29 05 2018 08:44:17.195:DEBUG [temp-dir]: [39mCreating temp dir at /tmp/karma-12192205
[36m29 05 2018 08:44:17.197:DEBUG [launcher]: [39m/jenkins/workspace/strategic-insights/tcpa_test_integration/web/tcpa-service/src/main/resources/assets-ts/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /tmp/karma-12192205/capture.js /tmp/karma-12192205/capture.js
[31m29 05 2018 08:44:17.293:ERROR [phantomjs.launcher]: [39mAuto configuration failed
139712722933536:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
139712722933536:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
139712722933536:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[36m29 05 2018 08:44:17.294:DEBUG [launcher]: [39mProcess PhantomJS exited with code 1
[31m29 05 2018 08:44:17.294:ERROR [launcher]: [39mCannot start PhantomJS
    Auto configuration failed
139712722933536:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
139712722933536:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
139712722933536:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[31m29 05 2018 08:44:17.294:ERROR [launcher]: [39mPhantomJS stdout: 
[31m29 05 2018 08:44:17.295:ERROR [launcher]: [39mPhantomJS stderr: Auto configuration failed
139712722933536:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
139712722933536:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
139712722933536:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[36m29 05 2018 08:44:17.295:DEBUG [temp-dir]: [39mCleaning temp dir /tmp/karma-12192205
[32m29 05 2018 08:44:17.658:INFO [launcher]: [39mTrying to start PhantomJS again (2/2).
[36m29 05 2018 08:44:17.690:DEBUG [launcher]: [39mRestarting PhantomJS
[36m29 05 2018 08:44:17.690:DEBUG [temp-dir]: [39mCreating temp dir at /tmp/karma-12192205
[36m29 05 2018 08:44:17.692:DEBUG [launcher]: [39m/jenkins/workspace/strategic-insights/tcpa_test_integration/web/tcpa-service/src/main/resources/assets-ts/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /tmp/karma-12192205/capture.js /tmp/karma-12192205/capture.js /tmp/karma-12192205/capture.js
[31m29 05 2018 08:44:17.839:ERROR [phantomjs.launcher]: [39mAuto configuration failed
139955798914848:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
139955798914848:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
139955798914848:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[36m29 05 2018 08:44:17.839:DEBUG [launcher]: [39mProcess PhantomJS exited with code 1
[31m29 05 2018 08:44:17.839:ERROR [launcher]: [39mCannot start PhantomJS
    Auto configuration failed
139955798914848:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
139955798914848:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
139955798914848:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[31m29 05 2018 08:44:17.840:ERROR [launcher]: [39mPhantomJS stdout: 
[31m29 05 2018 08:44:17.840:ERROR [launcher]: [39mPhantomJS stderr: Auto configuration failed
139955798914848:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb')
139955798914848:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174:
139955798914848:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:

[36m29 05 2018 08:44:17.840:DEBUG [temp-dir]: [39mCleaning temp dir /tmp/karma-12192205
[31m29 05 2018 08:44:18.331:ERROR [launcher]: [39mPhantomJS failed 2 times (cannot start). Giving up.
[36m29 05 2018 08:44:18.332:DEBUG [karma]: [39mRun complete, exiting.
[36m29 05 2018 08:44:18.333:DEBUG [launcher]: [39mDisconnecting all browsers
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Что я могу сделать из журналов, это то, что ему нужен доступ к файлу '/ etc / ssl / openssl.cnf.Но разрешение отклонено.

У меня нет прав на изменение разрешений машины, на которой работает сервер jenkins.Нужна помощь.

1 Ответ

0 голосов
/ 05 июля 2019

Я сталкивался с той же проблемой.Я создал файл openssl.cnf и добавил его путь в переменную OPENSSL_CONF.

В частности, добавьте следующую строку в скрипт jenkins перед выполнением 'npm run test'.

export OPENSSL_CONF=$WORKSPACE/openssl.cnf

Файл conf не обязательно должен бытьничего конкретного.Любой пример openssl.conf должен работать.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...