App Pool is stopping after closing VS2019 - iis

I have a .NET Core 3.1 application that is stopping its App Pool on IIS every time that I do the following:
I debug my code
Stop the debugger
Close Visual Studio 2019
If I just stop the debugger this doesn't happen, it only happens after close the Visual Studio 2019 after I stopped debugging my code.
I tried a few things but nothing fixed that.
Did anyone come across that before?

I tried the same thing on my Viual studio and local IIS. And the worker prceoss get terminated when I close visual studio as well.
So reviewed event viewer but nothing logged at that time.
Then I created debug diagnostic tool rule for breakpoint ntdll!NtTerminateProcess.At this time, a dump generated.
Here is the full stack trace for all threads
. 0 Id: 688.415c Suspend: 1 Teb: 00000039`02299000 Unfrozen
# Child-SP RetAddr Call Site
00 00000039`0247f938 00007ffb`15c6a954 ntdll!NtTerminateProcess
01 00000039`0247f940 00007ffb`1486cd8a ntdll!RtlExitUserProcess+0x54
02 00000039`0247f970 00007ffb`147da245 kernel32!ExitProcessImplementation+0xa
03 00000039`0247f9a0 00007ffb`147da8b5 msvcrt!_crtExitProcess+0x15
04 00000039`0247f9d0 00007ff7`79ca3214 msvcrt!doexit+0x171
05 00000039`0247fa40 00007ffb`14867bd4 w3wp!__wmainCRTStartup+0x164
06 00000039`0247fa80 00007ffb`15c6ced1 kernel32!BaseThreadInitThunk+0x14
07 00000039`0247fab0 00000000`00000000 ntdll!RtlUserThreadStart+0x21
1 Id: 688.afc Suspend: 1 Teb: 00000039`022a3000 Unfrozen
# Child-SP RetAddr Call Site
00 00000039`026ff848 00007ffb`15c34060 ntdll!NtWaitForWorkViaWorkerFactory+0x14
01 00000039`026ff850 00007ffb`14867bd4 ntdll!TppWorkerThread+0x300
02 00000039`026ffc10 00007ffb`15c6ced1 kernel32!BaseThreadInitThunk+0x14
03 00000039`026ffc40 00000000`00000000 ntdll!RtlUserThreadStart+0x21
2 Id: 688.3f78 Suspend: 1 Teb: 00000039`022a5000 Unfrozen
# Child-SP RetAddr Call Site
00 00000039`0277f858 00007ffb`13266951 ntdll!NtDelayExecution+0x14
01 00000039`0277f860 00007ffb`0aba6bdb KERNELBASE!SleepEx+0xa1
02 00000039`0277f900 00007ffb`0ab748e4 winhttp!SafeTerminateDll+0xcb
03 00000039`0277f940 00007ffb`15c305ac winhttp!FailFastThreadpoolWaitCallback<&SafeTerminateDll>+0x14
04 00000039`0277f980 00007ffb`15c341c2 ntdll!TppExecuteWaitCallback+0xa4
05 00000039`0277f9d0 00007ffb`14867bd4 ntdll!TppWorkerThread+0x462
06 00000039`0277fd90 00007ffb`15c6ced1 kernel32!BaseThreadInitThunk+0x14
07 00000039`0277fdc0 00000000`00000000 ntdll!RtlUserThreadStart+0x21
3 Id: 688.748 Suspend: 1 Teb: 00000039`022b9000 Unfrozen
# Child-SP RetAddr Call Site
00 00000039`02bff848 00007ffb`15c34060 ntdll!NtWaitForWorkViaWorkerFactory+0x14
01 00000039`02bff850 00007ffb`14867bd4 ntdll!TppWorkerThread+0x300
02 00000039`02bffc10 00007ffb`15c6ced1 kernel32!BaseThreadInitThunk+0x14
03 00000039`02bffc40 00000000`00000000 ntdll!RtlUserThreadStart+0x21
4 Id: 688.3b38 Suspend: 1 Teb: 00000039`022bd000 Unfrozen
# Child-SP RetAddr Call Site
00 00000039`02cffad8 00007ffb`132784c3 ntdll!NtRemoveIoCompletion+0x14
01 00000039`02cffae0 00007ffa`b8a238e2 KERNELBASE!GetQueuedCompletionStatus+0x53
02 00000039`02cffb40 00000000`00000000 <Unloaded_aspnetcore.dll>+0x38e2
5 Id: 688.3cf8 Suspend: 1 Teb: 00000039`022c9000 Unfrozen
# Child-SP RetAddr Call Site
00 00000039`024ff788 00007ffb`15c34060 ntdll!NtWaitForWorkViaWorkerFactory+0x14
01 00000039`024ff790 00007ffb`14867bd4 ntdll!TppWorkerThread+0x300
02 00000039`024ffb50 00007ffb`15c6ced1 kernel32!BaseThreadInitThunk+0x14
03 00000039`024ffb80 00000000`00000000 ntdll!RtlUserThreadStart+0x21
You can see that when you close visual studio, it just call a safety terminate function and terminate the process. No strange behavior or exception generated. So it must by design.
If you go to IIS manager , you will see the application pool get stopped when you close VS.
If you don't want visual studio corrupt your IIS worker process. Then please debug it in other profile environment and publish the release version to your local IIS.

