2016-11-20 3 views
0

У меня было приложение на OpenShift почти два месяца, и внезапно я получаю сообщение об ошибке, ссылающееся на Bcrypt. Все работало до последней недели. Я исчерпал свой поиск и, ожидая ответа на проблему, хотел узнать, есть ли у кого-либо другие проблемы с этим.OpenShift Ошибка ссылки Bcrypt

Вот моя зависимость Я использую

"bcryptjs": "~ 2.3.0",

Counting objects: 4, done. 
 
Delta compression using up to 8 threads. 
 
Compressing objects: 100% (3/3), done. 
 
Writing objects: 100% (4/4), 942 bytes | 0 bytes/s, done. 
 
Total 4 (delta 1), reused 0 (delta 0) 
 
remote: Stopping NodeJS cartridge 
 
remote: Stopping PHPMyAdmin cartridge 
 
remote: Repairing links for 1 deployments 
 
remote: Saving away previously installed Node modules 
 
remote: Building git ref 'master', commit 0470fcd 
 
remote: Building NodeJS cartridge 
 
remote: npm info it worked if it ends with ok 
 
remote: npm info using [email protected] 
 
remote: npm info using [email protected] 
 
remote: npm info preinstall [email protected] 
 
remote: npm info package.json [email protected] fs is also the name of a node core module. 
 
remote: npm info package.json [email protected] No description 
 
remote: npm info package.json [email protected] No repository field. 
 
remote: npm info package.json [email protected] No README data 
 
remote: npm info package.json [email protected] No license field. 
 
remote: npm info package.json [email protected] No license field. 
 
remote: npm info build /var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo 
 
remote: npm info linkStuff [email protected] 
 
remote: npm info build /var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/node_modules/bcrypt 
 
remote: npm info preinstall [email protected] 
 
remote: npm info linkStuff [email protected] 
 
remote: npm info install [email protected] 
 
remote: 
 
remote: > [email protected] install /var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/node_modules/bcrypt 
 
remote: > node-gyp rebuild 
 
remote: 
 
remote: gyp info it worked if it ends with ok 
 
remote: gyp info using [email protected] 
 
remote: gyp info using [email protected] | linux | x64 
 
remote: gyp info spawn /usr/bin/python2 
 
remote: gyp info spawn args [ '/opt/rh/v8314/root/usr/bin/gyp', 
 
remote: gyp info spawn args 'binding.gyp', 
 
remote: gyp info spawn args '-f', 
 
remote: gyp info spawn args 'make', 
 
remote: gyp info spawn args '-I', 
 
remote: gyp info spawn args '/var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/node_modules/bcrypt/build/config.gypi', 
 
remote: gyp info spawn args '-I', 
 
remote: gyp info spawn args '/opt/rh/nodejs010/root/usr/lib/node_modules/node-gyp/addon-rpm.gypi', 
 
remote: gyp info spawn args '-I', 
 
remote: gyp info spawn args '/opt/rh/nodejs010/root/usr/include/node/common.gypi', 
 
remote: gyp info spawn args '-Dlibrary=shared_library', 
 
remote: gyp info spawn args '-Dvisibility=default', 
 
remote: gyp info spawn args '-Dnode_root_dir=/opt/rh/nodejs010/root/usr/share/node', 
 
remote: gyp info spawn args '-Dnode_gyp_dir=/opt/rh/nodejs010/root/usr/lib/node_modules/node-gyp', 
 
remote: gyp info spawn args '-Dnode_lib_file=node.lib', 
 
remote: gyp info spawn args '-Dmodule_root_dir=/var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/node_modules/bcrypt', 
 
remote: gyp info spawn args '--depth=.', 
 
remote: gyp info spawn args '--generator-output', 
 
remote: gyp info spawn args 'build', 
 
remote: gyp info spawn args '-Goutput_dir=.' ] 
 
remote: gyp info spawn make 
 
remote: gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] 
 
remote: make: Entering directory `/var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/node_modules/bcrypt/build' 
 
remote: make: Warning: File `../binding.gyp' has modification time 2e+02 s in the future 
 
remote: ACTION Regenerating Makefile 
 
remote: gyp: binding.gyp not found (cwd: /var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/node_modules/bcrypt/build) while trying to load binding.gyp 
 
remote: make: *** [Makefile] Error 1 
 
remote: make: Leaving directory `/var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/node_modules/bcrypt/build' 
 
remote: gyp ERR! build error 
 
remote: gyp ERR! stack Error: `make` failed with exit code: 2 
 
remote: gyp ERR! stack  at ChildProcess.onExit (/opt/rh/nodejs010/root/usr/lib/node_modules/node-gyp/lib/build.js:276:23) 
 
remote: gyp ERR! stack  at ChildProcess.emit (events.js:98:17) 
 
remote: gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:820:12) 
 
remote: gyp ERR! System Linux 2.6.32-642.6.2.el6.x86_64 
 
remote: gyp ERR! command "node" "/opt/rh/nodejs010/root/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
 
remote: gyp ERR! cwd /var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/node_modules/bcrypt 
 
remote: gyp ERR! node -v v0.10.35 
 
remote: gyp ERR! node-gyp -v v3.2.0 
 
remote: gyp ERR! not ok 
 
remote: 
 
remote: npm info [email protected] Failed to exec install script 
 
remote: npm ERR! Linux 2.6.32-642.6.2.el6.x86_64 
 
remote: npm ERR! argv "node" "/opt/rh/nodejs010/root/usr/bin/npm" "install" "-d 
 
remote: npm ERR! node v0.10.35 
 
remote: npm ERR! npm v2.14.13 
 
remote: npm ERR! code ELIFECYCLE 
 
remote: npm ERR! [email protected] install: `node-gyp rebuild` 
 
remote: npm ERR! Exit status 1 
 
remote: npm ERR! 
 
remote: npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
 
remote: npm ERR! This is most likely a problem with the bcrypt package, 
 
remote: npm ERR! not with npm itself. 
 
remote: npm ERR! Tell the author that this fails on your system: 
 
remote: npm ERR!  node-gyp rebuild 
 
remote: npm ERR! You can get their info via: 
 
remote: npm ERR!  npm owner ls bcrypt 
 
remote: npm ERR! There is likely additional logging output above. 
 
remote: 
 
remote: npm ERR! Please include the following file with any support request: 
 
remote: npm ERR!  /var/lib/openshift/57e0858289f5cf73ea0000bd/app-root/runtime/repo/npm-debug.log 
 
remote: An error occurred executing 'gear postreceive' (exit code: 1) 
 
remote: Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/57e0858289f5cf73ea0000bd/nodejs 
 
remote: 
 
remote: For more details about the problem, try running the command again with the '--trace' option.

Я не знаю, почему все вдруг я я получаю эту ошибку.

ответ

0

Суть вашей ошибки такова:
/binding.gyp' has modification time 2e+02 s in the future.

Это происходит потому, что у вашего контейнера Openshift каким-то образом были установлены системные часы в прошлом.

Easy Fix
легкий путь, чтобы просто изменить метку времени модификации файла bindings.gyp быть, что из контейнера. Так что в вашем Dockerfile, запустите следующий

RUN echo 'Getting current timestamp' 
RUN date 
RUN echo 'Getting timestamp of binding.gyp' 
RUN stat -c %y binding.gyp 
RUN touch -m binding.gyp 
RUN npm install 

Long Term Fix
Лучшим решением было бы выяснить, почему ваши контейнеры имеют свои часы перекос. У докеров для клиента Mac есть известная проблема с тем, что контейнеры теряют свои часы при каждом переходе Mac в режим ожидания = https://forums.docker.com/t/syncing-clock-with-host/10432/22

Смежные вопросы