Open jeffgabriel opened 9 years ago
Please show the output of the hyperfastcgi4
command with loglevels=All
hyperfastcgi4 /config=/usr/local/server.config /logfile=/usr/local/HyperFastCgi/logging.log /loglevels=All
Ah, that's more info...
What's the significance of the root directory? Is that being used to locate the assemblies?
[2015-09-18 08:15:46Z] Debug HyperFastCgi
[2015-09-18 08:15:46Z] Debug Threadpool minw=40,minio=16,maxw=800,maxio=32
[2015-09-18 08:15:46Z] Debug Root directory: /usr/local
[2015-09-18 08:15:47Z] Error Can't create host System.IO.FileNotFoundException: Could not load file or assembly 'HyperFastCgi, Version=0.4.4.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'HyperFastCgi, Version=0.4.4.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in
The most possible reason of the error that HyperFastCgi.dll is not registered in the GAC. Did you do make install
to install the library? I've never checked installation procedure on Mac OS, because I don't have Mac, so there could be some issues.
root directory is the directory for configuration of web appplications. If you want to use relative paths of web application location in config, you can set up root directory in config.
Yes, i used the same commands as on the instructions:
./autogen.sh --prefix=/usr make sudo make install
I used CakeBrew to install the automake/libtool/autoconf/glib dependencies and had to additionally run make install on libtool.
If there are logs you would be interested in, let me know. I went ahead and manually gac'd the exe, and now get a different log:
[2015-09-18 14:44:05Z] Debug HyperFastCgi [2015-09-18 14:44:05Z] Debug Threadpool minw=40,minio=16,maxw=800,maxio=32 [2015-09-18 14:44:05Z] Debug Root directory: /usr/local [2015-09-18 14:44:05Z] Error Can't create host System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Server stack trace:
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in
Exception rethrown at [0]:
---> System.TypeInitializationException: An exception was thrown by the type initializer for HyperFastCgi.Transports.NativeTransport ---> System.MissingMethodException: Attempted to access a missing method.
at (wrapper managed-to-native) HyperFastCgi.Transports.NativeTransport:RegisterTransport (System.Type)
at HyperFastCgi.Transports.NativeTransport..cctor () [0x00000] in
Hi, I have the same error, can you tell me how can it be solved? Thanks!
OC: CentOS7
[2017-04-07 17:33:09Z] Debug HyperFastCgi libev.c:475: Listen(): libevent version: 2.0.21-stable libev.c:489: Listen(): libevent is using epoll for events. fcgi-transport.c:444: parse_params(): Can't find app! HOST='109.120.151.151' port=443 path='/index.aspx' fcgi-transport.c:444: parse_params(): Can't find app! HOST='109.120.151.151' port=443 path='/favicon.ico'
Nginx:
upstream fastcgi_backend {
server 127.0.0.1:9000;
keepalive 80;
}
server {
listen 80;
server_name 109.120.151.151;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name 109.120.151.151;
ssl_certificate /etc/nginx/ssl/xxxx.crt;
ssl_certificate_key /etc/nginx/ssl/xxx.key;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
send_timeout 600;
location ~ /\. { deny all; }
location / {
root /var/www/wsteleport/;
index index.html index.htm default.aspx Default.aspx;
fastcgi_index index.aspx;
fastcgi_keep_conn on;
fastcgi_pass fastcgi_backend;
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^((?U).+\.as.x)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
HyperFastCGI:
<configuration>
<server type="HyperFastCgi.ApplicationServers.SimpleApplicationServer">
<host-factory>HyperFastCgi.HostFactories.SystemWebHostFactory</host-factory>
<threads min-worker="80" max-worker="0" min-io="4" max-io="0" />
</server>
<listener type="HyperFastCgi.Listeners.NativeListener">
<apphost-transport type="HyperFastCgi.Transports.NativeTransport">
<multithreading>ThreadPool</multithreading>
</apphost-transport>
<protocol>InterNetwork</protocol>
<address>127.0.0.1</address>
<port>9000</port>
</listener>
<apphost type="HyperFastCgi.AppHosts.AspNet.AspNetApplicationHost">
<log level="Debug" write-to-console="true" />
<add-trailing-slash>false</add-trailing-slash>
</apphost>
<web-applications>
<web-application>
<name>109.120.151.151</name>
<vhost>109.120.151.151</vhost>
<vport>80</vport>
<vpath>/</vpath>
<path>/var/www/wsteleport/</path>
</web-application>
</web-applications>
</configuration>
@MherX This issue is unrelated to original, please open another one. In short this message means that your application declaration does not match to the host:port which are coming from nginx. In your case you listens on 443 and all requests come to 443 port, but you defined 80 vport
in web-application
element. That's why your application could not be found and hyperfastcgi shows error message.
@xplicit tahnks, I open another issue: https://github.com/xplicit/HyperFastCgi/issues/81
While it could certainly be my configuration, i am matching samples but just can't seem to get a response. Nginx serves the static web page OK when no fastcgi is configured.
OS: Mac OS X Yosemite NGinx: 1.9.4 Mono: 4.0.2 HyperFastCgi: 4 - built from master sources
server.config:
nginx.conf:
http { upstream fastcgi_backend { server 127.0.0.1:9000; keepalive 32; } server { listen 80 default_server; server_name localhost; access_log /var/log/web.log; error_log /var/log/nginxerror.log;
location / { root /usr/local/var/www/; index index.html index.htm default.aspx Default.aspx; fastcgi_index index.html; fastcgi_keep_conn on; fastcgi_pass fastcgi_backend; include /usr/local/nginx/conf/fastcgi_params; } } } events { worker_connections 1024; }
run command:
hyperfastcgi4 /config=/usr/local/server.config /logfile=/usr/local/HyperFastCgi/logging.log /loglevels=Debug
Output: [2015-09-17 22:18:02Z] Debug HyperFastCgi libev.c:461: Listen(): libevent version: 2.0.22-stable libev.c:475: Listen(): libevent is using kqueue for events. fcgi-transport.c:394: parse_params(): Can't find app! HOST='localhost' port=80 path='/index.html'