简体   繁体   English

Plesk Obsidian、IISNode 和 Express 问题 - 应用程序只能在本地运行

[英]Plesk Obsidian, IISNode and Express problem - application only works locally

I have installed a Node.JS + Expres.JS application on my server, with IISNode and Plesk Obsidian.我在我的服务器上安装了一个 Node.JS + Expres.JS 应用程序,带有 IISNode 和 Plesk Obsidian。 When I surf the page in my browser I get this error:当我在浏览器中浏览页面时,出现此错误:

错误

I have already checked the permissions of the respective folders and the respective "App Identities" have the necessary permissions.我已经检查了各个文件夹的权限,并且各个“应用程序标识”具有必要的权限。 Every time I start my application, the following error message is written to the log:每次我启动我的应用程序时,都会将以下错误消息写入日志:

1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'start'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle lynx@0.0.0~prestart: lynx@0.0.0
6 info lifecycle lynx@0.0.0~start: lynx@0.0.0
7 verbose lifecycle lynx@0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle lynx@0.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Inetpub\vhosts\kiseni.com\test.kiseni.com\node_modules\.bin;C:\Program Files\nodejs;C:\Program Files (x86)\Mail Enable\BIN;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Mail Enable\BIN64;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Plesk\ctl;C:\Program Files\nodejs\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\.dotnet\tools;C:\Windows\system32\config\systemprofile\AppData\Roaming\npm;C:\Users\kiseniadmin\AppData\Local\Microsoft\WindowsApps
9 verbose lifecycle lynx@0.0.0~start: CWD: C:\Inetpub\vhosts\kiseni.com\test.kiseni.com
10 silly lifecycle lynx@0.0.0~start: Args: [ '/d /s /c', 'node ./bin/www' ]
11 silly lifecycle lynx@0.0.0~start: Returned: code: 1  signal: null
12 info lifecycle lynx@0.0.0~start: Failed to exec start script
13 verbose stack Error: lynx@0.0.0 start: `node ./bin/www`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:223:5)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:223:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid lynx@0.0.0
15 verbose cwd C:\Inetpub\vhosts\kiseni.com\test.kiseni.com
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
18 verbose node v12.15.0
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error lynx@0.0.0 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the lynx@0.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

The funny part is that after this error the application is available locally on the server at localhost:3000, but outside the application still has the iisnode error from the first screenshot有趣的是,在此错误之后,应用程序在 localhost:3000 的服务器上本地可用,但在应用程序外部仍然有第一个屏幕截图中的 iisnode 错误

I am grateful for any help!我很感激任何帮助!

The substatus 1002 is IISNODE_ERROR_PIPE_CONNECTION_BEFORE_PROCESS_TERMINATED .子状态 1002 是IISNODE_ERROR_PIPE_CONNECTION_BEFORE_PROCESS_TERMINATED This means your process has terminated, so iisnode cannot pipe data to your node process.这意味着您的进程已终止,因此 iisnode 无法将 pipe 数据发送到您的节点进程。 Your logs confirm that indeed your process is not starting successfully.您的日志确认您的进程确实没有成功启动。

You need to figure out why your node process fails to start.您需要弄清楚为什么您的节点进程无法启动。 Adding some logging to see how far you get before it crashes will help.添加一些日志记录以查看在崩溃之前您能走多远会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM