У меня есть подписка Visual Studio MSDN на платформе Microsoft Azure, поэтому я решил перенести свои приложения Heroku в облако Azure.
У меня есть 3 приложения, написанные на NodeJS, и 1 приложение на PHP. Я правильно развернул 2/3 приложения nodeJS, но не могу понять, что не так с третьим. Каждое приложение развертывается в отдельном репозитории BitBucket git. Репозитории для NodeJS имеют те же конфигурации:
- - Уровень доступа = Это частный репозиторий
- - Разветвление = Разрешить только частные разветвления
- - Целевая страница = Обзор
- - Язык сайта = Node.js
С точки зрения Azure (с использованием нового портала) у меня есть приложение NodeJS с именем rankk . Я использую тарифный план D1. Я правильно вижу 3 «приложения и слоты». Я установил непрерывную интеграцию, указывающую на мой репозиторий bitBucket для кода приложения rankk (имя приложения). Дело в том, что раздача всегда терпит неудачу (см. рисунок ниже):
Я уничтожил веб-приложение Azure и создал новое — та же ситуация.
Я уничтожил git-репозиторий BitBucket, создал новый, создал новое веб-приложение в Azure и связал их — та же ситуация
На данный момент как я понял там какие-то проблемы с "раздачей" кода приложения, но лазурное приложение и репозиторий git я думаю они видят друг друга.
Если я щелкну деталь сбоя (см. рисунок вверху, красный флажок), я просто увижу это (см. рисунок ниже):
Я не понимаю: почему у меня 4 зеленых флага справа и 1 красный флаг слева?
Последняя информация о вопросе: журналы приложения и веб-сервера пусты. Я думаю, что это означает отсутствие успеха распространения > отсутствие вечеринки (= отсутствие запуска приложения).
--ОБНОВЛЕНИЕ Благодаря Xiaomin Wu (здесь ниже) я получил последний полезный файл журнала. Смотрите здесь ниже:
<step title="Incoming Request" date="2016-01-04T21:30:24.268" instance="fa3789" url="/deploy?scmType=BitbucketGit" method="POST" type="request" pid="3700,2,61" Connection="Keep-Alive" Content-Length="74" Expect="100-continue" Host="rankk.scm.azurewebsites.net" User-Agent="Azure-WebSites-Controller/50.0.8598.1705" x-ms-request-id="b6d3869b-b6e1-44a7-b288-3640647d4283" X-SITE-DEPLOYMENT-ID="rankk" >
<step title="FetchHandler" date="2016-01-04T21:30:24.268" >
<step title="Attempting to fetch target branch master" date="2016-01-04T21:30:24.287" />
<!-- duration: 12ms -->
<step title="Assuming git repository at D:\home\site\repository" date="2016-01-04T21:30:24.332" />
<!-- duration: 0ms -->
<step title="Performing fetch based deployment" date="2016-01-04T21:30:24.441" >
<step title="Creating temporary deployment" date="2016-01-04T21:30:24.441" />
<!-- duration: 31ms -->
<step title="LibGit2SharpRepository Fetch" date="2016-01-04T21:30:24.693" />
<!-- duration: 0ms -->
<step title="Warning" date="2016-01-04T21:30:24.693" type="warning" text="LibGit2SharpRepository fallback to git.exe due to Unsupported URL protocol" />
<!-- duration: 16ms -->
<step title="Executing external process" date="2016-01-04T21:30:24.708" type="process" path="git.exe" arguments="remote add -t master external "[email protected]:sturm20/core.git"" >
<step title="Process dump" date="2016-01-04T21:30:24.740" exitCode="128" type="processOutput" />
<!-- duration: 16ms -->
</step>
<!-- duration: 47ms -->
<step title="Executing external process" date="2016-01-04T21:30:24.756" type="process" path="git.exe" arguments="remote rm external" />
<!-- duration: 143ms -->
<step title="Executing external process" date="2016-01-04T21:30:24.915" type="process" path="git.exe" arguments="remote add -t master external "[email protected]:sturm20/core.git"" />
<!-- duration: 641ms -->
<step title="Executing external process" date="2016-01-04T21:30:25.555" type="process" path="git.exe" arguments="branch" />
<!-- duration: 47ms -->
<step title="Executing external process" date="2016-01-04T21:30:25.602" type="process" path="git.exe" arguments="fetch external --progress" />
<!-- duration: 4937ms -->
<step title="Executing external process" date="2016-01-04T21:30:30.553" type="process" path="git.exe" arguments="update-ref refs/heads/master external/master" />
<!-- duration: 109ms -->
<step title="Executing external process" date="2016-01-04T21:30:30.678" type="process" path="git.exe" arguments="checkout master --force" />
<!-- duration: 1554ms -->
<step title="Executing external process" date="2016-01-04T21:30:32.231" type="process" path="git.exe" arguments="remote rm external" />
<!-- duration: 94ms -->
<step title="DeploymentManager.Deploy(id)" date="2016-01-04T21:30:32.341" >
<step title="Collecting changeset information" date="2016-01-04T21:30:32.356" />
<!-- duration: 31ms -->
<step title="Updating submodules" date="2016-01-04T21:30:32.403" />
<!-- duration: 47ms -->
<step title="Determining deployment builder" date="2016-01-04T21:30:32.513" >
<step title="Builder is NodeSiteBuilder" date="2016-01-04T21:30:34.617" />
<!-- duration: 0ms -->
</step>
<!-- duration: 2104ms -->
<step title="Copying SSH keys" date="2016-01-04T21:30:34.648" />
<!-- duration: 17ms -->
<step title="Building" date="2016-01-04T21:30:34.665" >
<step title="Generating deployment script" date="2016-01-04T21:30:34.713" >
<step title="Using cached version of the deployment script for command: -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --node --sitePath "D:\home\site\repository"" date="2016-01-04T21:30:34.744" />
<!-- duration: 0ms -->
</step>
<!-- duration: 32ms -->
<step title="Executing external process" date="2016-01-04T21:30:35.304" type="process" path="starter.cmd" arguments=""D:\home\site\deployments\tools\deploy.cmd"" >
<step title="Process dump" date="2016-01-04T21:31:05.444" exitCode="255" type="processOutput" />
<!-- duration: 16ms -->
</step>
<!-- duration: 30156ms -->
<step title="Error occurred" date="2016-01-04T21:31:05.459" type="error" text="npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] license should be a valid SPDX license expression
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading 32-bit node.lib
gyp ERR! stack at Request.<anonymous> (c:\Program Files (x86)\npm\2.11.2\node_modules\npm\node_modules\node-gyp\lib\install.js:377:20)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:169:7)
gyp ERR! stack at Request.onRequestResponse (c:\Program Files (x86)\npm\2.11.2\node_modules\npm\node_modules\request\request.js:1142:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:169:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack at Socket.socketOnData (_http_client.js:305:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "D:\\Program Files (x86)\\nodejs\\4.2.3\\node.exe" "c:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\home\site\wwwroot\node_modules\node-expat
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\0.12.6\\node.exe" "D:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\home\site\wwwroot\npm-debug.log
C:\Program Files (x86)\SiteExtensions\Kudu\50.41223.1987\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"" stackTrace=" at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args)
at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command)" />
<!-- duration: 16ms -->
</step>
<!-- duration: 30952ms -->
<step title="Error occurred" date="2016-01-04T21:31:05.617" type="error" text="npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] license should be a valid SPDX license expression
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading 32-bit node.lib
gyp ERR! stack at Request.<anonymous> (c:\Program Files (x86)\npm\2.11.2\node_modules\npm\node_modules\node-gyp\lib\install.js:377:20)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:169:7)
gyp ERR! stack at Request.onRequestResponse (c:\Program Files (x86)\npm\2.11.2\node_modules\npm\node_modules\request\request.js:1142:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:169:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack at Socket.socketOnData (_http_client.js:305:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "D:\\Program Files (x86)\\nodejs\\4.2.3\\node.exe" "c:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\home\site\wwwroot\node_modules\node-expat
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\0.12.6\\node.exe" "D:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\home\site\wwwroot\npm-debug.log
C:\Program Files (x86)\SiteExtensions\Kudu\50.41223.1987\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"" stackTrace=" at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args)
at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command)
at Kudu.Core.Deployment.Generator.GeneratorSiteBuilder.Build(DeploymentContext context)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Kudu.Core.Deployment.DeploymentManager.<Build>d__29.MoveNext()" />
<!-- duration: 0ms -->
</step>
<!-- duration: 33292ms -->
<step title="Cleaning up temp files" date="2016-01-04T21:31:05.633" />
<!-- duration: 16ms -->
<step title="WebHooksManager.PublishEventAsync: PostDeployment" date="2016-01-04T21:31:05.664" />
<!-- duration: 16ms -->
</step>
<!-- duration: 41254ms -->
</step>`enter code here`
<!-- duration: 41443ms -->
<step title="Outgoing response" date="2016-01-04T21:31:05.711" type="response" statusCode="200" statusText="OK" Server="Microsoft-IIS/8.0" Cache-Control="private" X-AspNet-Version="4.0.30319" />
<!-- duration: 0ms -->
</step>
<!-- duration: 41459ms -->
Теперь: почему node-gyp не строится в облаке, несмотря на успешную сборку на моей машине? Я должен обратиться к владельцу node-expat, но он, кажется, недоступен (см. скриншот ниже):
--UPDATE 2nd Как следует из приведенного ниже ответа, версия узла, работающая в моем приложении Azure, была 0.6.x. В моем package.json была версия 0.12.6. Версия 0.12.6 доступна в D:\Program Files (x86)\node > ls, и я установил ее в переменной приложения. Проблема решена, но изменена. Теперь я получил:
<step title="Error occurred" date="2016-01-09T23:39:01.588" type="error" text="npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm WARN package.json [email protected] No license field.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Program Files (x86)\npm\2.11.2\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "c:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\home\site\wwwroot\node_modules\node-expat
gyp ERR! node -v v0.12.6
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\0.12.6\\node.exe" "D:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\home\site\wwwroot\npm-debug.log
C:\Program Files (x86)\SiteExtensions\Kudu\51.50108.2013\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"" stackTrace=" at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args)
at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command, String message)" />
<!-- duration: 0ms -->
</step>
<!-- duration: 19761ms -->
<step title="Error occurred" date="2016-01-09T23:39:01.681" type="error" text="npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm WARN package.json [email protected] No license field.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Program Files (x86)\npm\2.11.2\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "c:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\home\site\wwwroot\node_modules\node-expat
gyp ERR! node -v v0.12.6
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\0.12.6\\node.exe" "D:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\home\site\wwwroot\npm-debug.log
C:\Program Files (x86)\SiteExtensions\Kudu\51.50108.2013\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"" stackTrace=" at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args)
at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command, String message)
at Kudu.Core.Deployment.Generator.GeneratorSiteBuilder.Build(DeploymentContext context)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Kudu.Core.Deployment.DeploymentManager.<Build>d__29.MoveNext()" />
<!-- duration: 0ms -->
</step>
https://{your site name}.scm.azurewebsites.net/DebugConsole
и перейти кD:\home\LogFiles\kudu\trace
. Найдите журнал, содержащий POST_deploy. Проверьте, нет ли ошибок/исключений - person Xiaomin Wu   schedule 05.01.2016DebugConsole\LogFiles\kudu\trace\2016-01-04T21-30-24_fa3789_243_POST_deploy_200_41s.xml
- person Francesco   schedule 05.01.2016