I think this is the intended behaviour.
By default Visual Studio uses IIS Express to host your sites. IIS Express is a service which is started by Visual Studio when you start debugging and continues to run until you close Visual Studio (or stop it manually).
If you want it to persist then you'll need to debug using a local IIS instance other than Express.

Related

Running Open-Liberty as a non root user

We are trying to run an Open Liberty on a Red Hat server 7.9, however, the service will not start.
Systemd script which is starting the application is giving the following message:
OPENLP.service - IBM WebSphere Application Server
Loaded: loaded (/etc/systemd/system/OPENLP.service; enabled; vendor preset: disabled)
Active: active (exited) since Wed 2022-05-04 20:09:10 +04; 8min ago
Process: 38704 ExecStop=/etc/init.d/OPENLPNode.sh stop (code=exited, status=0/SUCCESS)
Process: 38731 ExecStart=/etc/init.d/OPENLPNode.sh start (code=exited, status=0/SUCCESS)
Main PID: 38731 (code=exited, status=0/SUCCESS)
May 04 20:09:10 linux-c java[38743]: IBM Java[38743]: JVMDUMP032I JVM requested Java dump using '/tmp/javacore.20220504.200910.38743.0002.txt' in response to an event
May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP030W Cannot write dump to file //javacore.20220504.200910.38743.0002.txt: Permission denied
May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP032I JVM requested Java dump using '/tmp/javacore.20220504.200910.38743.0002.txt' in response to an event
May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP010I Java dump written to /tmp/javacore.20220504.200910.38743.0002.txt
May 04 20:09:10 linux-c java[38743]: IBM Java[38743]: JVMDUMP032I JVM requested Snap dump using '//Snap.20220504.200910.38743.0003.trc' in response to an event
May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP032I JVM requested Snap dump using '//Snap.20220504.200910.38743.0003.trc' in response to an event
May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP030W Cannot write dump to file //Snap.20220504.200910.38743.0003.trc: Permission denied
May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP010I Snap dump written to /tmp/Snap.20220504.200910.38743.0003.trc
May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP013I Processed dump event "traceassert", detail "".
May 04 20:09:10 linux-c systemd[1]: Started IBM WebSphere Application Server.
Any idea as to what might be causing the above?
Regards,
Nick Baldacchino

Angular 12 npm run test throws "Couldn't load color-version"

