Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Crashing Issue running examples #231

Closed
randyho-kk opened this Issue Nov 7, 2012 · 29 comments

Comments

Projects
None yet
3 participants

I can't seem to get version 0.2 working. The last version i tried was 0.1.21 and it worked fine.

Is anyone else seeing this?

Here's my setup on a Server 2008 x64 System

  • Installed vcredist 2012 x64
  • installed node 0.8.12
  • installed iisnode iisnode-full-iis7-v0.2.0-x64.msi
  • ran setupsamples.bat as administrator

navigate browser to http://localhost/node

Result in browser:

Service Unavailable HTTP Error 503. The service is unavailable.

View Windows Event Log:
The Module DLL C:\Program Files\iisnode\iisnode.dll failed to load. The data is the error.

Checking IIS Manager i notice that my worker pool has stopped because of the crash.

Owner

tjanczuk commented Nov 7, 2012

Can you confirm if the application pool you are running in has the "Enable 32-bit applications" setting set to "False"? You can navigate there from IIS Manager, by right-clicking the application pool you use and choosing Advanced Settings.

That setting is set to False by default. If i set it to True the errors show up only when parsing node js files. I can hit the index.htm file with no crashing.

But attempting to navigate to hello.js now results in

HTTP Error 500.21 - Internal Server Error
Handler "iisnode" has a bad module "iisnode" in its module list

More info:

This doesn't seem to crash on windows 7 workstations. Not sure if that helps.

Owner

tjanczuk commented Nov 8, 2012

Can you inspect your %systemdrive%\Windows\System32\inetsrv\config\applicationHost.config file, find a globalModules section in it, and check the shape of the iisnode entry? It should look similar to:

<add name="iisnode" image="C:\Program Files\iisnode\iisnode.dll" preCondition="bitness64" />

C:\Windows\System32\inetsrv\config\applicationHost.config is empty on my windows 2008 x64 system.

Owner

tjanczuk commented Nov 8, 2012

That's interesting. Do you have any other files in that directory? Also, do you see C:\Windows\System32\inetsrv\config\schema\iisnode_schema.xml file? (If so, what's the content?)

Export
schema
administration.config
applicationHost.config
redirection.config

The applicationHost.config file has a date modified of the time i installed IISNode.

Interesting...i was editing the file with x86 gvim and was not able to see the contents. Opening it in notepad shows the contents.

anyways...

globalModules
<add name="iisnode" image="C:\Program Files\iisnode\iisnode.dll" preCondition="bitness64" />

Owner

tjanczuk commented Nov 8, 2012

That looks how I would exect it to. Can you get depends.exe from http://www.dependencywalker.com/, open the c:\program files\iisnode\iisnode.dll with it, and check if any of the DLLs it requires are missing on your system?

IESHIMS.DLL - Error opening file. The system cannot find the file specified (2).
LINKINFO.DLL - Error opening file. The system cannot find the file specified (2).

Owner

tjanczuk commented Nov 8, 2012

These should be fine.

Coming back to "Enable 32-bit applications". With that set to False, do you see the error even for index.html, or only for *.js files?

Owner

tjanczuk commented Nov 8, 2012

Did you by any chance install WebMatrix2 on this box? If so, before or after iisnode?

only for .js. It's almost like setting it to enable 32bit applications ignored the iisnode handler in web.config.

index.html has no errors with enable 32bit applications.
hello.js has errors with enable 32bit applications.

I did not explicitly install webmatrix2 on this box. It's (mostly) a fresh install of win2008 that has iisnode on it. It's a base vm that i clone and test software with.

Is there a way to check if webmatrix2 is installed? it's not in add/remove programs

Owner

tjanczuk commented Nov 8, 2012

Yes, setting "Enable 32bit application" should ignore the iisnode.dll handler, because it is 64 bit.

What is the behavior again with "Enable 32-bit applications" set to FALSE (not TRUE). Do you get errors only for *.js, or also for index.html?

Yeah seeting Enable 32bit to false will result in crashing of the worker pool when navigating to both the index.html and *.js.

I think the crashing is happening when the web.config handler is being loaded.

Result in browser:

Service Unavailable HTTP Error 503. The service is unavailable.

View Windows Event Log:
The Module DLL C:\Program Files\iisnode\iisnode.dll failed to load. The data is the error.

in dependencywalker, KERNEL32.DLL and IEFRAME.DLL show as red icons. Does this mean anything?

Owner

tjanczuk commented Nov 8, 2012

Is that Windows 2008 or Windows 2008 R2? Which version of IIS do you have exactly?
Do you have another W2K8 machine you can try it on to help understand if this is something about this particular box?

it's a windows 2008 box. we're setting up a windows 2008 r2 machine right now to test.

anything else i can look at that may help?

IIS is Version 7.0

Owner

tjanczuk commented Nov 8, 2012

kernel32.dll show up as red icon where exactly? Can you share a screen shot?

Owner

tjanczuk commented Nov 8, 2012

OK, this is interesting. Can you click on that kernel32.dll line and then inspect the parent import function list for any functions iisnode.dll attempts to call that are missing from your version of kernel32.dll? Instructions at http://www.dependencywalker.com/help/html/hidr_import_list_view.htm

The only one that shows red is

Ordinal: N/A
Hint: 939 (0x03AB)
Function: K32GetProcessMemoryInfo
Entry Point: Not Bound

Owner

tjanczuk commented Nov 8, 2012

Great, thanks. It looks like this function lives in a different library on W2K8 than in W2K8R2: http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx:

Kernel32.lib on Windows 7 and Windows Server 2008 R2;
Psapi.lib (if PSAPI_VERSION=1) on Windows 7 and Windows Server 2008 R2;
Psapi.lib on Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP

So your issue should go away on W2K8 R2. Now, is lack of support for vanilla W2K8 a show stopper for you?

yes, unfortunately we may not be able to migrate to R2 just yet :/

Is it possible to have a version that supports 2008?

Owner

tjanczuk commented Nov 8, 2012

This is definitely fixable, I will make sure it makes it in the next release. Are you on a schedule?

No schedule but we have a change we want to pull request soon. Was hoping to test the change on server 2008 before we sent the request. Or should we just go ahead with it?

https://github.com/breuben/iisnode/commits/working-directory-config

breuben commented Nov 9, 2012

Hi Tomasz,

I've made a change to link specifically against psapi.lib to avoid the load library errors on Windows 2008. Everything seems to work fine on both Windows 2008 and on Windows 7. I sent a pull request containing this change, so hopefully this helps you out!

Ben

@tjanczuk tjanczuk closed this in 3db0cf8 Nov 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment