Closed crobinson42 closed 7 years ago
The best I could suggest right now is to clear node_modules
and npm install
again. Note that this will remove any plugins that are not installed by default (and re-install those you might have previously manually uninstalled).
What version of npm/node are you running?
When this happens for me it's usually the node_modules
cache that strider-node saves and the data directory that need to be wiped.
I tried both recommendations - I restarted the strider instance and still hanging on environment step w/ node.
@oliversalzburg npm 3.10 & node 4.4.7
Might be worth putting some console logs in here https://github.com/Strider-CD/strider-runner-core/blob/master/lib/job.js#L394
did you run with DEBUG=strider*
After running DEBUG=strider*
I get this output when triggering a manual re test:
strider:backchannel job.prepare - strider.json not found, skipping config merge +29s
strider-simple-runner [runner:simple-runner] Queued new job. Project: crobinson42/therms Job ID: 57f67e84a2c5a642b3fdbaf9 +16s
strider:backchannel new job was created +19ms
strider:backchannel job saved +51ms
strider-simple-runner [runner:simple-runner] Job started. Project: crobinson42/therms Job ID: 57f67e84a2c5a642b3fdbaf9 +80ms
strider-simple-runner Initializing plugins... +1ms
strider-simple-runner Initializing plugin 'env'... +0ms
strider-simple-runner Initializing plugin 'node'... +0ms
strider-simple-runner Initializing plugin 'github-status'... +0ms
strider-simple-runner Initializing plugin 'slack'... +0ms
strider-simple-runner Initializing plugin 'custom'... +0ms
2016-10-06T16:40:36.893Z - error: strider-github-status initing +28s 57f67e84a2c5a642b3fdbaf9 undefined
2016-10-06T16:40:36.919Z - error: strider-github-status No github PR data +0ms undefined { __v: 0,
type: 'TEST_ONLY',
user_id: 579bc71a9967d34c693f99e1,
project:
{ _id: 579cc94c7277943d5e62fa11,
name: 'crobinson42/therms',
display_name: 'crobinson42/therms',
display_url: 'https://github.com/crobinson42/therms',
creator:
{ _id: 579bc71a9967d34c693f99e1,
account_level: 1,
hash: '$2a$10$Dxw9NKe6ip1Y.rSf1Eow6ODcsFXvtHErJeS8pN4FMXxRP0mopf9ci',
salt: '$2a$10$Dxw9NKe6ip1Y.rSf1Eow6O',
created: Fri Jul 29 2016 14:14:02 GMT-0700 (PDT),
email: 'cory@therms.io',
__v: 1,
jobs: [],
projects: [Object],
accounts: [Object] },
__v: 96,
provider:
{ id: 'github',
account: '5973579',
repo_id: '41843363',
config: [Object] },
branches: [ [Object], [Object], [Object], [Object] ],
prefetch_config: true,
public: false },
ref: { branch: 'release' },
created: Thu Oct 06 2016 09:40:36 GMT-0700 (PDT),
_id: 57f67e84a2c5a642b3fdbaf9,
errored: false,
warnings: [],
phases:
{ cleanup: { commands: [] },
deploy: { commands: [] },
test: { commands: [] },
prepare: { commands: [] },
environment: { commands: [] } },
trigger:
{ type: 'manual',
message: 'Manually Retesting release',
timestamp: Thu Oct 06 2016 09:40:36 GMT-0700 (PDT),
source: { page: 'unknown', type: 'UI' },
author:
{ id: 579bc71a9967d34c693f99e1,
email: 'cory@therms.io',
image: 'https://s.gravatar.com/avatar/f1a2d10ff256961db415c680ded13f6b' } },
providerConfig:
{ secret: 'db725cccd36e41a0bcca818c3153e56f6f072bdb229106d482926f1184243174',
url: 'git://github.com/crobinson42/therms.git',
owner: 'crobinson42',
repo: 'therms',
auth: { type: 'ssh' } },
fromStriderJson: false }
strider-custom:worker Compiled command +29s tar -zcf ../job-57f67e84a2c5a642b3fdbaf9.tar.gz .
cd ../
echo "+++ ssh'ing and creating transfer dir '~/therms-app'"
ssh -T admin@10.134.15.188 << EOF
rm -rf /home/admin/therms-app
sleep 10s
mkdir /home/admin/therms-app
EOF
scp job-57f67e84a2c5a642b3fdbaf9.tar.gz admin@10.134.15.188:/home/admin/therms-app/
ssh -T admin@10.134.15.188 << EOF
cd /home/admin/therms-app
tar -zxf job-57f67e84a2c5a642b3fdbaf9.tar.gz
sleep 5s
rm job-57f67e84a2c5a642b3fdbaf9.tar.gz
pm2 stop therms-1337
pm2 delete therms-1337
rm -rf /home/admin/therms-1337
mkdir /home/admin/therms-1337
cp -r * /home/admin/therms-1337
pm2 start /home/admin/therms-1337/app.js --name "therms-1337" -- --cron
rm -rf /home/admin/therms-1338
mkdir /home/admin/therms-1338
cp -r /home/admin/therms-app/. /home/admin/therms-1338
EOF
rm job-57f67e84a2c5a642b3fdbaf9.tar.gz
echo "+++ Deployment Complete."
exit 0;
strider-custom:worker Compiled command +2ms pwd
cd ../
pwd
ls -li
rm job-57f67e84a2c5a642b3fdbaf9.tar.gz
ls -li
strider-runner-core:job Creating new job "57f67e84a2c5a642b3fdbaf9" for project "crobinson42/therms" using provider "github". +38ms
strider-runner-core:job Running job "57f67e84a2c5a642b3fdbaf9"... +1ms
strider-runner-core:job Job "57f67e84a2c5a642b3fdbaf9" runs: +3ms node { cmd: 'n lts',
env:
{ NODE_ENV: 'development',
MOCHA_COLORS: 1,
N_PREFIX: '/home/admin/.strider/data/crobinson42-therms-release/.n',
PATH: ':/home/admin/.nvm/versions/node/v4.4.7/lib/node_modules/strider/node_modules/strider-node/node_modules/.bin:/home/admin/.strider/data/crobinson42-therms-release/job-57f67e84a2c5a642b3fdbaf9/.globals/node_modules/.bin:/home/admin/.nvm/versions/node/v4.4.7/lib/node_modules/strider/node_modules/strider-node/node_modules/n/bin:/home/admin/.strider/data/crobinson42-therms-release/.n/bin::::/home/admin/.nvm/versions/node/v4.4.7/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games',
HOME: '/home/admin',
LANG: 'en_US.UTF-8',
SSH_AUTH_SOCK: undefined,
PAAS_NAME: 'strider' } }
strider-runner-core:job Job "57f67e84a2c5a642b3fdbaf9" status: +12ms command.start { '0': 'command.start',
'1':
{ command: 'n lts',
started: Thu Oct 06 2016 09:40:36 GMT-0700 (PDT),
plugin: 'node',
time: Thu Oct 06 2016 09:40:36 GMT-0700 (PDT) } }
Using both n
and nvm
might be an issue. Although I don't understand why there is no output at all. But I've never used n
in Strider and it seems like you're running on 4.4.7 anyway, so there shouldn't really be a reason to use n lts
.
Using both n and nvm might be an issue.
@oliversalzburg I'm not clear on what you're referring to? I do use nvm
on the host with Node v4.4.7. In Strider, I am using the Node.js plugin. What is n
? That's what I see in the output during the environment step, which I don't think I have any control over.
https://www.dropbox.com/s/m5rty4jnfxrown1/Screenshot%202016-10-07%2009.10.26.png?dl=0
When you set the Node version to anything other than "whatever", Strider tries to change the Node version using n
, which is a tool similar to nvm
.
Ahh, setting to "whatever" skips the environment step and the build works fine. This is odd though, because I didn't change anything moving from Strider 1.8 to 1.9 - it worked with n
in 1.8...
@oliversalzburg Thanks for helping me out of this.
Sorry that I'm unable to clearly explain the reasons for this, because I don't really know myself. I don't know how exactly we changed the n
interaction since 1.8.
Personally, I'm not a fan of the whole n
version switching concept and have never used it in Strider.
I am however a big fan of using Docker to run your builds, where this whole thing should be a non-issue (you might run into other issues though ;P).
I upgraded strider from 1.8 to 1.9.4 and now the environment step will hang for hours. I tried uninstalling the node plugin and changing the configuration of which node version but no luck.
Any ideas?
*edit: I've checked the logs and there are no warnings or info in the logs regarding this.