We recently migrated our application from angular 6 to 12 , everything looks good and i am able to run application(npm start is working) and test the UI features but when i run my angular unit tests(npm run test ) on my local it throwing error and this is only happening on my machine(other peers have no issues with unit test run)
03 03 2022 09:17:14.914:DEBUG [reporter]: Trying to load reporter: #angular-devkit/build-angular--event-reporter
03 03 2022 09:17:14.927:DEBUG [reporter]: Trying to load color-version of reporter: #angular-devkit/build-angular--event-reporter (#angular-devkit/build-angular--event-reporter_color)
03 03 2022 09:17:14.930:DEBUG [reporter]: Couldn't load color-version.
03 03 2022 09:17:14.932:DEBUG [reporter]: Trying to load reporter: #angular-devkit/build-angular--sourcemap-reporter
03 03 2022 09:17:14.933:DEBUG [reporter]: Trying to load color-version of reporter: #angular-devkit/build-angular--sourcemap-reporter (#angular-devkit/build-angular--sourcemap-reporter_color)
03 03 2022 09:17:14.942:DEBUG [reporter]: Couldn't load color-version.
I tried re install node/cli/npm install everything.....still no luck
Has anyone seen this error before ? Appreciate your response....
"Couldn't load color-version" is a debug-level message informing you that Karma was unable to find a "colorized" version of the reporter (#angular-devkit/build-angular--event-reporter_color).
One reason you might be seeing this message locally and not elsewhere is that you have set your log level to debug (--log-level debug).

Angular Quickstart fails karma testing out of the box

The official Angular quickstart is not able to run karma tests after a clean install on Windows 10. I typed the following 4 commands and nothing else:
C:\projects\temp>git clone https://github.com/angular/quickstart.git
C:\projects\temp>cd C:\projects\temp\quickstart
C:\projects\temp\quickstart>npm install
...install logs omitted for brevity
C:\projects\temp\quickstart>npm start
...app launched successfully, but logs omitted for brevity
C:\projects\temp\quickstart>npm test
...Error shown in complete logs below
The full error message resulting after the final command is as follows:
C:\projects\temp\quickstart>npm test
> angular-quickstart#1.0.0 pretest C:\projects\temp\quickstart
> npm run build
> angular-quickstart#1.0.0 build C:\projects\temp\quickstart
> tsc -p src/
> angular-quickstart#1.0.0 test C:\projects\temp\quickstart
> concurrently "npm run build:watch" "karma start karma.conf.js"
[0]
[0] > angular-quickstart#1.0.0 build:watch C:\projects\temp\quickstart
[0] > tsc -p src/ -w
[0]
[1] 01 06 2017 14:33:49.385:WARN [watcher]: Pattern "C:/projects/temp/quickstart/testing/**/*.js" does not match any file.
[1] 01 06 2017 14:33:49.406:WARN [watcher]: Pattern "C:/projects/temp/quickstart/testing/**/*.ts" does not match any file.
[1] 01 06 2017 14:33:49.407:WARN [watcher]: Pattern "C:/projects/temp/quickstart/testing/**/*.js.map" does not match any file.
[1] 01 06 2017 14:33:49.891:WARN [karma]: No captured browser, open http://localhost:9876/
[1] 01 06 2017 14:33:49.906:WARN [karma]: Port 9876 in use
[1] 01 06 2017 14:33:49.908:INFO [karma]: Karma v1.7.0 server started at http://0.0.0.0:9877/
[1] 01 06 2017 14:33:49.908:INFO [launcher]: Launching browser Chrome with unlimited concurrency
[1] 01 06 2017 14:33:49.958:INFO [launcher]: Starting browser Chrome
[1] 01 06 2017 14:33:51.821:INFO [watcher]: Changed file "C:/projects/temp/quickstart/src/app/app.component.js".
[1] 01 06 2017 14:33:51.843:INFO [watcher]: Changed file "C:/projects/temp/quickstart/src/app/app.component.spec.js".
[1] 01 06 2017 14:33:51.850:INFO [watcher]: Changed file "C:/projects/temp/quickstart/src/app/app.module.js".
[0] 2:33:51 PM - Compilation complete. Watching for file changes.
[1] 01 06 2017 14:33:51.873:INFO [watcher]: Changed file "C:/projects/temp/quickstart/src/main.js".
[1] 01 06 2017 14:33:51.965:INFO [Chrome 58.0.3029 (Windows 10 0.0.0)]: Connected on socket pXysNFDP8RC3agm8AAAA with id 9156960
[1] 01 06 2017 14:33:52.077:INFO [karma]: Delaying execution, these browsers are not ready: Chrome 58.0.3029 (Windows 10 0.0.0)
What needs to change in order for npm test to succeed out of the box on Windows 10?
The Angular quickstart project has largely been superseded by the Angular CLI. I would suggest using the CLI it for any new projects as it not only gives you an initial framework for your application, but it will also generate the additional boilerplate needed as you extend your application.
Before installing Angular CLi, ensure you have an up to date version of Node (6.9.0 or higher) and NPM (3 or higher). Also there may be other prerequisites not listed in the documentation, to install on an Android system I found it also needed Python 2.7 and g++ installed.
Install with:
npm install -g #angular/cli
To create a new project:
ng new PROJECT-NAME
cd PROJECT-NAME
ng serve
ng new will take some time to complete as in addition to building the project structure it also does the npm install.
Run unit tests with ng test and end-to-end tests with ng e2e.
Both ng test and ng serve will run continuously watching for changes and rebuilding the affected code. You can even leave both running in separate windows if you wish.
ng generate BLUEPRINT will generate new code, blueprints include module, component, service, class, directive, enum, guard, interface, pipe
Other useful commands:. You may want to experiment with this a bit before you write a real app: by default each component or service goes into its own subdirectory and is added to the top level app module, but you can explicitly create modules to provide additional structure if you wish.
ng build: builds your application into the output path.
ng doc KEYWORD: opens angular documentation for that keyword.
ng eject: ejects the app and outputs webpack configuration
ng lint: lints the project
ng xi18n: extracts i18n messages from the project.
This is not answer, just give more case to find out root cause.
I followed steps which you described and got this:
D:\Project\temp\quickstart>npm test
> angular-quickstart#1.0.0 pretest D:\Project\temp\quickstart
> npm run build
> angular-quickstart#1.0.0 build D:\Project\temp\quickstart
> tsc -p src/
> angular-quickstart#1.0.0 test D:\Project\temp\quickstart
> concurrently "npm run build:watch" "karma start karma.conf.js"
[0]
[0] > angular-quickstart#1.0.0 build:watch D:\Project\temp\quickstart
[0] > tsc -p src/ -w
[0]
[1] 02 06 2017 22:34:04.733:WARN [watcher]: Pattern
"D:/Project/temp/quickstart/testing/**/*.js" does not match any file.
[1] 02 06 2017 22:34:04.746:WARN [watcher]: Pattern
"D:/Project/temp/quickstart/testing/**/*.ts" does not match any file.
[1] 02 06 2017 22:34:04.747:WARN [watcher]: Pattern
"D:/Project/temp/quickstart/testing/**/*.js.map" does not match any file.
[1] 02 06 2017 22:34:05.103:WARN [karma]: No captured browser, open
http://localhost:9876/
[1] 02 06 2017 22:34:05.120:INFO [karma]: Karma v1.7.0 server started at
http://0.0.0.0:9876/
[1] 02 06 2017 22:34:05.120:INFO [launcher]: Launching browser Chrome with
unlimited concurrency
[1] 02 06 2017 22:34:05.156:INFO [launcher]: Starting browser Chrome
[1] 02 06 2017 22:34:06.742:INFO [Chrome 58.0.3029 (Windows 10 0.0.0)]:
Connected on socket GGConP8Ks64GubSYAAAA with id 70486747
[1] 02 06 2017 22:34:07.822:INFO [watcher]: Changed file
"D:/Project/temp/quickstart/src/app/app.component.js".
[1] 02 06 2017 22:34:07.837:INFO [watcher]: Changed file
"D:/Project/temp/quickstart/src/app/app.component.spec.js".
[1] 02 06 2017 22:34:07.856:INFO [watcher]: Changed file
"D:/Project/temp/quickstart/src/app/app.module.js".
[0] 10:34:07 PM - Compilation complete. Watching for file changes.
[1] 02 06 2017 22:34:07.865:INFO [watcher]: Changed file
"D:/Project/temp/quickstart/src/main.js".
[1] 02 06 2017 22:34:08.084:INFO [karma]: Delaying execution, these browsers
are not ready: Chrome 58.0.3029 (Windows 10 0.0.0)
Chrome 58.0.3029 (Windows 10 0.0.0): Executed 2 of 2 SUCCESS (0.159 secs /
0.149 secs)
Chrome 58.0.3029 (Windows 10 0.0.0): Executed 2 of 2 SUCCESS (0.117 secs /
0.112 secs)

Node-oracledb fails to run with "Cannot find module '../build/Debug/oracledb'"

I'm trying to install the Node oracledb package on Windows 8.1 x64, which is known to be complicated. I followed the instructions in this detailed article. I still got the error MSB4019 when trying to install, but I solved with one of the answers in an SO question. But then when running my tests with Karma (jasmine tests), I get this:
C:\Users\potero\angular\Sunnel_View_Test\unit\jasmine>call karma start
C:\Users\
potero\angular\Sunnel_View_Test\unit\jasmine\conf\karma.conf.js 04 02
2016 11:42:39.758:INFO [framework.browserify]: registering rebuild
(autoWa tch=true) 04 02 2016 11:42:40.581:ERROR
[framework.browserify]: bundle error 04 02 2016 11:42:40.581:ERROR
[framework.browserify]: Error: Cannot find module
'../build/Release/oracledb' from
'C:\Users\potero\node_modules\oracledb\lib' 04 02 2016
11:42:40.583:WARN [karma]: No captured browser, open http://localhost
:9876/ 04 02 2016 11:42:40.590:INFO [karma]: Karma v0.13.19 server
started at http://lo calhost:9876/ 04 02 2016 11:42:40.599:INFO
[launcher]: Starting browser IE 04 02 2016 11:42:40.608:INFO
[launcher]: Starting browser Chrome 04 02 2016 11:42:40.613:ERROR
[framework.browserify]: bundle error 04 02 2016 11:42:40.613:ERROR
[framework.browserify]: Error: Cannot find module
'../build/Debug/oracledb' from
'C:\Users\potero\node_modules\oracledb\lib' 04 02 2016
11:42:40.615:INFO [framework.browserify]: bundle updated 04 02 2016
11:42:41.318:INFO [IE 11.0.0 (Windows 8.1 0.0.0)]: Connected on socke
t /#jugOlM6ncxlElbTbAAAA with id 28583632 04 02 2016 11:42:43.555:INFO
[Chrome 48.0.2564 (Windows 8.1 0.0.0)]: Connected o n socket
/#bwze1YzRw7uyxQfwAAAB with id 57743574
START: IE 11.0.0 (Windows 8.1 0.0.0) ERROR bundle error (see logs)
at
C:/Users/potero/AppData/Local/Temp/fcd332ac97c6f0099b6d2cbea5282df8.browser
ify:1 Chrome 48.0.2564 (Windows 8.1 0.0.0) ERROR Uncaught Error:
bundle error (see logs) at
C:/Users/potero/AppData/Local/Temp/fcd332ac97c6f0099b6d2cbea5282df8.browser
ify:1
Finished in 3.922 secs / 0 secs
SUMMARY: V 0 tests completed
There is a similar issue on the package Github page but the solution given there (re installing node) did not work for me. I also re installed oracledb without success.
I checked the folders referred in the error message and the files are not there as stated.
Why does it need those files? Why weren't them installed? Why does it look up for them on my home folder instead that on the folder the project is?
Does PATH have the Oracle client libraries (e.g. Instant Client) in it?

xfsettingsd Unhappy with Monitor Resolution and Bombing Out

If I boot my laptop with a HDMI monitor plugged in XFCE will recognise the monitor and display the UI. However, it will reset at least my theme and keyboard settiings with what looks like the xfce defaults.
If I boot without plugging in the monitor, and then plug in the monitor once my user session has started, I can use ArandR to send output to the HDMI monitor and all my settings remain in-tact whilst the screen works perfectly
I see the following in my logs when the error occurs (booting with hdmi monitor plugged in):
Nov 04 17:34:26 nickT_Arch systemd[1]: Started Authorization Manager.
Nov 04 17:34:26 nickT_Arch slim[265]: (xfsettingsd:834): xfsettingsd-WARNING **: Unknown mode '1920x1080 # 30.0' for output HDMI1.
Nov 04 17:34:26 nickT_Arch slim[265]: The program 'xfsettingsd' received an X Window System error.
Nov 04 17:34:26 nickT_Arch slim[265]: This probably reflects a bug in the program.
Nov 04 17:34:26 nickT_Arch slim[265]: The error was 'BadMatch (invalid parameter attributes)'.
Nov 04 17:34:26 nickT_Arch slim[265]: (Details: serial 143 error_code 8 request_code 140 minor_code 7)
Nov 04 17:34:26 nickT_Arch slim[265]: (Note to programmers: normally, X errors are reported asynchronously;
Nov 04 17:34:26 nickT_Arch slim[265]: that is, you will receive the error a while after causing it.
Nov 04 17:34:26 nickT_Arch slim[265]: To debug your program, run it with the --sync command line
Nov 04 17:34:26 nickT_Arch slim[265]: option to change this behavior. You can then get a meaningful
Nov 04 17:34:26 nickT_Arch slim[265]: backtrace from your debugger if you break on the gdk_x_error() function.)
Once that has happened it looks like xfsettingsd just stops working. When I run xfsettingsd from the command line I get the following error:
(xfsettingsd:1508): xfsettingsd-WARNING **: Unknown mode '1920x1080 # 30.0' for output HDMI1.
The program 'xfsettingsd' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 144 error_code 8 request_code 140 minor_code 7)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
This is reported upstream https://bugzilla.xfce.org/show_bug.cgi?id=9680
Still, there's probably just the --sync workaround, nothing better.

Resources