(22)Invalid argument: FastCGI: process manager exiting, setgid() failed - apache

I am trying to start the Apache server and I am going to use Fast CGI.
When I try to start it, I get following error message in error_log.
[alert] (22)Invalid argument: FastCGI: process manager exiting, setgid(4294967295) failed
So it looks like it is setting the group id and at that time it gave this alert message.
Any idea about this alert message?

It sounds like the group you have configured Apache to run under (often www-data) doesn't exist. Can you verify what group Apache is running as and that the group exists on your system?
This link might help you: http://httpd.apache.org/docs/1.3/misc/FAQ.html#setgid

Related

AH02026: Failed to acquire SSL session cache lock

First post, apologies if I get anything wrong.
Apache/2.4.6 (CentOS 7)
I am seeing repeated warnings in the ssl_error_logs of many of my virtual hosts. The warnings are:
[ssl:warn] [pid 8995] (22)Invalid argument: AH02027: Failed to release SSL session cache lock
[ssl:warn] [pid 8997] (22)Invalid argument: AH02026: Failed to acquire SSL session cache lock
If I restart httpd these errors go away for up to a few days but then re-appear.
I have read around this issue but can find no solution. Can anyone help?
This happens when the APACHE_RUN_USER is used for SSH login purposes too. Then, systemd clears all the locks of the user during logout, including the locks used by Apache 2.
The solution is to prevent systemd from removing the locks by adding the following line to /etc/systemd/logind.conf:
RemoveIPC=no

Internal Server Error from perl script solved by adding "-w" to the shebang line. But Why?

I spent hours and hours trying to fix an Internal Server Error on a perl program. I distilled the program down to the very simplest, and nothing would work. In fact, here's the entire program:
#!/usr/local/bin/perl
use strict;
print "Content-type: text/html\n\n";
print <<"thepage";
<html><head><title>Test</title></head><body>
<p>help</p>
</body></html>
thepage
Couldn't get it to work. Permissions correct. Same directory where I have literally a hundred other scripts running constantly. httpd.conf fine. It runs from the command line when SSHing into the server. Error message says:
[Mon May 18 09:59:29 2020] [error] [client 98.190.183.148] (13)Permission denied: exec of '/data/www/facialsurgery/root/cgi-bin/test_print_2.pl' failed
[Mon May 18 09:59:29 2020] [error] [client 98.190.183.148] Premature end of script headers: test_print_2.pl
But I fixed it! By adding "-w" to the shebang line, so the line says:
#!/usr/local/bin/perl -w
But I have, as I mentioned, many many programs running fine without the -w.
What can I do to trace this down more, so I don't eventually run into more trouble with more important programs?? Thanks so much for any insight in this.
The error:
(13)Permission denied: exec of '/data/www/facialsurgery/root/cgi-bin/test_print_2.pl' failed
This means that the web server (Apache) wasn't able to execute the script due to a permission error. (13 is error number for Permission denied.) This has nothing to do with presence or absence of -w.[1]
First, determine as which user the web server (Apache) runs. For the remainder of this post, I'm going to assume it's the default, www-data.
Then, make sure the following file is readable (grants the r permission) and executable (x) by the www-data user (or its group):
/data/www/facialsurgery/root/cgi-bin/test_print_2.pl
This includes making sure the following directories are accessible (x) by the www-data user (or its group):
/data/www/facialsurgery/root/cgi-bin
/data/www/facialsurgery/root
/data/www/facialsurgery
/data/www
/data
If there's no problem with the permissions of those, you could also be running afoul or volume-wide limitations (e.g. noexec attribute on the value) or other security measures (e.g. SELinux restrictions)
I think that ancient systems used to treat everything after the shebang (#!) as the command to execute. On such a system, the kernel would try to execute the non-existent file /usr/local/bin/perl -w. But that would result in errno 2 (No such file or directory), and I don't believe any modern system does this.

ERR_EMPTY_RESPONSE When trying to access phpmyadmin

When accessing http://domain.com/phpmyadmin
I get the following error (this one is in chrome, but it is not working in any other browser either):
No data received
ERR_EMPTY_RESPONSE
When trying to access, apache's error log shows:
apache2: /build/buildd/xcache-1.3.2/stack.c:47: xc_stack_count: Assertion `stack != ((void *)0)' failed.
[Sat Apr 18 23:41:18 2015] [notice] child pid 31027 exit signal Aborted (6)
All worked well a week ago, can't figure out what went wrong.
Rebooted, reinstalled, reconfiugured phpmyadmin, nothing works :(
Working under Ubuntu 10.04,
Any ideas?
Was facing same error. Fixed it by removing a php module: php5-xcache
Received same error in browser.
Apache's error_log shows:
/usr/sbin/httpd: symbol lookup error: /usr/lib64/libnsssysinit.so: undefined symbol: PR_GetEnvSecure
Fixed by restarting Apache via stop and start (apachectl restart is not sufficient).

Restricting access to website, allowing only a single IP access

For testing purposes, I set this in my htacces:
order deny, allow
deny from all
allow from 123.456.789.000
But Firefox shows:
Internal Server Error The server
encountered an internal error or
misconfiguration and was unable to
complete your request.
Error log shows:
[Thu Feb 24 04:05:12 2011] [alert]
[client 123.456.789.000]
/var/www/vhosts/website.org/httpdocs/.htaccess:
order takes one argument,
'allow,deny', 'deny,allow', or
'mutual-failure'
What does this mean? What am i doing wrong?
Thanks for helping with this.
You have a space in your Order directive argument.

apache mod_proxy error os10060 and returning 503?

Can't get to my site. Apache gives the following error message:
[Fri Sep 05 08:47:42 2008] [error] (OS 10060)A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. : proxy: HTTP: attempt to connect to 10.10.10.1:80 (10.10.10.1) failed
Can you connect to the proxied host (10.10.10.1) directly? Is it functioning normally?
http://www.checkupdown.com/status/E503.html
Your Web server is effectively 'closed for repair'. It is still functioning minimally because it can at least respond with a 503 status code, but full service is impossible i.e. your Web site is simply unavailable. There are a myriad possible reasons for this, but generally it is because of some human intervention by the operators of your Web server machine. You can usually expect that someone is working on the problem, and normal service will resume as soon as possible.
You need to restart the webserver then figure out why it shut it self down.