If you get stack traces that end with :0, these procedures will assist with getting meaningful crash messages. For example we don't want
Code: Select all
at btnException_Click (System.Object sender, System.EventArgs e) [0x00001] in <6ab75a45693043979bfe11c8a176dafb>:0
Code: Select all
at btnException_Click (System.Object sender, System.EventArgs e) [0x00001] in admininfo.aspx.cs:251
- Edit Web.config in the root of the web panel (i.e. /var/www/html/Web.config)
- Look for the <customErrors mode="RemoteOnly"> and change RemoteOnly to Off
- cd to the Web panel root/bin folder (i.e. /var/www/html/bin)
- Run pdb2mdb <file.dll> for at least UGCC.dll and MashToolsSharp.dll (i.e. pdb2mdb UGCC.dll and pdb2mdb MashToolsSharp.dll).
- This converts Microsoft's debug information into mono's format, without this line numbers aren't returned in stack traces.
- For Apache
- Edit /etc/httpd/conf.d/mod_mono.conf and add MonoDebug true
- Restart apache
- For xsp
- Run xsp with: MONO_OPTIONS=--debug xsp4
- cd to the monitor folder (i.e. /ugcc/mon)
- Run pdb2mdb <file.dll/file.exe> for ugccmonsvc.exe and MashToolsSharp.dll
- Edit your systemd unit file (/etc/systemd/system/ugccmon.service) to include --debug after mono-sgen on the ExecStart= line, also add a new line to the [Service] section: Environment=MONO_OPTIONS=--debug (if you already have an Environment= line, it's fine; multiple Environemnt lines are fine).
- If not using systemd to manage the monitor, edit your monitor start up script to include MONO_OPTIONS=--debug and --debug as a command line argument
To do the test run: MONO_OPTIONS=--debug mono-service --debug ugccmonsvc.exe, the exception should be printed on screen
Note: You may have to run the stop.sh script to clean up the tmp lockfiles in order to start the monitor again.
Exceptions may be available in /var/log/messages as well as journalctl.