mod_managed: Failed to create shadow copy
Hi everyone, I'm after a bit of mod_managed help from those with experience. To explore how we can use mod_managed, I'm trying to simply get it up-and-running. To test, I'm trying to run Demo.csx (from source), however an ExecutionEngineException (see below) is always thrown whenever trying to load the csx file. I'm using latest stable Debian Jessie and FreeSWITCH (from packages). While I've been programming in C# since 1.0, I've never used mono, so I simply installed mono-complete from packages. I have also tested mono (and FreeSWITCH) successfully. I have researched related errors online with no luck or inspiration for a solution. Does anyone know why I would get this problem? Do I need to create any symlinks, install any packages, create directories (other than conf/mod/managed), etc to get mod_managed to work on a new install? Thanks all, much appreciated. [ALERT] switch_cpp.cpp:1356 Exception loading /usr/lib/freeswitch/mod/managed/Demo.csx: System.ExecutionEngineException: Failed to create shadow copy (ensure directory exists). Server stack trace: at (wrapper managed-to-native) System.AppDomain:LoadAssembly (System.AppDomain,string,System.Security.Policy.Evidence,bool) at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in <filename unknown>:0 at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.AppDomain:Load (string,System.Security.Policy.Evidence) at System.Reflection.Assembly.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity) [0x00000] in <filename unknown>:0 at System.Activator.CreateInstance (System.String assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Security.Policy.Evidence securityInfo) [0x00000] in <filename unknown>:0 at System.Activator.CreateInstance (System.String assemblyName, System.String typeName, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 at System.AppDomain.CreateInstance (System.String assemblyName, System.String typeName, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstance (string,string,object[]) at System.AppDomain.CreateInstanceAndUnwrap (System.String assemblyName, System.String typeName, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string,object[]) at (wrapper xdomain-dispatch) System.AppDomain:CreateInstanceAndUnwrap (object,byte[]&,byte[]&,string,string) Exception rethrown at [0]: at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string,object[]) at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string,object[]) at FreeSWITCH.Loader.loadFile (System.String fileName) [0x00000] in <filename unknown>:0
Do you have a managed directory under the mod directory (not sure where the package install puts that)? All my .dlls are in that directory. Shane Mitchell <shane.mitchell@fonedynamics.com.au> wrote:
Hi everyone,
I'm after a bit of mod_managed help from those with experience.
To explore how we can use mod_managed, I'm trying to simply get it up-and-running. To test, I'm trying to run Demo.csx (from source), however an ExecutionEngineException (see below) is always thrown whenever trying to load the csx file.
I'm using latest stable Debian Jessie and FreeSWITCH (from packages). While I've been programming in C# since 1.0, I've never used mono, so I simply installed mono-complete from packages. I have also tested mono (and FreeSWITCH) successfully. I have researched related errors online with no luck or inspiration for a solution.
Does anyone know why I would get this problem? Do I need to create any symlinks, install any packages, create directories (other than conf/mod/managed), etc to get mod_managed to work on a new install?
Thanks all, much appreciated.
[ALERT] switch_cpp.cpp:1356 Exception loading /usr/lib/freeswitch/mod/managed/Demo.csx: System.ExecutionEngineException: Failed to create shadow copy (ensure directory exists).
Server stack trace: at (wrapper managed-to-native) System.AppDomain:LoadAssembly (System.AppDomain,string,System.Security.Policy.Evidence,bool) at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in <filename unknown>:0 at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.AppDomain:Load (string,System.Security.Policy.Evidence) at System.Reflection.Assembly.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity) [0x00000] in <filename unknown>:0 at System.Activator.CreateInstance (System.String assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Security.Policy.Evidence securityInfo) [0x00000] in <filename unknown>:0 at System.Activator.CreateInstance (System.String assemblyName, System.String typeName, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 at System.AppDomain.CreateInstance (System.String assemblyName, System.String typeName, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstance (string,string,object[]) at System.AppDomain.CreateInstanceAndUnwrap (System.String assemblyName, System.String typeName, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string,object[]) at (wrapper xdomain-dispatch) System.AppDomain:CreateInstanceAndUnwrap (object,byte[]&,byte[]&,string,string)
Exception rethrown at [0]:
at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string,object[]) at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string,object[]) at FreeSWITCH.Loader.loadFile (System.String fileName) [0x00000] in <filename unknown>:0
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com
Do you have a managed directory under the mod directory (not sure where the package install puts that)? All my .dlls are in that directory.
I have created the managed directory as per the initial thread. After trial-and-error, I found the solution (simple really) to get mod_managed to work on a fresh install. It was simply a permissions problem. FS was trying to write to conf/mod/managed/ without sufficient permissions. So for those looking to try mod_managed, this is what I did to get it working: 1. Install mono. 2. Create conf/mod/managed with sufficient write permissions for FS. 3. Enable/add reference to mod_managed in modules.xml. 4. Add your csx/dll/etc files to conf/mod/managed.
participants (2)
-
covici@ccs.covici.com
-
Shane Mitchell