xplicit / HyperFastCgi

Performant nginx to mono fastcgi server
MIT License
129 stars 48 forks source link

System.DllNotFoundException: libhfc-native #15

Closed erickrasmussen closed 10 years ago

erickrasmussen commented 10 years ago

I'm getting the following error when I attempt to run:

hyperfastcgi4 /config=/etc/init.d/mono-fastcgi/hyperfastcgi.conf /logfile=/var/log/mono/fastcgi.log &
Unhandled Exception:
System.DllNotFoundException: libhfc-native
  at (wrapper managed-to-native) HyperFastCgi.Listeners.NativeListener:Listen (uint16,string,uint16)
  at HyperFastCgi.Listeners.NativeListener.Listen () [0x00000] in <filename unknown>:0
  at HyperFastCgi.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libhfc-native
  at (wrapper managed-to-native) HyperFastCgi.Listeners.NativeListener:Listen (uint16,string,uint16)
  at HyperFastCgi.Listeners.NativeListener.Listen () [0x00000] in <filename unknown>:0
  at HyperFastCgi.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
xplicit commented 10 years ago

Did you install all the compiled libraries? libhfc-native.so should be located in /usr/lib

erickrasmussen commented 10 years ago

I've rebuilt the server and am receiving the same error. I do have libhfc-native.so in /usr/lib.

xplicit commented 10 years ago

Can you show the output of strace -e trace=open hyperfastcgi4 <params> command?

erickrasmussen commented 10 years ago
root@mono-demo:/etc/hyperfastcgi# strace -e trace=open hyperfastcgi4 /config=/etc/hyperfastcgi/hyperfastcgi.conf /logfile=/var/log/mono/hyperfastcgi.log &
[1] 1103
root@mono-demo:/etc/hyperfastcgi# open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/bin/hyperfastcgi4", O_RDONLY) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/dev/shm/mono.1106", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0640) = 3
open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe", O_RDONLY) = 3
open("/usr/local/lib/mono/4.5/mscorlib.dll", O_RDONLY) = 3
open("/usr/local/lib/mono/4.5/mscorlib.dll.so", O_RDONLY|O_CLOEXEC) = 3
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/policy.4.0.mscorlib/0.0.0.0__b77a5c561934e089/policy.4.0.mscorlib.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/4.5/mscorlib.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/mscorlib/mscorlib.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
open("/proc/self/task/1107/comm", O_RDWR) = 3
open("/dev/null", O_RDWR)               = 3
open("/usr/local/etc/mono/config", O_RDONLY) = 3
open("/root/.mono/config", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/HyperFastCgi/HyperFastCgi.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/policy.4.0.System.Xml/0.0.0.0__b77a5c561934e089/policy.4.0.System.Xml.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll", O_RDONLY) = 3
open("/usr/local/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System.Xml/System.Xml.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/policy.4.0.Mono.Posix/0.0.0.0__0738eb9f132ed756/policy.4.0.Mono.Posix.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll", O_RDONLY) = 3
open("/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/Mono.Posix/Mono.Posix.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/policy.4.0.System/0.0.0.0__b77a5c561934e089/policy.4.0.System.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll", O_RDONLY) = 3
open("/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System/System.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 3
open("/usr/local/lib/mono/gac/policy.4.0.Mono.Security/0.0.0.0__0738eb9f132ed756/policy.4.0.Mono.Security.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll", O_RDONLY) = 4
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/Mono.Security/Mono.Security.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/urandom", O_RDONLY)          = 3
open("/usr/local/lib/mono/gac/policy.4.0.System.Configuration/0.0.0.0__b03f5f7f11d50a3a/policy.4.0.System.Configuration.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll", O_RDONLY) = 4
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System.Configuration/System.Configuration.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 4
open("/var/log/mono/hyperfastcgi.log", O_WRONLY|O_CREAT, 0666) = 4
open("/etc/hyperfastcgi/hyperfastcgi.conf", O_RDONLY) = 5
open("/etc/hyperfastcgi/hyperfastcgi.conf", O_RDONLY) = 5
open("/etc/hyperfastcgi/hyperfastcgi.conf", O_RDONLY) = 5
open("/etc/hyperfastcgi/hyperfastcgi.conf", O_RDONLY) = 5
open("/usr/local/lib/mono/gac/policy.4.0.System.Web/0.0.0.0__b03f5f7f11d50a3a/policy.4.0.System.Web.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll", O_RDONLY) = 5
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System.Web/System.Web.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/erick/www/api/Web.config", O_RDONLY) = 5
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 5
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/proc/uptime", O_RDONLY)          = 5
open("/usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe", O_RDONLY) = 5
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/erick/www/api/Web.config", O_RDONLY) = 6
open("/usr/local/lib/mono/gac/policy.4.0.System.Core/0.0.0.0__b77a5c561934e089/policy.4.0.System.Core.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll", O_RDONLY) = 6
open("/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System.Core/System.Core.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 6
open("/usr/local/etc/mono/4.5/web.config", O_RDONLY) = 6
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 6
open("/usr/local/etc/mono/4.5/web.config", O_RDONLY) = 6
open("/home/erick/www/api/Web.config", O_RDONLY) = 6
open("/usr/local/etc/mono/4.5/settings.map", O_RDONLY) = 6
open("/usr/local/lib/mono/gac/policy.0.4.HyperFastCgi/0.0.0.0__0738eb9f132ed756/policy.0.4.HyperFastCgi.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/HyperFastCgi.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/HyperFastCgi.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/4.5/Facades/HyperFastCgi.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/HyperFastCgi.exe", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/HyperFastCgi.exe", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/4.5/Facades/HyperFastCgi.exe", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 6
open("/usr/lib/hyperfastcgi/4.0/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/libhfc-native.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/libhfc-native.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/tls/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/tls/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/tls/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = 6
open("/usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5", O_RDONLY|O_CLOEXEC) = 6
open("/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libmonoboehm-2.0.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libmonoboehm-2.0.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libmonoboehm-2.0.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libmonoboehm-2.0.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/libhfc-native.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/hyperfastcgi/4.0/libhfc-native.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = 6
open("/usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5", O_RDONLY|O_CLOEXEC) = 6
open("/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libmonoboehm-2.0.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libmonoboehm-2.0.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libmonoboehm-2.0.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libmonoboehm-2.0.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)

Unhandled Exception:
System.DllNotFoundException: libhfc-native
  at (wrapper managed-to-native) HyperFastCgi.Listeners.NativeListener:Listen (uint16,string,uint16)
  at HyperFastCgi.Listeners.NativeListener.Listen () [0x00000] in <filename unknown>:0
  at HyperFastCgi.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libhfc-native
  at (wrapper managed-to-native) HyperFastCgi.Listeners.NativeListener:Listen (uint16,string,uint16)
  at HyperFastCgi.Listeners.NativeListener.Listen () [0x00000] in <filename unknown>:0
  at HyperFastCgi.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
+++ exited with 1 +++
xplicit commented 10 years ago

Try to compile hyperfastcgi with --prefix=/usr/local and try to run again (previous version should be uninstalled with make uninstall). If it does not help, some more information needed:

  1. mono --version and OS version.
  2. Do you have file libmonoboehm-2.0.so.1 in the system? If yes where is it located? If no what are the compiling options did you use when compiling mono?
  3. strace -e trace=open hyperfastcgi4 ... output again (after compiling with /usr/local prefix)

What I see (not sure 100%) that it can't find mono system libmonoboehm-2.0.so.1 file in the directories and that's why it throws an exception.

erickrasmussen commented 10 years ago

Ubuntu 14.04 LTS

Mono JIT compiler version 3.8.1 (master/e98a83e Mon Aug  4 11:45:52 EDT 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

libmonoboehm-2.0.so.1 is located in /usr/local/lib. Stacktrace after uninstalling and recompiling

root@mono-demo:/etc# strace -e trace=open hyperfastcgi4 /config=/etc/hyperfastcgi/hyperfastcgi.conf /logfile=/var/log/mono/hyperfastcgi.log &
[1] 4162
root@mono-demo:/etc# open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/bin/hyperfastcgi4", O_RDONLY) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/dev/shm/mono.4165", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0640) = 3
open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe", O_RDONLY) = 3
open("/usr/local/lib/mono/4.5/mscorlib.dll", O_RDONLY) = 3
open("/usr/local/lib/mono/4.5/mscorlib.dll.so", O_RDONLY|O_CLOEXEC) = 3
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/policy.4.0.mscorlib/0.0.0.0__b77a5c561934e089/policy.4.0.mscorlib.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/4.5/mscorlib.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/mscorlib/mscorlib.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
open("/proc/self/task/4166/comm", O_RDWR) = 3
open("/dev/null", O_RDWR)               = 3
open("/usr/local/etc/mono/config", O_RDONLY) = 3
open("/root/.mono/config", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/HyperFastCgi/HyperFastCgi.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/policy.4.0.System.Xml/0.0.0.0__b77a5c561934e089/policy.4.0.System.Xml.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll", O_RDONLY) = 3
open("/usr/local/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System.Xml/System.Xml.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/policy.4.0.Mono.Posix/0.0.0.0__0738eb9f132ed756/policy.4.0.Mono.Posix.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll", O_RDONLY) = 3
open("/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/Mono.Posix/Mono.Posix.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/policy.4.0.System/0.0.0.0__b77a5c561934e089/policy.4.0.System.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll", O_RDONLY) = 3
open("/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System/System.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 3
open("/usr/local/lib/mono/gac/policy.4.0.Mono.Security/0.0.0.0__0738eb9f132ed756/policy.4.0.Mono.Security.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll", O_RDONLY) = 4
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/Mono.Security/Mono.Security.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/urandom", O_RDONLY)          = 3
open("/usr/local/lib/mono/gac/policy.4.0.System.Configuration/0.0.0.0__b03f5f7f11d50a3a/policy.4.0.System.Configuration.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll", O_RDONLY) = 4
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System.Configuration/System.Configuration.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 4
open("/var/log/mono/hyperfastcgi.log", O_WRONLY|O_CREAT, 0666) = 4
open("/etc/hyperfastcgi/hyperfastcgi.conf", O_RDONLY) = 5
open("/etc/hyperfastcgi/hyperfastcgi.conf", O_RDONLY) = 5
open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 5
open("/etc/hyperfastcgi/hyperfastcgi.conf", O_RDONLY) = 5
open("/etc/hyperfastcgi/hyperfastcgi.conf", O_RDONLY) = 5
open("/usr/local/lib/mono/gac/policy.4.0.System.Web/0.0.0.0__b03f5f7f11d50a3a/policy.4.0.System.Web.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll", O_RDONLY) = 5
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System.Web/System.Web.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/erick/www/api/Web.config", O_RDONLY) = 5
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 5
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/proc/uptime", O_RDONLY)          = 5
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe", O_RDONLY) = 5
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/erick/www/api/Web.config", O_RDONLY) = 6
open("/usr/local/lib/mono/gac/policy.4.0.System.Core/0.0.0.0__b77a5c561934e089/policy.4.0.System.Core.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll", O_RDONLY) = 6
open("/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/System.Core/System.Core.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 6
open("/usr/local/etc/mono/4.5/web.config", O_RDONLY) = 6
open("/usr/local/etc/mono/4.5/machine.config", O_RDONLY) = 6
open("/usr/local/etc/mono/4.5/web.config", O_RDONLY) = 6
open("/home/erick/www/api/Web.config", O_RDONLY) = 6
open("/usr/local/etc/mono/4.5/settings.map", O_RDONLY) = 6
open("/usr/local/lib/mono/gac/policy.0.4.HyperFastCgi/0.0.0.0__0738eb9f132ed756/policy.0.4.HyperFastCgi.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/HyperFastCgi.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/HyperFastCgi.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/4.5/Facades/HyperFastCgi.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/HyperFastCgi.exe", O_RDONLY) = 6
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/HyperFastCgi.exe.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/HyperFastCgi.exe.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/mono/assemblies/HyperFastCgi/HyperFastCgi.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 6
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/libhfc-native.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/libhfc-native.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/tls/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/tls/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/tls/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
[2014-08-04 18:38:19Z] Debug   Register native transport
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/libhfc-native.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mono/gac/HyperFastCgi/0.4.4.0__0738eb9f132ed756/libhfc-native.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
open("/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libhfc-native", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)

Unhandled Exception:
System.DllNotFoundException: libhfc-native
  at (wrapper managed-to-native) HyperFastCgi.Listeners.NativeListener:Listen (uint16,string,uint16)
  at HyperFastCgi.Listeners.NativeListener.Listen () [0x00000] in <filename unknown>:0
  at HyperFastCgi.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libhfc-native
  at (wrapper managed-to-native) HyperFastCgi.Listeners.NativeListener:Listen (uint16,string,uint16)
  at HyperFastCgi.Listeners.NativeListener.Listen () [0x00000] in <filename unknown>:0
  at HyperFastCgi.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
+++ exited with 1 +++

This is how I compiled mono

cd /srv/git-repos
git clone git://github.com/mono/mono.git
cd mono
./autogen.sh --prefix=/usr/local
make get-monolite-latest
make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe
make install

It appears it still can't find the files event though they are there. I'm building this in a fresh DigitalOcean VM and these are the build tools I installed:

apt-get install build-essential autoconf libtool gettext pkg-config libgtk2.0-dev libevent-dev

Thank you for your help!

xplicit commented 10 years ago

The error has changed, now it can't find libhfc-native.so

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" hyperfastcgi4 ... or adding the library directory to the /etc/ld.so.cache should finally resolve the issue.

More info http://www.mono-project.com/Interop_with_Native_Libraries http://www.mono-project.com/DllNotFoundException

erickrasmussen commented 10 years ago

Thank you!

It turns out that /usr/local/lib was set in a .conf file in /etc/ld.so.conf.d/. I just had to run ldconfig to update the cache.

corradofiore commented 9 years ago

Hi All, very similar problem here, but I wasn't able to solve it. I must be missing something obvious... My system configuration is as follows:

Every time I try to start hyperfastcgi4, I get the following error:

# /usr/local/bin/hyperfastcgi4 /config=/etc/mono/mono.conf /appconfigdir=/etc/mono/conf.d/

Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeInitializationException: An exception was thrown by the type initializer for HyperFastCgi.Transports.CombinedFastCgiListenerTransport
---> System.DllNotFoundException: libhfc-native

libhfc-native, however, exists on the system:

# locate libhfc-native
/usr/local/lib/libhfc-native.a
/usr/local/lib/libhfc-native.la
/usr/local/lib/libhfc-native.so
/usr/local/lib/libhfc-native.so.1
/usr/local/lib/libhfc-native.so.1.0.0

# ldconfig -p |grep libhfc
    libhfc-native.so.1 (libc6,x86-64) => /usr/local/lib/libhfc-native.so.1
    libhfc-native.so (libc6,x86-64) => /usr/local/lib/libhfc-native.so

strace output

# strace -e trace=open /usr/local/bin/hyperfastcgi4 /config=/etc/mono/mono.conf /appconfigdir=/etc/mono/conf.d/
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/libtinfo.so.5", O_RDONLY)  = 3
open("/lib64/libdl.so.2", O_RDONLY)     = 3
open("/lib64/libc.so.6", O_RDONLY)      = 3
open("/dev/tty", O_RDWR|O_NONBLOCK)     = 3
open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 3
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/libnss_files.so.2", O_RDONLY) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/bin/hyperfastcgi4", O_RDONLY) = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/usr/lib64/libstdc++.so.6", O_RDONLY) = 3
open("/lib64/libz.so.1", O_RDONLY)      = 3
open("/lib64/libtinfo.so.5", O_RDONLY)  = 3
open("/lib64/libm.so.6", O_RDONLY)      = 3
open("/lib64/librt.so.1", O_RDONLY)     = 3
open("/lib64/libdl.so.2", O_RDONLY)     = 3
open("/lib64/libpthread.so.0", O_RDONLY) = 3
open("/lib64/libgcc_s.so.1", O_RDONLY)  = 3
open("/lib64/libc.so.6", O_RDONLY)      = 3
open("/opt/mono/etc/mono/config", O_RDONLY) = 3
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/libnss_files.so.2", O_RDONLY) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/root/.mono/config", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/dev/shm/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/dev/shm/mono.3243", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0640) = 3
open("/proc/self/maps", O_RDONLY)       = 3
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe", O_RDONLY) = 3
open("/opt/mono/lib/mono/4.5/mscorlib.dll", O_RDONLY) = 3
open("/opt/mono/lib/mono/4.5/mscorlib.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/4.5/mscorlib.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/4.5/mscorlib.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/assemblies/mscorlib/mscorlib.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/proc/stat", O_RDONLY|O_CLOEXEC)  = 3
open("/proc/self/maps", O_RDONLY)       = 3
open("/proc/self/maps", O_RDONLY)       = 3
open("/proc/self/task/3244/comm", O_RDWR) = 3
open("/dev/null", O_RDWR)               = 3
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/assemblies/HyperFastCgi/HyperFastCgi.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/policy.4.0.mscorlib/0.0.0.0__b77a5c561934e089/policy.4.0.mscorlib.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/HyperFastCgi.exe.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/policy.4.0.System.Xml/0.0.0.0__b77a5c561934e089/policy.4.0.System.Xml.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll", O_RDONLY) = 3
open("/opt/mono/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/assemblies/System.Xml/System.Xml.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/policy.4.0.Mono.Posix/0.0.0.0__0738eb9f132ed756/policy.4.0.Mono.Posix.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll", O_RDONLY) = 3
open("/opt/mono/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/assemblies/Mono.Posix/Mono.Posix.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/policy.4.0.System/0.0.0.0__b77a5c561934e089/policy.4.0.System.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll", O_RDONLY) = 3
open("/opt/mono/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/assemblies/System/System.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/4.5/machine.config", O_RDONLY) = 3
open("/opt/mono/lib/mono/gac/policy.4.0.Mono.Security/0.0.0.0__0738eb9f132ed756/policy.4.0.Mono.Security.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll", O_RDONLY) = 4
open("/opt/mono/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/assemblies/Mono.Security/Mono.Security.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/urandom", O_RDONLY)          = 3
open("/opt/mono/lib/mono/gac/policy.4.0.System.Configuration/0.0.0.0__b03f5f7f11d50a3a/policy.4.0.System.Configuration.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll", O_RDONLY) = 4
open("/opt/mono/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/assemblies/System.Configuration/System.Configuration.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/etc/mono/4.5/machine.config", O_RDONLY) = 4
open("/etc/mono/mono.conf", O_RDONLY)   = 4
open("/usr/share/terminfo/x/xterm-256color", O_RDONLY) = 4
open("/etc/mono/conf.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
open("/etc/mono/conf.d/firstdemo.webapp", O_RDONLY) = 4
open("/etc/mono/mono.conf", O_RDONLY)   = 4
open("/etc/mono/mono.conf", O_RDONLY)   = 4
open("/etc/mono/mono.conf", O_RDONLY)   = 4
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.so", O_RDONLY) = 4
open("/opt/mono/lib/tls/x86_64/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/tls/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/x86_64/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/mono/lib/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/lib64/libglib-2.0.so.0", O_RDONLY) = 4
open("/opt/mono/lib/libevent_pthreads-2.0.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libevent_pthreads-2.0.so.5", O_RDONLY) = 4
open("/opt/mono/lib/libevent-2.0.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libevent-2.0.so.5", O_RDONLY) = 4
open("/opt/mono/lib/libmonoboehm-2.0.so.1", O_RDONLY) = 4
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/lib64/tls/x86_64/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/x86_64/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libhfc-native", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/x86_64/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/x86_64/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/usr/local/lib/libhfc-native.so", O_RDONLY) = 4
open("/opt/mono/lib/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libglib-2.0.so.0", O_RDONLY) = 4
open("/opt/mono/lib/libevent_pthreads-2.0.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libevent_pthreads-2.0.so.5", O_RDONLY) = 4
open("/opt/mono/lib/libevent-2.0.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libevent-2.0.so.5", O_RDONLY) = 4
open("/opt/mono/lib/libmonoboehm-2.0.so.1", O_RDONLY) = 4
open("libhfc-native.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/lib64/tls/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libhfc-native", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.so", O_RDONLY) = 4
open("/opt/mono/lib/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/lib64/libglib-2.0.so.0", O_RDONLY) = 4
open("/opt/mono/lib/libevent_pthreads-2.0.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libevent_pthreads-2.0.so.5", O_RDONLY) = 4
open("/opt/mono/lib/libevent-2.0.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libevent-2.0.so.5", O_RDONLY) = 4
open("/opt/mono/lib/libmonoboehm-2.0.so.1", O_RDONLY) = 4
open("/usr/local/lib/hyperfastcgi/4.0/libhfc-native.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/lib64/tls/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libhfc-native", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/usr/local/lib/libhfc-native.so", O_RDONLY) = 4
open("/opt/mono/lib/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libglib-2.0.so.0", O_RDONLY) = 4
open("/opt/mono/lib/libevent_pthreads-2.0.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libevent_pthreads-2.0.so.5", O_RDONLY) = 4
open("/opt/mono/lib/libevent-2.0.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libevent-2.0.so.5", O_RDONLY) = 4
open("/opt/mono/lib/libmonoboehm-2.0.so.1", O_RDONLY) = 4
open("libhfc-native.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/lib64/tls/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libhfc-native", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libhfc-native", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libhfc-native.la", O_RDONLY)      = -1 ENOENT (No such file or directory)

Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for HyperFastCgi.Transports.CombinedFastCgiListenerTransport ---> System.DllNotFoundException: libhfc-native
  at (wrapper managed-to-native) HyperFastCgi.Transports.CombinedFastCgiListenerTransport:RegisterIcall ()
  at HyperFastCgi.Transports.CombinedFastCgiListenerTransport..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0 
  at HyperFastCgi.Listeners.ManagedFastCgiListener.Configure (System.Object conf, IApplicationServer server, System.Type listenerTransport, System.Object listenerTransportConfig, System.Type appHostTransport, System.Object appHostTransportConfig) [0x00000] in <filename unknown>:0 
  at HyperFastCgi.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for HyperFastCgi.Transports.CombinedFastCgiListenerTransport ---> System.DllNotFoundException: libhfc-native
  at (wrapper managed-to-native) HyperFastCgi.Transports.CombinedFastCgiListenerTransport:RegisterIcall ()
  at HyperFastCgi.Transports.CombinedFastCgiListenerTransport..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0 
  at HyperFastCgi.Listeners.ManagedFastCgiListener.Configure (System.Object conf, IApplicationServer server, System.Type listenerTransport, System.Object listenerTransportConfig, System.Type appHostTransport, System.Object appHostTransportConfig) [0x00000] in <filename unknown>:0 
  at HyperFastCgi.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 

Thanks for any suggestions.

@xplicit: if needed, I can easily give you shell access to my test machine.

Cheers Corrado

xplicit commented 9 years ago

@corradofiore in common case HyperFastCgi and mono should be installed in the same prefix. You can try do the following:

or run with

 LD_LIBRARY_PATH=/usr/local /usr/local/bin/hyperfastcgi4 /config=/etc/mono/mono.conf /appconfigdir=/etc/mono/conf.d/

or compile and install HyperFastCgi with prefix=/opt/mono

Here are the documentation about mono libraries search path

http://www.mono-project.com/docs/advanced/pinvoke/#linux-shared-library-search-path