Re: [users@httpd] PHP-CGI with Apache-2.4.37

2019-03-08 Thread Hemant Chaudhary
Hi Eric,

Now with script alias, I am getting error [Fri Mar 08 12:56:13.771703 2019]
[cgi:error] [pid 1862271014:tid 579777016812208132] [client
15.213.82.149:52137] malformed header from script 'first.php': Bad header:
Security Alert! The PHP


Wherease script is working fine when running it thorough terminal.
Do you have any idea how to solve this?

Thanks
Hemant


On Fri, Mar 8, 2019 at 5:48 PM Eric Covener  wrote:

> On Fri, Mar 8, 2019 at 6:38 AM Hemant Chaudhary
>  wrote:
> >
> > Hi All,
> >
> > I want to use my php scripts using mod-cgi.
> >
> > httpd.conf
> > AddHandler application/x-httpd-php7 php
> >  AddHandler application/x-httpd-php7 .php
>
> This is mod_php configuration, you want to configure mod_cgi directly
> (ScriptAlias)
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] PHP-CGI with Apache-2.4.37

2019-03-08 Thread Hemant Chaudhary
Hi All,

I want to use my php scripts using mod-cgi.

httpd.conf
AddHandler application/x-httpd-php7 php
 AddHandler application/x-httpd-php7 .php

and my first.php is like

#!/usr/bin/php-cgi



But when I am sending request from browser, my php page got displayed
there instead of content of php page.

Permission of php file is -rwxr-xr-x

Please let me know what am I missing ?


Thanks

Hemant


[users@httpd] ThreadsPerChild in apache-2.4.37

2019-01-15 Thread Hemant Chaudhary
Hi All,

1) I am using apache-2.4.37 and found that when I am setting
ThreadsPerChild to 5 or 10, it is not creating that number of threads.
Still it creates default threads i:e 25 in debug mode (-X) option.
Whether this parameter doesn't work in debug mode or any issue in
apache-2.4.37 ?

2) I am not able to handle SIGTERM signal in apache server when using
worker module whereas it is possible in prefork module when starting in
debug mode (-X).
While going thorough the code, I came across this snippet :

/* !one_process */
/* remove SIGTERM from the set of blocked signals...  if one of
 * the other threads in the process needs to take us down
 * (e.g., for MaxConnectionsPerChild) it will send us SIGTERM
 */
unblock_signal(SIGTERM);
apr_signal(SIGTERM, dummy_signal_handler);

Whereas unblock_signal is missing in debug mode i:e one process mode.

Whether this is the reason that we are not able to handle sigterm in worker
because it is blocked ?

Thanks
Hemant


Re: [users@httpd] Doubts in apache-2.4.37

2019-01-15 Thread Hemant Chaudhary
Hi,,
3) I am using mod_proxy and mod_proxy_http to proxy request to backend
server.
With http we have stream flow of message.

Thanks
Hemant

On Mon, Jan 14, 2019 at 10:37 PM Yehuda Katz  wrote:

> 1. Don't know, should be easy to test.
>
> 2. Pipe.
>
> 3. I think this depends on which actual proxy module you are using. (There
> are parameters for controlling the buffer size and when to flush)
>
> On Mon, Jan 14, 2019 at 9:51 AM Hemant Chaudhary <
> hemantdude.chaudh...@gmail.com> wrote:
>
>> Hi Team,
>>
>> I have following doubt, please help me to understand
>>
>> 1) I am using worker MPM and according to architecture, each child
>> process creates one worker listener thread which has mutex and listens on
>> the port. If I am using two ports 80 and 443 then whether each child
>> creates two listener thread  to listen on each port(80 and 443) or it will
>> create only one listener thread.
>>
>> 2) When mod_cgi forks the another process and sends the response back to
>> client then the communication between http process and forked process
>> happens through pipe or socket.
>>
>> 3) When we proxy https request to backend server like tomcat then whether
>> message transfers takes place in stream manner or it sends the whole
>> message to backend server after decrypt the message.
>>
>> Please let me know if I am not clear.
>>
>> Thanks
>> Hemant
>>
>


[users@httpd] Doubts in apache-2.4.37

2019-01-14 Thread Hemant Chaudhary
Hi Team,

I have following doubt, please help me to understand

1) I am using worker MPM and according to architecture, each child process
creates one worker listener thread which has mutex and listens on the port.
If I am using two ports 80 and 443 then whether each child creates two
listener thread  to listen on each port(80 and 443) or it will create only
one listener thread.

2) When mod_cgi forks the another process and sends the response back to
client then the communication between http process and forked process
happens through pipe or socket.

3) When we proxy https request to backend server like tomcat then whether
message transfers takes place in stream manner or it sends the whole
message to backend server after decrypt the message.

Please let me know if I am not clear.

Thanks
Hemant


Re: [users@httpd] Graceful shutdown of apache

2018-12-10 Thread Hemant Chaudhary
Hi,

I have updated apache-2.4.29 to apache-2.4.37 but still I am not able to
graceful shutdown in debug mode.

Can you please tell me how should achieve it. ? or let me know the function
which I should call for proper graceful shutdown.

Thank you
Hemant


On Wed, Nov 28, 2018 at 9:07 AM Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> I am using apache-2.4.29 version.
>
> On Nov 28, 2018 4:32 AM, "Yann Ylavic"  wrote:
>
> Hi Hemant,
>
> On Mon, Nov 26, 2018 at 5:53 PM Hemant Chaudhary
>  wrote:
> >
> > I am able to stop only by kill -9 signal.
>
> Which httpd version are you using?
>
> The latest one (2.4.37) has several improvements with regard to
> signals and -X mode.
>
> Regards,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>
>


Re: [users@httpd] Graceful shutdown of apache

2018-11-27 Thread Hemant Chaudhary
I am using apache-2.4.29 version.

On Nov 28, 2018 4:32 AM, "Yann Ylavic"  wrote:

Hi Hemant,

On Mon, Nov 26, 2018 at 5:53 PM Hemant Chaudhary
 wrote:
>
> I am able to stop only by kill -9 signal.

Which httpd version are you using?

The latest one (2.4.37) has several improvements with regard to
signals and -X mode.

Regards,
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


Re: [users@httpd] Graceful shutdown of apache

2018-11-26 Thread Hemant Chaudhary
How can I stop process running with -X option.

Terminate signal (kill -term pid) is not working here(worker mpm) wherase
terminate signal works if -X option is used with prefork mpm.

I am able to stop only by kill -9 signal.

Thanks
Hemant

On Nov 26, 2018 10:10 PM, "William A Rowe Jr"  wrote:

Graceful shutdown is a WINCH signal.

In -X mode you don't have a parent -> children relationship with httpd,
just the worker process. It isn't for normal operation.



On Thu, Nov 22, 2018 at 7:28 AM Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi,
>
> I am not able to shutdown apache gracefully if I am starting apache in
> debug mode i:e (./httpd -X) with worker mpm. I am sending kill -term PID to
> httpd process. wherease the same command is working with prefork.
>
> How should I stop worker mpm if started in debug mode ?
>
>
> Thanks
> Hemant
>


Re: [users@httpd] Openssl-1.1.1 with apache-2.4.29

2018-11-22 Thread Hemant Chaudhary
Thanks Stefan.
apache-2.4.37 is able to use TLSv1.3 protocol.

Cheers,
Hemant


On Wed, Nov 21, 2018 at 4:18 PM Stefan Eissing 
wrote:

> The Option "TLSv1.3" in the directive SSLProtocol is available since httpd
> 2.4.37. Earlier versions will not recognize this and not enable it either.
>
> Cheers,
>
> Stefan
>
> > Am 21.11.2018 um 11:19 schrieb Hemant Chaudhary <
> hemantdude.chaudh...@gmail.com>:
> >
> > HI,
> >
> > I am using openssl-1.1.1 with apache-2.4.29 so that I can use tlsv1.3 in
> my server. I am able to build Mod_ssl.so but when I am starting the server
> with SSLProtocol TLSv1.3,  server is not starting and giving the error
> message "SSLProtocol: Illegal protocol 'TLSv1.3'
> >
> >
> > Does apache 2.4.29 supports openssl-1.1.1 for tlsv1.3 support ??
> >
> > Thanks
> > Hemant
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] Graceful shutdown of apache

2018-11-22 Thread Hemant Chaudhary
Hi,

I am not able to shutdown apache gracefully if I am starting apache in
debug mode i:e (./httpd -X) with worker mpm. I am sending kill -term PID to
httpd process. wherease the same command is working with prefork.

How should I stop worker mpm if started in debug mode ?


Thanks
Hemant


[users@httpd] Openssl-1.1.1 with apache-2.4.29

2018-11-21 Thread Hemant Chaudhary
HI,

I am using openssl-1.1.1 with apache-2.4.29 so that I can use tlsv1.3 in my
server. I am able to build Mod_ssl.so but when I am starting the server
with SSLProtocol TLSv1.3,  server is not starting and giving the
error message "SSLProtocol: Illegal protocol 'TLSv1.3'


Does apache 2.4.29 supports openssl-1.1.1 for tlsv1.3 support ??

Thanks
Hemant


[users@httpd] Cleanup in apache

2018-11-15 Thread Hemant Chaudhary
Hi All,

I am using apache-2.4.25 and apr-1.5.2.
When I am using mod_autoindex for indexing of icons directory, after
serving the request the process gets crashed.

I debugged and checked that it was getting crashed
from apr_pool_cleanup_kill ().
The line which causes the crash is "c->data == data && c->plain_cleanup_fn
== cleanup_f".

Please help me out the reason or this crash. Does anybody had this issue
before?

Thanks
Hemant


[users@httpd] Issue while listing Directory using mod_autoindex

2018-10-05 Thread Hemant Chaudhary
Hi All,

When I am trying to list directory in apache. My process get killed and I
was not able to see directory. During debugging I have seen that
"apr_dir_close(thedir);" apr_dir_close in function index_directory is
killing my process. So I have commented this function from index_directory.

After commenting, I am able to see the listing of directory but after
listing my directory process is getting killed again. While debugging got
the following stack trace:

->in run_cleanups () in /usr/local/lib/libapr-1.so
 -> in apr_pool_destroy () in /usr/local/lib/libapr-1.so
-> in eor_bucket_destroy at
\home\apache29\apache-2.4.29\httpd-2.4.29\server\eor_bucket.c:90
->in remove_empty_buckets at
\home\apache29\apache-2.4.29\httpd-2.4.29\server\core_filters.c:733
 ->send_brigade_nonblocking

I have few questions on this:
1) What is the significance of apr_dir_close(thedir); ?? If I will comment
this out then what will happen ?
2) What may be the cause for my process is getting killed before and after
comment.

Please help to solve this issue.

Thanks
Hemant


Re: [users@httpd] Get request of large file size greater than 100KB

2018-09-27 Thread Hemant Chaudhary
Hi,

I have solved the problem by changing MAX_IOVEC_TO_WRITE value to 6 from
16. Now maximum data will be 8KB*6=48KB, which is less than writev max
limit of 52KB.

Thanks
Hemant

On Thu, Sep 27, 2018 at 7:56 PM Googalar  wrote:

> Perhaps this thread will help you out...
>
> https://stackoverflow.com/questions/33811543/php-and-mod-fcgid-ap-pass-brigade-failed-in-handle-request-ipc-function#
> On Thu, Sep 27, 2018 at 1:15 AM Hemant Chaudhary
>  wrote:
> >
> > Hi All,
> >
> > I am trying to access large file(get request) of large file. This is
> working properly if size of file is less than 52KB. But size greater than
> 52KB is giving me error 4022.
> >
> > I have debugged and come to know that writev function can write maximum
> upto 52KB only. Therefore I changed the default value of
> THRESOLD_MAX_BUFFER to 42KB so that my writev will not reach to 52KB.
> THRESOLD_MAX_BUFFER to 42KB helps me to solve the issue for PUT request.
> >
> > But in get request while accessing large file, size of brigade crosses
> 52KB. As 52KB is greater than THRESOLD_MAX_BUFFER(42KB). It is trying to
> flush the data. But limit of writev on my OS is maximum 52KB only.
> Therefore it is giving 4022 error.
> >
> > Is there any way where I can control apache so that size of brigade will
> never cross 52KB? or any other approach/ configuration parameter can be
> used to solve this issue ?
> >
> > Thanks
> > Hemant
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] Get request of large file size greater than 100KB

2018-09-26 Thread Hemant Chaudhary
Hi All,

I am trying to access large file(get request) of large file. This is
working properly if size of file is less than 52KB. But size greater than
52KB is giving me error 4022.

I have debugged and come to know that writev function can write maximum
upto 52KB only. Therefore I changed the default value of
THRESOLD_MAX_BUFFER to 42KB so that my writev will not reach to 52KB.
THRESOLD_MAX_BUFFER to 42KB helps me to solve the issue for PUT request.

But in get request while accessing large file, size of brigade crosses
52KB. As 52KB is greater than THRESOLD_MAX_BUFFER(42KB). It is trying to
flush the data. But limit of writev on my OS is maximum 52KB only.
Therefore it is giving 4022 error.

Is there any way where I can control apache so that size of brigade will
never cross 52KB? or any other approach/ configuration parameter can be
used to solve this issue ?

Thanks
Hemant


[users@httpd] Auto-indexing of directory

2018-09-26 Thread Hemant Chaudhary
Hi All,

I want to see the content of directory. I am able to access particular file
of the directory but when I am accessing whole directory then my process is
getting killed. Response is 200 for both the cases. But directory listing
is not there.

my httpd.conf :
Alias
/hemant/"/home/hemant_super/practi/buffer_test_42kb/apache2.4.29/icons/"

Options Indexes FollowSymLinks
AllowOverride None
Require all granted


My error_log with trace 7:

[Wed Sep 26 09:56:33.552834 2018] [core:trace5] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\server\protocol.c(645): [client
15.213.82.149:51820] Request received from client: GET /hemant/ HTTP/1.1
[Wed Sep 26 09:56:33.553193 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(420):
[client 15.213.82.149:51820] Headers received from client:
[Wed Sep 26 09:56:33.553291 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
[client 15.213.82.149:51820]   Host: 15.213.91.33:5020
[Wed Sep 26 09:56:33.553303 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
[client 15.213.82.149:51820]   Connection: keep-alive
[Wed Sep 26 09:56:33.553311 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
[client 15.213.82.149:51820]   Cache-Control: max-age=0
[Wed Sep 26 09:56:33.553319 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
[client 15.213.82.149:51820]   Upgrade-Insecure-Requests: 1
[Wed Sep 26 09:56:33.553327 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
[client 15.213.82.149:51820]   User-Agent: Mozilla/5.0 (Windows NT 6.1;
Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79
Safari/537.36
[Wed Sep 26 09:56:33.553337 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
[client 15.213.82.149:51820]   Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
[Wed Sep 26 09:56:33.553345 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
[client 15.213.82.149:51820]   Accept-Encoding: gzip, deflate
[Wed Sep 26 09:56:33.553353 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
[client 15.213.82.149:51820]   Accept-Language: en-US,en;q=0.9
[Wed Sep 26 09:56:33.553533 2018] [authz_core:debug] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\aaa\mod_authz_core.c(809):
[client 15.213.82.149:51820] AH01626: authorization result of Require all
granted: granted
[Wed Sep 26 09:56:33.553545 2018] [authz_core:debug] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\aaa\mod_authz_core.c(809):
[client 15.213.82.149:51820] AH01626: authorization result of :
granted
[Wed Sep 26 09:56:33.553554 2018] [core:trace3] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\server\request.c(304): [client
15.213.82.149:51820] request authorized without authentication by
access_checker_ex hook: /hemant/
[Wed Sep 26 09:56:33.572607 2018] [http:trace3] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_filters.c(1128):
[client 15.213.82.149:51820] Response sent with status 200, headers:
[Wed Sep 26 09:56:33.572623 2018] [http:trace5] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_filters.c(1135):
[client 15.213.82.149:51820]   Date: Wed, 26 Sep 2018 09:56:33 GMT
[Wed Sep 26 09:56:33.572631 2018] [http:trace5] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_filters.c(1138):
[client 15.213.82.149:51820]   Server: Apache/2.4.29 (Unix) OpenSSL/1.0.2d
[Wed Sep 26 09:56:33.572642 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_filters.c(957):
[client 15.213.82.149:51820]   Keep-Alive: timeout=5, max=100
[Wed Sep 26 09:56:33.572658 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_filters.c(957):
[client 15.213.82.149:51820]   Connection: Keep-Alive
[Wed Sep 26 09:56:33.572666 2018] [http:trace4] [pid 385876011:tid
577197150216519684]
\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_filters.c(957):
[client 15.213.82.149:51820]   Transfer-Encoding: chunked
[Wed Sep 26 09:56:33.572674 2018] [

Re: [users@httpd] Re: Non Blocking write in apache

2018-09-26 Thread Hemant Chaudhary
Hi All,

I have a limitation for writev and readv to 52KB.
I was getting error for writev, therefore I changed THRESHOLD_MAX_BUFFER to
42KB. After that I was not getting any error.
Now in GET request of large file, I am getting the same 4022 error. This
may be because of readv function.

Is there any buffer/place where I can restrict readv to 42KB only,so that
it will not cross 52KB.

Thanks
Hemant




On Tue, Sep 18, 2018 at 2:18 PM Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi Yann,
>
> 42Kb works for me. Thanks for your support.
>
> Regards,
> Hemant
>
> On Mon, Sep 17, 2018 at 9:16 PM Hemant Chaudhary <
> hemantdude.chaudh...@gmail.com> wrote:
>
>> If it will flush data then at what condition it will go to apr_poll
>> function ??
>>
>> What I understand is that if buffer is filled with 52KB data and writev
>> is not ready then it should go into apr_poll().
>>
>>
>> Now the problem may exist with 42KB also.
>>
>> I hope I am explained my issue.
>>
>> Thanks
>> Hemant
>>
>> On Sep 17, 2018 6:58 PM, "Yann Ylavic"  wrote:
>>
>>> Hi,
>>>
>>> On Mon, Sep 17, 2018 at 1:51 PM Hemant Chaudhary
>>>  wrote:
>>> >
>>> > in the apache error_log with trace6, it is trying to flush because it
>>> reached thresold_max_buffer. But at the same time, it is adding data in
>>> buffer which increases it size to to more than 52KB and fails on NonStop.
>>>
>>> Yes, THRESHOLD_MAX_BUFFER is the limit *above* which the buffer is
>>> flushed, but not the maximum number of bytes flushed...
>>>
>>> > How should I stop apache so that it should go to select function till
>>> 52KB success.
>>>
>>> The simpler would be to take a 10K margin, like defining
>>> THRESHOLD_MAX_BUFFER to 42K.
>>> Otherwise, you need a patch like the one attached (untested)...
>>>
>>> Regards,
>>> Yann.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>> For additional commands, e-mail: users-h...@httpd.apache.org
>>>
>>


Re: [users@httpd] Re: Non Blocking write in apache

2018-09-18 Thread Hemant Chaudhary
Hi Yann,

42Kb works for me. Thanks for your support.

Regards,
Hemant

On Mon, Sep 17, 2018 at 9:16 PM Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> If it will flush data then at what condition it will go to apr_poll
> function ??
>
> What I understand is that if buffer is filled with 52KB data and writev is
> not ready then it should go into apr_poll().
>
>
> Now the problem may exist with 42KB also.
>
> I hope I am explained my issue.
>
> Thanks
> Hemant
>
> On Sep 17, 2018 6:58 PM, "Yann Ylavic"  wrote:
>
>> Hi,
>>
>> On Mon, Sep 17, 2018 at 1:51 PM Hemant Chaudhary
>>  wrote:
>> >
>> > in the apache error_log with trace6, it is trying to flush because it
>> reached thresold_max_buffer. But at the same time, it is adding data in
>> buffer which increases it size to to more than 52KB and fails on NonStop.
>>
>> Yes, THRESHOLD_MAX_BUFFER is the limit *above* which the buffer is
>> flushed, but not the maximum number of bytes flushed...
>>
>> > How should I stop apache so that it should go to select function till
>> 52KB success.
>>
>> The simpler would be to take a 10K margin, like defining
>> THRESHOLD_MAX_BUFFER to 42K.
>> Otherwise, you need a patch like the one attached (untested)...
>>
>> Regards,
>> Yann.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>


Re: [users@httpd] Re: Non Blocking write in apache

2018-09-17 Thread Hemant Chaudhary
If it will flush data then at what condition it will go to apr_poll
function ??

What I understand is that if buffer is filled with 52KB data and writev is
not ready then it should go into apr_poll().


Now the problem may exist with 42KB also.

I hope I am explained my issue.

Thanks
Hemant

On Sep 17, 2018 6:58 PM, "Yann Ylavic"  wrote:

> Hi,
>
> On Mon, Sep 17, 2018 at 1:51 PM Hemant Chaudhary
>  wrote:
> >
> > in the apache error_log with trace6, it is trying to flush because it
> reached thresold_max_buffer. But at the same time, it is adding data in
> buffer which increases it size to to more than 52KB and fails on NonStop.
>
> Yes, THRESHOLD_MAX_BUFFER is the limit *above* which the buffer is
> flushed, but not the maximum number of bytes flushed...
>
> > How should I stop apache so that it should go to select function till
> 52KB success.
>
> The simpler would be to take a 10K margin, like defining
> THRESHOLD_MAX_BUFFER to 42K.
> Otherwise, you need a patch like the one attached (untested)...
>
> Regards,
> Yann.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>


Re: [users@httpd] Re: Non Blocking write in apache

2018-09-17 Thread Hemant Chaudhary
Hi,

in the apache error_log with trace6, it is trying to flush because it
reached thresold_max_buffer. But at the same time, it is adding data in
buffer which increases it size to to more than 52KB and fails on NonStop.
How should I stop apache so that it should go to select function till 52KB
success.

Attaching error_log with new change.

Thanks
Hemant

On Mon, Sep 17, 2018 at 4:01 PM Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi Yann,
>
> Thanks for your explanation. I got  the issue.
> Actually NonStop has maximum limit of 52KB only for writev. Therefore I
> was getting 4022 after 49KB. Because after 49KB, apache is adding 8K more
> bytes which leads to 56KB. Therefore, writev was failing.
>
> To solve this, I have changed  THRESHOLD_MAX_BUFFER in core_filter.c to
> 5. But again I am seeing that after 49KB, apache is adding 8192 Bytes
> in it, which leads to failure of writev again.
>
> Do I need to change in more places or the above fix should work.
> Thanks
> Hemant
>
> On Sun, Sep 16, 2018 at 4:48 PM Yann Ylavic  wrote:
>
>> Hi Hermant,
>>
>> On Fri, Sep 14, 2018 at 1:53 PM Hemant Chaudhary
>>  wrote:
>> >
>> > Please don't get confuse with Cygwin(Windows). I am running apache on
>> NonStop(Tandem).
>>
>> Well, isn't the error_log attached to the previous message relevant
>> (be it cygwin or not)?
>> Btw, LogLevel trace6 would help here.
>>
>> > I have put breakpoint at apr_poll() but it is not going there.
>> >
>> > Few Events of writing :
>> > 1) apache writes 779 bytes to tomcat from apr_socket_sendv() function
>> and writev functions returns success.
>> > 2) apache writes 24604 bytes to tomcat from apr_socket_sendv() function
>> but writev function returns -1 with EWOULDBLOCK and it has
>> timeout=0(because set in writev_nonblocking())
>> > 3) apache again tries to write 32796 to tomcat from apr_socket_sendv()
>> function but writev function returns -1 with EWOULDBLOCK and it has
>> timeout=0(because set in writev_nonblocking()).
>> > 4) apache again tries to write 40988 to tomcat from apr_socket_sendv()
>> function but writev function returns -1 with EWOULDBLOCK and it has
>> timeout=0(because set in writev_nonblocking()).
>> > 5) apache again tries to write 49180 to tomcat from apr_socket_sendv()
>> function but writev function returns -1 with EWOULDBLOCK and it has
>> timeout=0(because set in writev_nonblocking()).
>>
>> OK, all those EWOULDBLOCK make the core output filter to bufferize the
>> "pending" data for the next time it's called.
>>
>> > 6) After this I am getting 4022 error.
>>
>> Here the 64K bufferized limit/threshold is reached
>> (non_file_bytes_in_brigade >= THRESHOLD_MAX_BUFFER in
>> ap_core_output_filter()), so the core output filter can't continue
>> nonblocking anymore and enters send_brigade_blocking(), which does
>> send_brigade_nonblocking() + apr_poll() until the 64K buffer is sent
>> completely.
>>
>> However it seems that on your system the first call to
>> send_brigade_nonblocking() fails (since apr_poll() is never called),
>> possibly a limit on apr_socket_sendv() (i.e. writev() syscall), either
>> more than 64K total bytes or nvec > 4?
>>
>> I think you need to debug/gdb in send_brigade_nonblocking() for this
>> last call and determine where and why send_brigade_nonblocking() =>
>> writev_nonblocking() => apr_socket_send() => writev(vec, nvec) fails.
>> Maybe a unit test (a simple standalone main() program) can determine
>> the limits for writev() on your system, so that the right values for
>> THRESHOLD_MAX_BUFFER and MAX_IOVEC_TO_WRITE (in
>> "server/core_filters.c") can be tuned for NonStop(Tandem) ...
>>
>> Hope that helps,
>> Yann.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>>
[Mon Sep 17 11:41:16.226341 2018] [core:trace5] [pid 1107296306:tid 
577217628620783620] 
C:\cygwin64\home\apache29\apache-2.4.29\httpd-2.4.29\server\protocol.c(645): 
[client 15.213.82.149:54687] Request received from client: POST 
/FileUploadServletExample/uploadFile HTTP/1.1
[Mon Sep 17 11:41:16.226712 2018] [http:trace4] [pid 1107296306:tid 
577217628620783620] 
C:\cygwin64\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(420):
 [client 15.213.82.149:54687] Headers received from client:, referer: 
http://15.213.91.33:5010/FileUploadServletExample/
[Mon Sep 17 11:41:1

Re: [users@httpd] Re: Non Blocking write in apache

2018-09-17 Thread Hemant Chaudhary
Hi Yann,

Thanks for your explanation. I got  the issue.
Actually NonStop has maximum limit of 52KB only for writev. Therefore I was
getting 4022 after 49KB. Because after 49KB, apache is adding 8K more bytes
which leads to 56KB. Therefore, writev was failing.

To solve this, I have changed  THRESHOLD_MAX_BUFFER in core_filter.c to
5. But again I am seeing that after 49KB, apache is adding 8192 Bytes
in it, which leads to failure of writev again.

Do I need to change in more places or the above fix should work.
Thanks
Hemant

On Sun, Sep 16, 2018 at 4:48 PM Yann Ylavic  wrote:

> Hi Hermant,
>
> On Fri, Sep 14, 2018 at 1:53 PM Hemant Chaudhary
>  wrote:
> >
> > Please don't get confuse with Cygwin(Windows). I am running apache on
> NonStop(Tandem).
>
> Well, isn't the error_log attached to the previous message relevant
> (be it cygwin or not)?
> Btw, LogLevel trace6 would help here.
>
> > I have put breakpoint at apr_poll() but it is not going there.
> >
> > Few Events of writing :
> > 1) apache writes 779 bytes to tomcat from apr_socket_sendv() function
> and writev functions returns success.
> > 2) apache writes 24604 bytes to tomcat from apr_socket_sendv() function
> but writev function returns -1 with EWOULDBLOCK and it has
> timeout=0(because set in writev_nonblocking())
> > 3) apache again tries to write 32796 to tomcat from apr_socket_sendv()
> function but writev function returns -1 with EWOULDBLOCK and it has
> timeout=0(because set in writev_nonblocking()).
> > 4) apache again tries to write 40988 to tomcat from apr_socket_sendv()
> function but writev function returns -1 with EWOULDBLOCK and it has
> timeout=0(because set in writev_nonblocking()).
> > 5) apache again tries to write 49180 to tomcat from apr_socket_sendv()
> function but writev function returns -1 with EWOULDBLOCK and it has
> timeout=0(because set in writev_nonblocking()).
>
> OK, all those EWOULDBLOCK make the core output filter to bufferize the
> "pending" data for the next time it's called.
>
> > 6) After this I am getting 4022 error.
>
> Here the 64K bufferized limit/threshold is reached
> (non_file_bytes_in_brigade >= THRESHOLD_MAX_BUFFER in
> ap_core_output_filter()), so the core output filter can't continue
> nonblocking anymore and enters send_brigade_blocking(), which does
> send_brigade_nonblocking() + apr_poll() until the 64K buffer is sent
> completely.
>
> However it seems that on your system the first call to
> send_brigade_nonblocking() fails (since apr_poll() is never called),
> possibly a limit on apr_socket_sendv() (i.e. writev() syscall), either
> more than 64K total bytes or nvec > 4?
>
> I think you need to debug/gdb in send_brigade_nonblocking() for this
> last call and determine where and why send_brigade_nonblocking() =>
> writev_nonblocking() => apr_socket_send() => writev(vec, nvec) fails.
> Maybe a unit test (a simple standalone main() program) can determine
> the limits for writev() on your system, so that the right values for
> THRESHOLD_MAX_BUFFER and MAX_IOVEC_TO_WRITE (in
> "server/core_filters.c") can be tuned for NonStop(Tandem) ...
>
> Hope that helps,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Re: Non Blocking write in apache

2018-09-14 Thread Hemant Chaudhary
Hi Yann,
Please don't get confuse with Cygwin(Windows). I am running apache on
NonStop(Tandem). I have put breakpoint at apr_poll() but it is not going
there.

Few Events of writing :
1) apache writes 779 bytes to tomcat from apr_socket_sendv() function and
writev functions returns success.
2) apache writes 24604 bytes to tomcat from apr_socket_sendv() function but
writev function returns -1 with EWOULDBLOCK and it has timeout=0(because
set in writev_nonblocking())
3) apache again tries to write 32796 to tomcat from apr_socket_sendv()
function but writev function returns -1 with EWOULDBLOCK and it has
timeout=0(because set in writev_nonblocking()).
4) apache again tries to write 40988 to tomcat from apr_socket_sendv()
function but writev function returns -1 with EWOULDBLOCK and it has
timeout=0(because set in writev_nonblocking()).
5) apache again tries to write 49180 to tomcat from apr_socket_sendv()
function but writev function returns -1 with EWOULDBLOCK and it has
timeout=0(because set in writev_nonblocking()).
6) After this I am getting 4022 error.

What is happening here that after 24604 bytes in step 2, apache is 8192
bytes in buffer till step 5 and then giving 4022 error.
All timeouts has default value.

I am wondering that why is it not going into select() if writev is
returning -1 with EWOULDBLOCK.
Why is it  failing after 49180 bytes. Does max size for this buffer is 49K??

I am able to upload same file if I am using blocking call.
Please let me know if you need more information.

Thanks
Hemant


On Fri, Sep 14, 2018 at 3:56 PM Yann Ylavic  wrote:

> Hi Hermant,
>
> On Fri, Sep 14, 2018 at 8:08 AM Hemant Chaudhary
>  wrote:
> >
> > I have tried to upload a file of 26.5mb on apache tomcat, which was
> successfull.
> > I tried to proxy request to tomcat with same file. But get following
> error.
> > Attaching the error_log.
> >
> > Can you please help me to understand where I am going wrong ?
>
> I don't run Windows, sorry I'm no expert there, more questions than
> answers below...
> So apr_poll() returns APR_EINVAL, right?
>
> What could be the reasons for poll() in cygwin to return EINVAL?
> I don't know how cygwin implements poll(), but for instance I see that
> WSAPoll() can return:
> WSAEINVAL An invalid parameter was passed. This error is returned if
> the fdarray parameter contains a NULL pointer. This error is also
> returned if invalid flags were specified in the events member of any
> of the WSAPOLLFD structures pointed to by the fdarray parameter when
> requesting socket status. This error is also returned if none of the
> sockets specified in the fd member of any of the WSAPOLLFD structures
> pointed to by the fdarray parameter were valid.
>
> What's the value of "timeout" for apr_poll() in send_brigade_blocking()?
> Could you debug apr_poll() and see if something like the above happens
> to the parameters passed to poll()?
>
> Regards,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Re: Non Blocking write in apache

2018-09-13 Thread Hemant Chaudhary
Hi Yann

I have tried to upload a file of 26.5mb on apache tomcat, which was
successfull.
I tried to proxy request to tomcat with same file. But get following error.
Attaching the error_log.

Can you please help me to understand where I am going wrong ?

Thanks
Hemant


On Wed, Sep 12, 2018 at 8:37 PM Yann Ylavic  wrote:

> On Wed, Sep 12, 2018 at 12:48 PM Hemant Chaudhary
>  wrote:
> >
> > Actually it is setting sock->timeout to 0 in writev_nonblocking() in
> core_filters.c.
> > arv = apr_socket_timeout_set(s, 0);
> >
> > Why does the default timeout  is changed and set to 0 ??
>
> Because writev_nonblocking() is really non-blocking and should return
> EAGAIN/EWOULDBLOCK when things start to block.
> But writev_nonblocking() is a local function, called (indirectly) by
> the core output filter which deals with EAGAIN appropriately.
>
> Why is it an issue for mod_proxy_http? EAGAIN remains local to the
> core filtering, but however mod_proxy_http always passes a FLUSH
> bucket at the end of the body, so everything should be fine at the
> core filter level...
>
>
> Regards,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>
[Fri Sep 14 06:01:06.140527 2018] [core:trace5] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\server\protocol.c(645): 
[client 15.213.82.149:63010] Request received from client: POST 
/FileUploadServletExample/uploadFile HTTP/1.1
[Fri Sep 14 06:01:06.140857 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(420):
 [client 15.213.82.149:63010] Headers received from client:, referer: 
http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.140958 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   Host: 15.213.91.33:5005, referer: 
http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.140972 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   Connection: keep-alive, referer: 
http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.140981 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   Content-Length: 27779786, referer: 
http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.140989 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   Cache-Control: max-age=0, referer: 
http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.140997 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   Origin: http://15.213.91.33:5005, referer: 
http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.141006 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   Upgrade-Insecure-Requests: 1, referer: 
http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.141015 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   Content-Type: multipart/form-data; 
boundary=WebKitFormBoundary78WxpmrfbRHriF4B, referer: 
http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.141024 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; 
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36, 
referer: http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.141035 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424):
 [client 15.213.82.149:63010]   Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,
 referer: http://15.213.91.33:5005/FileUploadServletExample/
[Fri Sep 14 06:01:06.141044 2018] [http:trace4] [pid 553648168:tid 
577241474279276548] 
C:\cygwin64\home\hemant\apache-2.4.29\httpd-2.4.2

[users@httpd] Re: Non Blocking write in apache

2018-09-12 Thread Hemant Chaudhary
Hi All,

Actually it is setting sock->timeout to 0 in writev_nonblocking() in
core_filters.c.
arv = apr_socket_timeout_set(s, 0);

Why does the default timeout  is changed and set to 0 ??
Thanks
Hemant

On Wed, Sep 12, 2018 at 4:03 PM Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi All,
>
> I am using proxy_http to proxy my request to tomcat from apache. But in
> non-blocking call it is not working properly(timeout issue). I am using the
> default timeout i:e 60 sec.
>
> When writev returns -1 with errorno==4101, it should wait and then again
> try for write.
> while ((rv == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
>   && (sock->timeout > 0)) _ code snippet from
> sendrecv.c
>
> In debugging I have checked that sock->timeout is equal to 0. Therefore
> this condition is failed and request failed.
>
> When default timeout is 60sec then why does sock->timeout becomes 0 ??
>
> On further debugging, I came to know the reqtimeout_eor function is
> setting timeout to 0.
>
> static apr_status_t reqtimeout_eor(ap_filter_t *f, apr_bucket_brigade *bb)
> {
> if (!APR_BRIGADE_EMPTY(bb) && AP_BUCKET_IS_EOR(APR_BRIGADE_LAST(bb))) {
> reqtimeout_con_cfg *ccfg = f->ctx;
> ccfg->timeout_at = 0;
> }
> return ap_pass_brigade(f->next, bb);
> }
>
> I am not able to understand why this function is setting to 0.
>
> Can somebody help me to understand the issue ?
>
> Thanks
> Hemant
>
>
>


[users@httpd] Non Blocking write in apache

2018-09-12 Thread Hemant Chaudhary
Hi All,

I am using proxy_http to proxy my request to tomcat from apache. But in
non-blocking call it is not working properly(timeout issue). I am using the
default timeout i:e 60 sec.

When writev returns -1 with errorno==4101, it should wait and then again
try for write.
while ((rv == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
  && (sock->timeout > 0)) _ code snippet from
sendrecv.c

In debugging I have checked that sock->timeout is equal to 0. Therefore
this condition is failed and request failed.

When default timeout is 60sec then why does sock->timeout becomes 0 ??

On further debugging, I came to know the reqtimeout_eor function is setting
timeout to 0.

static apr_status_t reqtimeout_eor(ap_filter_t *f, apr_bucket_brigade *bb)
{
if (!APR_BRIGADE_EMPTY(bb) && AP_BUCKET_IS_EOR(APR_BRIGADE_LAST(bb))) {
reqtimeout_con_cfg *ccfg = f->ctx;
ccfg->timeout_at = 0;
}
return ap_pass_brigade(f->next, bb);
}

I am not able to understand why this function is setting to 0.

Can somebody help me to understand the issue ?

Thanks
Hemant


[users@httpd] Message buffer in Apache Web Server

2018-08-23 Thread Hemant Chaudhary
Hi All,

I want to send 1MB of data of request at a time. For this I want to use
buffer in proxy_http. By default we can send 8192(8kb) of data at a time.

I have used ProxyIOBufferSize and BufferSize, but still it is sending 8192
only.

I tried to set these value to 512, so that it will send 512 Bytes at a
time. But again it is sending more than 512 Bytes.

How should I configure so that it can buffer the message till reaches the
buffer size or request is complete.

Thanks
Hemant


[users@httpd] Buffer in apache

2018-08-21 Thread Hemant Chaudhary
Hi All,

I want to use buffer of 512B in apache . I am using mod_proxy_http to send
request to tomcat and have set  ProxyIOBufferSize 512.

But it is sending message to tomcat with size greater than 512B.

How should I control apache in proxy so that it will send message and
receive with max buffer size of 512B.

Thanks
Hemant


Re: [users@httpd] How to use fcgistarter in apache

2018-08-09 Thread Hemant Chaudhary
Okay then how should I start any program using fastcgi starter.

Anybody using it ?

On Aug 9, 2018 6:08 PM, "Eric Covener"  wrote:

> On Thu, Aug 9, 2018 at 8:07 AM Hemant Chaudhary
>  wrote:
> >
> > Hi All,
> >
> > I tried to run my perl on port 8070 and proxy my request to port using
> mod_proxy_fcgi.
> >
> > I am using the following command
> > ./fcgistarter -c /usr/bin/perl -p 8070
> >
> > But none of the process gets started on port 8070.
> >
> > Please help how to use fcgistarter, so that I can start python or perl
> on some port and proxy request to it.
>
> I think you have to pass it something that will actually use the FCGI
> protocol.  perl with no arguments won't do anything relate to fastcgi.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] How to use fcgistarter in apache

2018-08-09 Thread Hemant Chaudhary
Hi All,

I tried to run my perl on port 8070 and proxy my request to port using
mod_proxy_fcgi.

I am using the following command
./fcgistarter -c /usr/bin/perl -p 8070

But none of the process gets started on port 8070.

Please help how to use fcgistarter, so that I can start python or perl on
some port and proxy request to it.

Thanks
Hemant


[users@httpd] Re: Test Functionality of Apache web server

2018-07-08 Thread Hemant Chaudhary
Any update on this ?


Thanks
Hemant

On Fri, Jul 6, 2018 at 2:44 PM, Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi All,
>
> Do we have any test suite for unit testing of apache source code?? I have
> taken open source code and build it. I want to test whether all
> functionalities is working or not.
>
> Any third party which provides test?
>
> Thanks
> Hemant
>


[users@httpd] Test Functionality of Apache web server

2018-07-06 Thread Hemant Chaudhary
Hi All,

Do we have any test suite for unit testing of apache source code?? I have
taken open source code and build it. I want to test whether all
functionalities is working or not.

Any third party which provides test?

Thanks
Hemant


Re: [users@httpd] PHP-7.2.5 with Apache-2.4.25

2018-06-28 Thread Hemant Chaudhary
Hi Frank,

When we start server which has mod_php then during it first dry run, it
loads the module and deload the module. After successful completion of
first dry run, it reads the configuration file second time and starts the
apache server.
During first dry run, dlopen() function loads the php module properly but
while deloading it using dlclose() it is throwing error. This means that
mod_php is not able to unload properly.

Hemant

On Thu, Jun 28, 2018 at 5:45 PM, Frank Gingras  wrote:

> What does "mod_php is not able to unload properly" mean in this case?
>
> Secondly, any reason why you're not using php-fpm with a threaded httpd
> mpm instead?
>
> On Wed, Jun 27, 2018 at 10:21 AM David Copeland 
> wrote:
>
>> Okay, sorry, probably can't help then. I'm running Opensuse 42.3, Apache
>> 2.4.33 (prefork) and mod_php 7.2.7.
>>
>> The one thing I forgot about when I originally switched from php 5 to 7
>> was the APACHE_MODULES variable in the file /etc/sysconfig/apache2,
>> changing php5 to php7. But each os/distro likes to tweak the config files
>> so not sure if this applies to you.
>>
>> Dave.
>>
>> On 27/06/18 10:06 AM, Hemant Chaudhary wrote:
>>
>> Its NonStop (tandem)
>>
>> On Jun 27, 2018 7:35 PM, "David Copeland" 
>> wrote:
>>
>>> What platform/distribution are you running?
>>>
>>> On 27/06/18 06:09 AM, Hemant Chaudhary wrote:
>>> > Hi,
>>> >
>>> > I was using mod_php of php-5.5.37 with apache-2.4.25 and it was
>>> > working fine. I upgraded the php to php-7.2.5. But after upgrade,
>>> > mod_php is not able to unload properly.
>>> >
>>> > Does anybody also face the same issue.
>>> >
>>> > Thanks
>>> > Hemant
>>>
>>>
>>> --
>>> David Copeland
>>> JSI Data Systems Limited
>>> 613-727-9353
>>> www.jsidata.ca
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>> For additional commands, e-mail: users-h...@httpd.apache.org
>>>
>>>
>>
>> --
>> David Copeland
>> JSI Data Systems Limited
>> 613-727-9353www.jsidata.ca
>>
>>


Re: [users@httpd] PHP-7.2.5 with Apache-2.4.25

2018-06-27 Thread Hemant Chaudhary
Its NonStop (tandem)

On Jun 27, 2018 7:35 PM, "David Copeland"  wrote:

> What platform/distribution are you running?
>
> On 27/06/18 06:09 AM, Hemant Chaudhary wrote:
> > Hi,
> >
> > I was using mod_php of php-5.5.37 with apache-2.4.25 and it was
> > working fine. I upgraded the php to php-7.2.5. But after upgrade,
> > mod_php is not able to unload properly.
> >
> > Does anybody also face the same issue.
> >
> > Thanks
> > Hemant
>
>
> --
> David Copeland
> JSI Data Systems Limited
> 613-727-9353
> www.jsidata.ca
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] PHP-7.2.5 with Apache-2.4.25

2018-06-27 Thread Hemant Chaudhary
Hi,

I was using mod_php of php-5.5.37 with apache-2.4.25 and it was working
fine. I upgraded the php to php-7.2.5. But after upgrade, mod_php is not
able to unload properly.

Does anybody also face the same issue.

Thanks
Hemant


Re: [users@httpd] Rotate logs in apache-2.4.29

2018-06-08 Thread Hemant Chaudhary
Now its working. Earlier rotatelogs directory was not proper.

Thanks
Hemant

On Fri, Jun 8, 2018 at 7:14 PM, Yehuda Katz  wrote:

> Is rotatelogs actually located in /bin/ ?
>
> On my REHL 7 system, it is located in /usr/sbin/
> On Ubuntu 16.04, it is located in /usr/bin/
>
> - Y
>
> On Fri, Jun 8, 2018 at 5:11 AM Hemant Chaudhary <
> hemantdude.chaudh...@gmail.com> wrote:
>
>> Hi All,
>>
>> I am trying to use rotatelogs in my webserver, but unable to do that.
>> Please help me to know where I am going wrong.
>>
>> httpd.conf:
>> CustomLog "|/bin/rotatelogs logs/httpd_log 60" combined
>>
>> error_log:
>> (4002)No such file or directory: AH00104: unable to start piped log
>> program ' /bin/rotatelogs /logs/httpd_log 60'
>> AH00015: Unable to open logs
>>
>>
>> I tired for access_log too. But getting the same error.
>>
>> Thanks
>> Hemant
>>
>


[users@httpd] Rotate logs in apache-2.4.29

2018-06-08 Thread Hemant Chaudhary
Hi All,

I am trying to use rotatelogs in my webserver, but unable to do that.
Please help me to know where I am going wrong.

httpd.conf:
CustomLog "|/bin/rotatelogs logs/httpd_log 60" combined

error_log:
(4002)No such file or directory: AH00104: unable to start piped log program
' /bin/rotatelogs /logs/httpd_log 60'
AH00015: Unable to open logs


I tired for access_log too. But getting the same error.

Thanks
Hemant


Re: [users@httpd] Running Lua Script using mod_lua

2018-05-18 Thread Hemant Chaudhary
Hi,

Thanks issue is solved.
Actually I was using Lua-5.3. I migrated to Lua-5.1 and it works for me.

Hemant

On Thu, May 17, 2018 at 11:53 AM, Daniel Gruno  wrote:

> On 05/17/2018 08:21 AM, Luca Toscano wrote:
>
>> Hi,
>>
>> 2018-05-16 12:22 GMT+02:00 Hemant Chaudhary <
>> hemantdude.chaudh...@gmail.com <mailto:hemantdude.chaudh...@gmail.com>>:
>>
>> Hi,
>>
>> While running lua_script using mod_lua, I am getting this error in
>> error_log. What does it mean
>> "PANIC: unprotected error in call to Lua API (core and library have
>> incompatible numeric types)"
>>
>>
>> What version of Lua are you using? You can quickly check with something
>> like ldd /usr/local/apache2/modules/mod_lua.so. It might be a mismatch
>> between what you are trying to execute (the script) and what you are using
>> as interpreter (mod_lua), but I haven't investigated it very well so I
>> might be wrong :)
>>
>
> Almost! :)
> It's an incompatibility between mod_lua's lua lib (typically 5.1 or 5.2)
> and a library that is being used (likely made for 5.3?). There were
> fundamental changes to how numbers work in 5.3, if I remember correctly, so
> you would either have to use a library that works with 5.1/5.2, OR
> recompile mod_lua with the 5.3 library and headers.
>
>
>> Hope that helps,
>>
>> Luca
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] Running Lua Script using mod_lua

2018-05-16 Thread Hemant Chaudhary
Hi,

While running lua_script using mod_lua, I am getting this error in
error_log. What does it mean
"PANIC: unprotected error in call to Lua API (core and library have
incompatible numeric types)"


Thanks
Hemant


[users@httpd] Python and Perl support in Apache

2018-05-07 Thread Hemant Chaudhary
Hi All,

Which of the following is the best way to support python and perl in our
apache and why.

Python - WSGI, CGI, CGID or FCGID.

PERL - mod_perl, cgi, cgid , mod_fcgid, mod_psgi.

Thanks
Hemant


[users@httpd] openssl-1.1.0 with httpd-2.4.33

2018-05-02 Thread Hemant Chaudhary
Hi All,

I am trying to build openssl-1.1.0 with httpd-2.4.33, everything is working
fine without mod_ssl. But when I am loading mod_ssl, I am getting error
while deloading the module i:e dso_close. Whereas httpd-2.4.33 is working
fine with openssl-1.0.2d.

Does anybody also get this issue ?

Thanks
Hemant


[users@httpd] Re: Apache supports client initiated renegotiation

2018-04-19 Thread Hemant Chaudhary
Hi All,

Any help on this issue.
 My openssl is sending Secure client initiated renegotiation but my apache
server is rejecting because it is client initiated. I checked custom log
and it shows my apache supports secure renegotiation.

Can somebody has tried secure  renegotiation in apache. How to enable
client initiated secure renegotiation ?

Thanks
Hemant

On Thu, Apr 19, 2018 at 3:03 PM, Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi Team,
>
> I tried to send request from openssl-1.0.2d to Apache server-2.4.25 for
> ssl renegotiation using command "openssl s_client -connect IP:PORT". I got
> error RENEGOTIATING
> 2283136:error:1409E0E5:SSL routines:ssl3_write_bytes:ssl handshake
> failure:s3_pkt.c:656. I checked in error log, error is [client
> 15.213.82.149:52145] AH02042: rejecting client initiated renegotiation.
>
> I got SSL_SECURE_RENEG true in my custom log, it means we are supporting
> Secure Renegotiation. But how should I enable client initiated ssl
> renegotiation ?
>
>
>
> Thanks
> Hemant
>


[users@httpd] Apache supports client initiated renegotiation

2018-04-19 Thread Hemant Chaudhary
Hi Team,

I tried to send request from openssl-1.0.2d to Apache server-2.4.25 for ssl
renegotiation using command "openssl s_client -connect IP:PORT". I got
error RENEGOTIATING
2283136:error:1409E0E5:SSL routines:ssl3_write_bytes:ssl handshake
failure:s3_pkt.c:656. I checked in error log, error is [client
15.213.82.149:52145] AH02042: rejecting client initiated renegotiation.

I got SSL_SECURE_RENEG true in my custom log, it means we are supporting
Secure Renegotiation. But how should I enable client initiated ssl
renegotiation ?



Thanks
Hemant


Re: [users@httpd] Logging in apache

2018-04-18 Thread Hemant Chaudhary
Thanks Eric

It means thread are using lock so that one thread/process can write a time.
Right ?

On Apr 19, 2018 12:35 AM, "Eric Covener"  wrote:

> On Wed, Apr 18, 2018 at 2:33 PM, Hemant Chaudhary
>  wrote:
> > Hi Team,
> >
> > How apache writes to access_log or error log. Whether it opens File
> > Descriptor(FD) for each request/connection to write in log file.
>
> Logs are opened by the parent process at startup and the file
> descriptors are inherited by the children.  The files are kept open to
> and just written by each thread when needed.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] Logging in apache

2018-04-18 Thread Hemant Chaudhary
Hi Team,

How apache writes to access_log or error log. Whether it opens File
Descriptor(FD) for each request/connection to write in log file.


Thanks
Hemant


[users@httpd] How modules are called during request processing phase

2018-04-16 Thread Hemant Chaudhary
Hi All,

If I have two modules mod_A and mod_B. Both has defined a hook handler with
APR_HOOK_MIDDLE then which module will be called first to check handler.
Whether calling of module will be random for each request or it depends
which module is loaded first in httpd.conf.

Thanks
Hemant


[users@httpd] Writting own module

2018-04-11 Thread Hemant Chaudhary
Hi All,

I am writing my own module just to check process flow. I am bale to start
the server successfully after add this module but while sending request
from browser, I am getting error that requested URL is not found on server.
Whereas without the module everything works fine.

My Module is like:
#include "apr.h"
#include "apr_strings.h"
#include "apr_lib.h"
#include "apr_fnmatch.h"
#include "apr_hash.h"
#include "apr_thread_proc.h"/* for RLIMIT stuff */
#include "apr_random.h"

#define APR_WANT_IOVEC
#define APR_WANT_STRFUNC
#define APR_WANT_MEMFUNC
#include "apr_want.h"
#include
"/home/hemant/apache-2.4.25/httpd-2.4.25/srclib/apr/include/apr_general.h"
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_protocol.h" /* For index_of_response().  Grump. */
#include "http_request.h"
#include "http_vhost.h"
#include "http_main.h" /* For the default_handler below... */
#include "http_log.h"
#include "util_md5.h"
#include "http_connection.h"
#include "apr_buckets.h"
#include "util_filter.h"
#include "util_ebcdic.h"
#include "util_mutex.h"
#include "util_time.h"
#include "mpm_common.h"
#include "scoreboard.h"
#include "mod_core.h"
#include "mod_proxy.h"
#include "ap_listen.h"

int hemant_handler(request_rec *r)
{
#ifdef __DEBUG
ap_log_perror(APLOG_MARK, APLOG_NOTICE, 0, NULL, APLOGNO(00067)
  "Flow Debug Hemant: In function hemant_handler for
PID=%d and PPID=%d of /server/hemant_test.c",getpid(),getppid());
#endif
return DECLINED;

}


static void register_hooks(apr_pool_t *p)
{

ap_hook_handler(hemant_handler,NULL,NULL,APR_HOOK_MIDDLE);
}

AP_DECLARE_MODULE(hemant_test) =
{
STANDARD20_MODULE_STUFF,
NULL,   /* dir config creater */
NULL,   /* dir config creater */
NULL,   /* dir merger --- default is to override */
NULL,   /* server config */
NULL,   /* merge server config */
register_hooks  /* register hooks */
};

Please let me know, what am I missing.
Thanks
Hemant


[users@httpd] Scoreboard file

2018-02-27 Thread Hemant Chaudhary
Hi,

According to Apache documentation, parent and Child processes communicate
with shared memory. But I don't have shared memory, therefore they are
communicating through scoreboard file.

I added " ScoreBoardFile /apache/logs/apache_runtime_status " in httpd.conf
to create file at this location. When I started, apache_runtime_status file
get created at above location. But this file contains only 4 Bytes and
file is not getting updated with load on apache. Then how child and parent
processes are communicating with this 4 Byte scoreboard file?  Is there any
other file or way to communicate b/w child and parent process other than
shared memory or scoreboard file ?


Thanks
Hemant


[users@httpd] Apache 2.0 architecture

2018-02-20 Thread Hemant Chaudhary
Hi All,

While Debugging apache, I encountered with following questions. I am unable
to get answers for the following questions, please help to answer them.

Q1. Startup process is reading configuration two times and creating
conftree. Why do we need to read configuration script twice? Is there any
difference in conftree after first and second read of configuration script.

Q2.  When we start apache, it starts with startup process and then it
detaches and starts Master/Parent Process. After that Master Process take
control and spawn child processes. Why do we need to detach startup process
and start Master Process ?

Q3. If I will start my server in debug mode i:e with -X option then what of
the apache functionality will I loose other than child spawn ?

Thanks
Hemant


[users@httpd] Mutex at run time

2018-02-01 Thread Hemant Chaudhary
Hi,

I set Mutex to default, sysvsem but when I am checking error_log
AcceptMutex is none.

My httpd.conf:
Mutex  sysvsem
Mutex  sysvsem mpm-accept


My error_log :
worker.c(1885): AH00294: Accept mutex: none (default: sysvsem)

Where am I going wrong to use mutex ?

Hemant


[users@httpd] Integrate Apache-2.4.25 with tomcat-8.5.23

2018-01-19 Thread Hemant Chaudhary
Hi,

My apache is running on 15.213.91.33:5643 at location "/home/hemant/apache"
and tomcat-8.5.x is running on 15.213.91.33:8009 at location
/home/hemant/tomcat.

To integrate apache with tomcat I used mod_proxy and mod_proxy_ajp.
My httpd.conf looks like this :

ProxyPass "ajp://15.213.91.33:8009"
ProxyPassReverse "ajp://15.213.91.33:8009"


My server.xml is configured like :


When I am accessing "15.213.91.33:5643/ajp" then index.html of tomcat
appears, but If I click on any tab on page  then error 404 occurs because
URL changes to "15.213.91.33:5643/doc" (If I click on doc tab on
index.html). I think to work url should change to "15.213.91.33:5643/ajp/doc
".

Please let me know where my configuration is wrong ?

Thanks
Hemant


Re: [users@httpd] Worker MPM with debug mode

2018-01-18 Thread Hemant Chaudhary
Hi Yann,

Sorry I didn't noticed that I have copied prefork code in mail. I am using
following code in worker :

 if (one_process) {
worker_note_child_killed(/* slot */ 0, 0, 0);
atexit(apr_terminate);
}

exit(code);

This patch is not working as expected. To kill worker in debug mode, I ned
to use kill -9 PID whereas similar approach works as expected in prefork.

Thanks
Hemant


On Thu, Jan 18, 2018 at 9:33 PM, Yann Ylavic  wrote:

> On Thu, Jan 18, 2018 at 4:25 PM, Hemant Chaudhary
>  wrote:
> >
> > Yes this patch of code is not working for worker mpm in Apache-2.4.25
>
> Do you mean that the patch does not apply to 2.4.25 (patching fails)
> or that when the patch is applied it does not work as expected?
>
> The patch you proposed in the original message seems to be for
> prefork, not worker, while mine is really for worker, i.e.:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/
> worker/worker.c?r1=1814112&r2=1814111&pathrev=1814112&view=patch
>
>
> Thanks,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Worker MPM with debug mode

2018-01-18 Thread Hemant Chaudhary
Hi Yann,

Yes this patch of code is not working for worker mpm in Apache-2.4.25

Thanks
Hemant

On Jan 18, 2018 5:28 PM, "Yann Ylavic"  wrote:

> Hi Hemant,
>
> On Thu, Jan 18, 2018 at 6:23 AM, Hemant Chaudhary
>  wrote:
> > Hi All ,
> >
> > I added the following patch of code in my worker.c
> > static void clean_child_exit(int code)
> >
> >  if (one_process) {
> >  prefork_note_child_killed(/* slot */ 0, 0, 0);
> > +atexit(apr_terminate);
> >  }
> >  ap_mpm_pod_close(my_bucket->pod);
>
> I committed http://svn.apache.org/r1814112 in trunk lately, don't
> these patches work for you?
> Not proposed for backport to 2.4.x yet, testing would help..
>
> Regards,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] Worker MPM with debug mode

2018-01-17 Thread Hemant Chaudhary
Hi All ,

I added the following patch of code in my worker.c
static void clean_child_exit(int code)

 if (one_process) {
 prefork_note_child_killed(/* slot */ 0, 0, 0);
+atexit(apr_terminate);
 }
 ap_mpm_pod_close(my_bucket->pod);

When I am starting apache with Worker mpm in debug mode and killing the
process with kill -term PID, it is not killing the process. Whereas same
code is working for prefork in debug mode to kill process with kill -term
PID.

If I want to kill process with worker in debug mode then how should I kill
it with kill -term PID command.

Thanks
Hemant


Re: [users@httpd] After send status 200 response, process exited

2017-12-08 Thread Hemant Chaudhary
Hi

Yes my OS supports coredump but there also no stack is created.



On Dec 8, 2017 5:37 PM, "Eric Covener"  wrote:

> you might need to add that signal to ap_fatal_signal_setup() otherwise
> Apache will not change to CoreDumpDirectory before it dumps.  Or, if
> your OS supports it, tell it to put cores somewhere other thsan the
> working directory.
>
> On Fri, Dec 8, 2017 at 5:57 AM, Hemant Chaudhary
>  wrote:
> > Hi,,
> > I started my apache successfully, but when I am sending request from
> > browser. Getting ERR_NO_RESPONSE in chrome.
> >
> > I added LogLevel trace7 and collected the error log. What I have found
> that,
> > after successful response of requests(status-200), process is  exited. I
> > thought its coredump therefore added directory for coredump also but
> didn't
> > get anything error .
> >
> > What is the possible cause of this ?
> >
> >  Response sent with status 200, headers:
> > [Fri Dec 08 10:01:51.381659 2017] [http:trace5] [pid 1140850845]
> > \apache\httpd-2.4.25\modules\http\http_filters.c(1096): [client
> > 15.213.82.149:59662]   Date: Fri, 08 Dec 2017 10:01:51 GMT
> > [Fri Dec 08 10:01:51.381666 2017] [http:trace5] [pid 1140850845]
> > \apache\httpd-2.4.25\modules\http\http_filters.c(1099): [client
> > 15.213.82.149:59662]   Server: Apache/2.4.25 (Unix)
> > [Fri Dec 08 10:01:51.381675 2017] [http:trace4] [pid 1140850845]
> > \apache\httpd-2.4.25\modules\http\http_filters.c(918): [client
> > 15.213.82.149:59662]   Content-Length: 2810
> > [Fri Dec 08 10:01:51.381683 2017] [http:trace4] [pid 1140850845]
> > \apache\httpd-2.4.25\modules\http\http_filters.c(918): [client
> > 15.213.82.149:59662]   Keep-Alive: timeout=5, max=100
> > [Fri Dec 08 10:01:51.381690 2017] [http:trace4] [pid 1140850845]
> > \apache\httpd-2.4.25\modules\http\http_filters.c(918): [client
> > 15.213.82.149:59662]   Connection: Keep-Alive
> > [Fri Dec 08 10:01:51.381697 2017] [http:trace4] [pid 1140850845]
> > \apache\httpd-2.4.25\modules\http\http_filters.c(918): [client
> > 15.213.82.149:59662]   Content-Type: text/html; charset=ISO-8859-1
> > [Fri Dec 08 10:01:52.31 2017] [core:trace4] [pid 1845493770]
> > \apache\httpd-2.4.25\server\mpm_common.c(533): mpm child 50331671 (gen
> > 1/slot 2) started
> > [Fri Dec 08 10:01:58.324625 2017] [core:notice] [pid 1845493770] AH00052:
> > child pid 1140850845 exit signal signal #31 (31)
> >
> >
> > After serving the request, process is exited with signal 31.
> >
> > Thanks
> > Hemant
> >
>
>
>
> --
> Eric Covener
> cove...@gmail.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] After send status 200 response, process exited

2017-12-08 Thread Hemant Chaudhary
Hi,,
I started my apache successfully, but when I am sending request from
browser. Getting ERR_NO_RESPONSE in chrome.

I added LogLevel trace7 and collected the error log. What I have found
that, after successful response of requests(status-200), process is
exited. I thought its coredump therefore added directory for coredump also
but didn't get anything error .

What is the possible cause of this ?

 Response sent with status 200, headers:
[Fri Dec 08 10:01:51.381659 2017] [http:trace5] [pid 1140850845]
\apache\httpd-2.4.25\modules\http\http_filters.c(1096): [client
15.213.82.149:59662]   Date: Fri, 08 Dec 2017 10:01:51 GMT
[Fri Dec 08 10:01:51.381666 2017] [http:trace5] [pid 1140850845]
\apache\httpd-2.4.25\modules\http\http_filters.c(1099): [client
15.213.82.149:59662]   Server: Apache/2.4.25 (Unix)
[Fri Dec 08 10:01:51.381675 2017] [http:trace4] [pid 1140850845]
\apache\httpd-2.4.25\modules\http\http_filters.c(918): [client
15.213.82.149:59662]   Content-Length: 2810
[Fri Dec 08 10:01:51.381683 2017] [http:trace4] [pid 1140850845]
\apache\httpd-2.4.25\modules\http\http_filters.c(918): [client
15.213.82.149:59662]   Keep-Alive: timeout=5, max=100
[Fri Dec 08 10:01:51.381690 2017] [http:trace4] [pid 1140850845]
\apache\httpd-2.4.25\modules\http\http_filters.c(918): [client
15.213.82.149:59662]   Connection: Keep-Alive
[Fri Dec 08 10:01:51.381697 2017] [http:trace4] [pid 1140850845]
\apache\httpd-2.4.25\modules\http\http_filters.c(918): [client
15.213.82.149:59662]   Content-Type: text/html; charset=ISO-8859-1
[Fri Dec 08 10:01:52.31 2017] [core:trace4] [pid 1845493770]
\apache\httpd-2.4.25\server\mpm_common.c(533): mpm child 50331671 (gen
1/slot 2) started
[Fri Dec 08 10:01:58.324625 2017] [core:notice] [pid 1845493770] AH00052:
child pid 1140850845 exit signal signal #31 (31)


After serving the request, process is exited with signal 31.

Thanks
Hemant


Re: [users@httpd] Apache sending Content-Length 0

2017-12-08 Thread Hemant Chaudhary
Hi,

After more debug I came to know that content length is not the issue. Issue
is process is getting exited .
 Response sent with status 200, headers:
[Fri Dec 08 10:01:51.381659 2017] [http:trace5] [pid 1140850845]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(1096):
[client 15.213.82.149:59662]   Date: Fri, 08 Dec 2017 10:01:51 GMT
[Fri Dec 08 10:01:51.381666 2017] [http:trace5] [pid 1140850845]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(1099):
[client 15.213.82.149:59662]   Server: Apache/2.4.25 (Unix)
[Fri Dec 08 10:01:51.381675 2017] [http:trace4] [pid 1140850845]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(918):
[client 15.213.82.149:59662]   Content-Length: 2810
[Fri Dec 08 10:01:51.381683 2017] [http:trace4] [pid 1140850845]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(918):
[client 15.213.82.149:59662]   Keep-Alive: timeout=5, max=100
[Fri Dec 08 10:01:51.381690 2017] [http:trace4] [pid 1140850845]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(918):
[client 15.213.82.149:59662]   Connection: Keep-Alive
[Fri Dec 08 10:01:51.381697 2017] [http:trace4] [pid 1140850845]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(918):
[client 15.213.82.149:59662]   Content-Type: text/html; charset=ISO-8859-1
[Fri Dec 08 10:01:52.31 2017] [core:trace4] [pid 1845493770]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\mpm_common.c(533): mpm
child 50331671 (gen 1/slot 2) started
[Fri Dec 08 10:01:58.324625 2017] [core:notice] [pid 1845493770] AH00052: child
pid 1140850845 exit signal signal #31 (31)

What is the reason for exit of process after serve the request.

Thanks
Hemant


On Fri, Dec 8, 2017 at 9:38 AM, Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi
>
> Noticed one more thing, after sending status 200 with content length 0.
> That particular child process dies. I thought its code dump but didn't find
> any thing in dump directory.
>
> Thanks
> Hemant
>
>
> On Thu, Dec 7, 2017 at 4:07 PM, Daniel  wrote:
>
>> there is no reason to have that content length with a 200 and a file
>> with actual data.
>>
>> Perhaps you could check which user runs httpd, and which is the
>> unpriviledged user and if there is nothing in your cygwin install or
>> windows  is blocking it. Can't guess further.
>>
>> 2017-12-06 16:31 GMT+01:00 Hemant Chaudhary <
>> hemantdude.chaudh...@gmail.com>:
>> > Hi,
>> >
>> > I tired to solve this error but didn't get any hint why it is coming.
>> > Can you please help to solve the error. Which .c file manipulates the
>> data
>> > to send the response.
>> > What are the reason to send status 200 with content-length 0.
>> >
>> > Thanks
>> > Hemant
>> >
>> > On Tue, Dec 5, 2017 at 2:32 PM, Hemant Chaudhary
>> >  wrote:
>> >>
>> >> Hi,
>> >> index.html is default apache html file.
>> >> It works!
>> >>
>> >> I tried with cgi-script and other html files also, got the same error.
>> >> Thanks
>> >> Hemant
>> >>
>> >> On Tue, Dec 5, 2017 at 2:26 PM, Daniel  wrote:
>> >>>
>> >>> Hello,
>> >>>
>> >>> What's inside the index.html? Care to do a "cat index.html"?
>> >>>
>> >>> 2017-12-05 7:14 GMT+01:00 Hemant Chaudhary
>> >>> :
>> >>> > Hi,
>> >>> >
>> >>> > When I am sending request from browser to client for basic
>> >>> > "index.html", I
>> >>> > am getting error that
>> >>> > " Err_EMPTY_RESPONSE " in browser.
>> >>> >
>> >>> > When I checked in the error log, found that response content length
>> is
>> >>> > 0.
>> >>> >
>> >>> > [Tue Dec 05 05:28:15.499282 2017] [core:trace5] [pid 150995199:tid
>> >>> > 577157567797854212]
>> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\protocol.c(645):
>> >>> > [client
>> >>> > 15.213.82.149:62584] Request received from client: GET / HTTP/1.1
>> >>> > [Tue Dec 05 05:28:15.499445 2017] [http:trace4] [pid 150995199:tid
>> >>> > 577157567797854212]
>> >>> >
>> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(420):
>> >>> > [client 15.213.82.149:62584] Headers received from client:
>> >&g

Re: [users@httpd] Apache sending Content-Length 0

2017-12-07 Thread Hemant Chaudhary
Hi

Noticed one more thing, after sending status 200 with content length 0.
That particular child process dies. I thought its code dump but didn't find
any thing in dump directory.

Thanks
Hemant


On Thu, Dec 7, 2017 at 4:07 PM, Daniel  wrote:

> there is no reason to have that content length with a 200 and a file
> with actual data.
>
> Perhaps you could check which user runs httpd, and which is the
> unpriviledged user and if there is nothing in your cygwin install or
> windows  is blocking it. Can't guess further.
>
> 2017-12-06 16:31 GMT+01:00 Hemant Chaudhary  com>:
> > Hi,
> >
> > I tired to solve this error but didn't get any hint why it is coming.
> > Can you please help to solve the error. Which .c file manipulates the
> data
> > to send the response.
> > What are the reason to send status 200 with content-length 0.
> >
> > Thanks
> > Hemant
> >
> > On Tue, Dec 5, 2017 at 2:32 PM, Hemant Chaudhary
> >  wrote:
> >>
> >> Hi,
> >> index.html is default apache html file.
> >> It works!
> >>
> >> I tried with cgi-script and other html files also, got the same error.
> >> Thanks
> >> Hemant
> >>
> >> On Tue, Dec 5, 2017 at 2:26 PM, Daniel  wrote:
> >>>
> >>> Hello,
> >>>
> >>> What's inside the index.html? Care to do a "cat index.html"?
> >>>
> >>> 2017-12-05 7:14 GMT+01:00 Hemant Chaudhary
> >>> :
> >>> > Hi,
> >>> >
> >>> > When I am sending request from browser to client for basic
> >>> > "index.html", I
> >>> > am getting error that
> >>> > " Err_EMPTY_RESPONSE " in browser.
> >>> >
> >>> > When I checked in the error log, found that response content length
> is
> >>> > 0.
> >>> >
> >>> > [Tue Dec 05 05:28:15.499282 2017] [core:trace5] [pid 150995199:tid
> >>> > 577157567797854212]
> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\protocol.c(645):
> >>> > [client
> >>> > 15.213.82.149:62584] Request received from client: GET / HTTP/1.1
> >>> > [Tue Dec 05 05:28:15.499445 2017] [http:trace4] [pid 150995199:tid
> >>> > 577157567797854212]
> >>> >
> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(420):
> >>> > [client 15.213.82.149:62584] Headers received from client:
> >>> > [Tue Dec 05 05:28:15.499458 2017] [http:trace4] [pid 150995199:tid
> >>> > 577157567797854212]
> >>> >
> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> >>> > [client 15.213.82.149:62584]   Host: 15.213.91.33:2345
> >>> > [Tue Dec 05 05:28:15.499466 2017] [http:trace4] [pid 150995199:tid
> >>> > 577157567797854212]
> >>> >
> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> >>> > [client 15.213.82.149:62584]   Connection: keep-alive
> >>> > [Tue Dec 05 05:28:15.499474 2017] [http:trace4] [pid 150995199:tid
> >>> > 577157567797854212]
> >>> >
> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> >>> > [client 15.213.82.149:62584]   Cache-Control: max-age=0
> >>> > [Tue Dec 05 05:28:15.499482 2017] [http:trace4] [pid 150995199:tid
> >>> > 577157567797854212]
> >>> >
> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> >>> > [client 15.213.82.149:62584]   Upgrade-Insecure-Requests: 1
> >>> > [Tue Dec 05 05:28:15.499490 2017] [http:trace4] [pid 150995199:tid
> >>> > 577157567797854212]
> >>> >
> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> >>> > [client 15.213.82.149:62584]   User-Agent: Mozilla/5.0 (Windows NT
> 6.1;
> >>> > Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/60.0.3112.113
> >>> > Safari/537.36
> >>> > [Tue Dec 05 05:28:15.499499 2017] [http:trace4] [pid 150995199:tid
> >>> > 577157567797854212]
> >>> >
> >>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> >>> > [client 15.213.82.149:62584]   Accept:
> >>> &

Re: [users@httpd] Apache sending Content-Length 0

2017-12-06 Thread Hemant Chaudhary
Hi,

I tired to solve this error but didn't get any hint why it is coming.
Can you please help to solve the error. Which .c file manipulates the data
to send the response.
What are the reason to send status 200 with content-length 0.

Thanks
Hemant

On Tue, Dec 5, 2017 at 2:32 PM, Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi,
> index.html is default apache html file.
> It works!
>
> I tried with cgi-script and other html files also, got the same error.
> Thanks
> Hemant
>
> On Tue, Dec 5, 2017 at 2:26 PM, Daniel  wrote:
>
>> Hello,
>>
>> What's inside the index.html? Care to do a "cat index.html"?
>>
>> 2017-12-05 7:14 GMT+01:00 Hemant Chaudhary > m>:
>> > Hi,
>> >
>> > When I am sending request from browser to client for basic
>> "index.html", I
>> > am getting error that
>> > " Err_EMPTY_RESPONSE " in browser.
>> >
>> > When I checked in the error log, found that response content length is
>> 0.
>> >
>> > [Tue Dec 05 05:28:15.499282 2017] [core:trace5] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\protocol.c(645):
>> [client
>> > 15.213.82.149:62584] Request received from client: GET / HTTP/1.1
>> > [Tue Dec 05 05:28:15.499445 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(420):
>> > [client 15.213.82.149:62584] Headers received from client:
>> > [Tue Dec 05 05:28:15.499458 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(424):
>> > [client 15.213.82.149:62584]   Host: 15.213.91.33:2345
>> > [Tue Dec 05 05:28:15.499466 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(424):
>> > [client 15.213.82.149:62584]   Connection: keep-alive
>> > [Tue Dec 05 05:28:15.499474 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(424):
>> > [client 15.213.82.149:62584]   Cache-Control: max-age=0
>> > [Tue Dec 05 05:28:15.499482 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(424):
>> > [client 15.213.82.149:62584]   Upgrade-Insecure-Requests: 1
>> > [Tue Dec 05 05:28:15.499490 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(424):
>> > [client 15.213.82.149:62584]   User-Agent: Mozilla/5.0 (Windows NT 6.1;
>> > Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113
>> > Safari/537.36
>> > [Tue Dec 05 05:28:15.499499 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(424):
>> > [client 15.213.82.149:62584]   Accept:
>> > text/html,application/xhtml+xml,application/xml;q=0.9,image/
>> webp,image/apng,*/*;q=0.8
>> > [Tue Dec 05 05:28:15.499508 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(424):
>> > [client 15.213.82.149:62584]   Accept-Encoding: gzip, deflate
>> > [Tue Dec 05 05:28:15.499516 2017] [http:trace4] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\
>> http_request.c(424):
>> > [client 15.213.82.149:62584]   Accept-Language: en-US,en;q=0.8
>> > [Tue Dec 05 05:28:15.499690 2017] [authz_core:debug] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\aaa\mod_
>> authz_core.c(809):
>> > [client 15.213.82.149:62584] AH01626: authorization result of Require
>> all
>> > granted: granted
>> > [Tue Dec 05 05:28:15.499703 2017] [authz_core:debug] [pid 150995199:tid
>> > 577157567797854212]
>> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\aaa\mod_
>> authz_core.c(809):
>> > [client 15.213.82.149:62584] AH01626: authorization result of
>> :
>> > granted
>> > [Tue Dec 05 05:28:15.499712 2017] [core:trace3] [pid 

Re: [users@httpd] Apache sending Content-Length 0

2017-12-05 Thread Hemant Chaudhary
Hi,
index.html is default apache html file.
It works!

I tried with cgi-script and other html files also, got the same error.
Thanks
Hemant

On Tue, Dec 5, 2017 at 2:26 PM, Daniel  wrote:

> Hello,
>
> What's inside the index.html? Care to do a "cat index.html"?
>
> 2017-12-05 7:14 GMT+01:00 Hemant Chaudhary  >:
> > Hi,
> >
> > When I am sending request from browser to client for basic "index.html",
> I
> > am getting error that
> > " Err_EMPTY_RESPONSE " in browser.
> >
> > When I checked in the error log, found that response content length is 0.
> >
> > [Tue Dec 05 05:28:15.499282 2017] [core:trace5] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\protocol.c(645):
> [client
> > 15.213.82.149:62584] Request received from client: GET / HTTP/1.1
> > [Tue Dec 05 05:28:15.499445 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(420):
> > [client 15.213.82.149:62584] Headers received from client:
> > [Tue Dec 05 05:28:15.499458 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> > [client 15.213.82.149:62584]   Host: 15.213.91.33:2345
> > [Tue Dec 05 05:28:15.499466 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> > [client 15.213.82.149:62584]   Connection: keep-alive
> > [Tue Dec 05 05:28:15.499474 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> > [client 15.213.82.149:62584]   Cache-Control: max-age=0
> > [Tue Dec 05 05:28:15.499482 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> > [client 15.213.82.149:62584]   Upgrade-Insecure-Requests: 1
> > [Tue Dec 05 05:28:15.499490 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> > [client 15.213.82.149:62584]   User-Agent: Mozilla/5.0 (Windows NT 6.1;
> > Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113
> > Safari/537.36
> > [Tue Dec 05 05:28:15.499499 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> > [client 15.213.82.149:62584]   Accept:
> > text/html,application/xhtml+xml,application/xml;q=0.9,
> image/webp,image/apng,*/*;q=0.8
> > [Tue Dec 05 05:28:15.499508 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> > [client 15.213.82.149:62584]   Accept-Encoding: gzip, deflate
> > [Tue Dec 05 05:28:15.499516 2017] [http:trace4] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_request.c(424):
> > [client 15.213.82.149:62584]   Accept-Language: en-US,en;q=0.8
> > [Tue Dec 05 05:28:15.499690 2017] [authz_core:debug] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> aaa\mod_authz_core.c(809):
> > [client 15.213.82.149:62584] AH01626: authorization result of Require
> all
> > granted: granted
> > [Tue Dec 05 05:28:15.499703 2017] [authz_core:debug] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> aaa\mod_authz_core.c(809):
> > [client 15.213.82.149:62584] AH01626: authorization result of
> :
> > granted
> > [Tue Dec 05 05:28:15.499712 2017] [core:trace3] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\request.c(293):
> [client
> > 15.213.82.149:62584] request authorized without authentication by
> > access_checker_ex hook: /
> > [Tue Dec 05 05:28:15.500234 2017] [http:trace3] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_filters.c(1089):
> > [client 15.213.82.149:62584] Response sent with status 200, headers:
> > [Tue Dec 05 05:28:15.500248 2017] [http:trace5] [pid 150995199:tid
> > 577157567797854212]
> > C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\
> http\http_filters.c(1096):
> > [cli

[users@httpd] Apache sending Content-Length 0

2017-12-04 Thread Hemant Chaudhary
Hi,

When I am sending request from browser to client for basic "index.html", I
am getting error that
" Err_EMPTY_RESPONSE " in browser.

When I checked in the error log, found that response content length is 0.

[Tue Dec 05 05:28:15.499282 2017] [core:trace5] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\protocol.c(645): [client
15.213.82.149:62584] Request received from client: GET / HTTP/1.1
[Tue Dec 05 05:28:15.499445 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(420):
[client 15.213.82.149:62584] Headers received from client:
[Tue Dec 05 05:28:15.499458 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(424):
[client 15.213.82.149:62584]   Host: 15.213.91.33:2345
[Tue Dec 05 05:28:15.499466 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(424):
[client 15.213.82.149:62584]   Connection: keep-alive
[Tue Dec 05 05:28:15.499474 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(424):
[client 15.213.82.149:62584]   Cache-Control: max-age=0
[Tue Dec 05 05:28:15.499482 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(424):
[client 15.213.82.149:62584]   Upgrade-Insecure-Requests: 1
[Tue Dec 05 05:28:15.499490 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(424):
[client 15.213.82.149:62584]   User-Agent: Mozilla/5.0 (Windows NT 6.1;
Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113
Safari/537.36
[Tue Dec 05 05:28:15.499499 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(424):
[client 15.213.82.149:62584]   Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
[Tue Dec 05 05:28:15.499508 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(424):
[client 15.213.82.149:62584]   Accept-Encoding: gzip, deflate
[Tue Dec 05 05:28:15.499516 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_request.c(424):
[client 15.213.82.149:62584]   Accept-Language: en-US,en;q=0.8
[Tue Dec 05 05:28:15.499690 2017] [authz_core:debug] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\aaa\mod_authz_core.c(809):
[client 15.213.82.149:62584] AH01626: authorization result of Require all
granted: granted
[Tue Dec 05 05:28:15.499703 2017] [authz_core:debug] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\aaa\mod_authz_core.c(809):
[client 15.213.82.149:62584] AH01626: authorization result of :
granted
[Tue Dec 05 05:28:15.499712 2017] [core:trace3] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\request.c(293): [client
15.213.82.149:62584] request authorized without authentication by
access_checker_ex hook: /
[Tue Dec 05 05:28:15.500234 2017] [http:trace3] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(1089):
[client 15.213.82.149:62584] Response sent with status 200, headers:
[Tue Dec 05 05:28:15.500248 2017] [http:trace5] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(1096):
[client 15.213.82.149:62584]   Date: Tue, 05 Dec 2017 05:28:15 GMT
[Tue Dec 05 05:28:15.500256 2017] [http:trace5] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(1099):
[client 15.213.82.149:62584]   Server: Apache/2.4.25 (Unix)
[Tue Dec 05 05:28:15.500267 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(918):
[client 15.213.82.149:62584]   Last-Modified: Sat, 02 Dec 2017 18:54:22 GMT
[Tue Dec 05 05:28:15.500276 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(918):
[client 15.213.82.149:62584]   ETag: \\"0-55f600364f380\\"
[Tue Dec 05 05:28:15.500284 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(918):
[client 15.213.82.149:62584]   Accept-Ranges: bytes
[Tue Dec 05 05:28:15.500293 2017] [http:trace4] [pid 150995199:tid
577157567797854212]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\modules\http\http_filters.c(918):
[client 15.213.82.149:62584]   Content-Length: 0
[Tue Dec 05 05:28:15.500300 201

Re: [users@httpd] Re: AH00052 error in apache

2017-12-04 Thread Hemant Chaudhary
t 4) started
[Mon Dec 04 03:38:27.435201 2017] [core:notice] [pid 1879048443] AH00052:
child pid 318767281 exit signal signal #31 (31)
[Mon Dec 04 03:38:27.435206 2017] [core:trace4] [pid 1879048443]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\mpm_common.c(533): mpm
child 318767281 (gen 4/slot 1) exited
[Mon Dec 04 03:38:27.435209 2017] [core:notice] [pid 1879048443] AH00052:
child pid 234881371 exit signal signal #31 (31)
[Mon Dec 04 03:38:27.435213 2017] [core:trace4] [pid 1879048443]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\mpm_common.c(533): mpm
child 234881371 (gen 4/slot 2) exited
[Mon Dec 04 03:38:27.435216 2017] [core:notice] [pid 1879048443] AH00052:
child pid 905969850 exit signal signal #31 (31)
[Mon Dec 04 03:38:27.435220 2017] [core:trace4] [pid 1879048443]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\mpm_common.c(533): mpm
child 905969850 (gen 4/slot 0) exited
[Mon Dec 04 03:38:28.436380 2017] [core:trace4] [pid 1879048443]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\mpm_common.c(533): mpm
child 251658587 (gen 4/slot 0) started
[Mon Dec 04 03:38:28.437290 2017] [core:trace4] [pid 1879048443]
C:\cygwin64\home\hemant\apache\httpd-2.4.25\server\mpm_common.c(533): mpm
child 335544497 (gen 4/slot 1) started


On Fri, Dec 1, 2017 at 12:13 AM, Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi
>
> I build apache using cross compilers of Nonstop and then running apache on
> Nonstop.
>
> Thanks
> Hemant
>
>
>
> On Dec 1, 2017 12:11 AM, "Suvendu Sekhar Mondal" 
> wrote:
>
>> Hemant,
>>
>> On Dec 1, 2017 12:02 AM, "Hemant Chaudhary" <
>> hemantdude.chaudh...@gmail.com> wrote:
>>
>> Hi
>>
>> On other platforms what is the cause for this error ?
>>
>>
>> On Dec 1, 2017 12:00 AM, "Eric Covener"  wrote:
>>
>> On Thu, Nov 30, 2017 at 1:20 PM, Hemant Chaudhary
>>  wrote:
>> > Hi All,
>> >
>> > Can you please give some light why am I getting this issue(When sending
>> > request,child dies and another child created).
>> > I checked all loaded modules are working fine and only three modules are
>> > static {core.c,http_core.c and mod_so.c}
>> >
>> > Please help so that I can check where I need to check.
>>
>> You need someone who understands the platform you're running on to
>> debug why SIGUSR2 is received.
>>
>>
>> On what OS you are running Apache? How about attaching a debugger to the
>> Apache process and wait for crash to happen? Debugger should give you the
>> back trace and sufficient information on crashing module. Also I will
>> suggest to spawn a single child during debugging to make the life easier.
>>
>> Thanks!
>> Suvendu
>>
>>


Re: [users@httpd] Re: AH00052 error in apache

2017-11-30 Thread Hemant Chaudhary
Hi

I build apache using cross compilers of Nonstop and then running apache on
Nonstop.

Thanks
Hemant



On Dec 1, 2017 12:11 AM, "Suvendu Sekhar Mondal"  wrote:

> Hemant,
>
> On Dec 1, 2017 12:02 AM, "Hemant Chaudhary"  com> wrote:
>
> Hi
>
> On other platforms what is the cause for this error ?
>
>
> On Dec 1, 2017 12:00 AM, "Eric Covener"  wrote:
>
> On Thu, Nov 30, 2017 at 1:20 PM, Hemant Chaudhary
>  wrote:
> > Hi All,
> >
> > Can you please give some light why am I getting this issue(When sending
> > request,child dies and another child created).
> > I checked all loaded modules are working fine and only three modules are
> > static {core.c,http_core.c and mod_so.c}
> >
> > Please help so that I can check where I need to check.
>
> You need someone who understands the platform you're running on to
> debug why SIGUSR2 is received.
>
>
> On what OS you are running Apache? How about attaching a debugger to the
> Apache process and wait for crash to happen? Debugger should give you the
> back trace and sufficient information on crashing module. Also I will
> suggest to spawn a single child during debugging to make the life easier.
>
> Thanks!
> Suvendu
>
>


Re: [users@httpd] Re: AH00052 error in apache

2017-11-30 Thread Hemant Chaudhary
Hi

On other platforms what is the cause for this error ?


On Dec 1, 2017 12:00 AM, "Eric Covener"  wrote:

On Thu, Nov 30, 2017 at 1:20 PM, Hemant Chaudhary
 wrote:
> Hi All,
>
> Can you please give some light why am I getting this issue(When sending
> request,child dies and another child created).
> I checked all loaded modules are working fine and only three modules are
> static {core.c,http_core.c and mod_so.c}
>
> Please help so that I can check where I need to check.

You need someone who understands the platform you're running on to
debug why SIGUSR2 is received.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


[users@httpd] Re: AH00052 error in apache

2017-11-30 Thread Hemant Chaudhary
Hi All,

Can you please give some light why am I getting this issue(When sending
request,child dies and another child created).
I checked all loaded modules are working fine and only three modules are
static {core.c,http_core.c and mod_so.c}

Please help so that I can check where I need to check.

Thanks
Hemant


On Wed, Nov 29, 2017 at 4:48 PM, Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi All,
>
> When I am starting apache, its started successfully and also listening to
> that port.
> But when I am sending request from browser to apache. It is not responding
> and giving error AH00052.
>
>
>
> [Wed Nov 29 11:14:04.956827 2017] [core:notice] [pid 2097152018:tid
> 7876215824606887940] AH00052: child pid 738197672 exit signal signal #31
> (31)
>
>
>
> What is the reason for this error ? and how to solve it.
> Attaching my configuration file.
>
> Thanks
> Hemant
>


[users@httpd] AH00052 error in apache

2017-11-29 Thread Hemant Chaudhary
Hi All,

When I am starting apache, its started successfully and also listening to
that port.
But when I am sending request from browser to apache. It is not responding
and giving error AH00052.



[Wed Nov 29 11:14:04.956827 2017] [core:notice] [pid 2097152018:tid
7876215824606887940] AH00052: child pid 738197672 exit signal signal #31
(31)



What is the reason for this error ? and how to solve it.
Attaching my configuration file.

Thanks
Hemant


httpd.conf
Description: Binary data

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

[users@httpd] Libtool lock error

2017-11-29 Thread Hemant Chaudhary
Hi

While building apache, I am getting this error:
libtool: compile: Waiting for mod_lbmethod_bytraffic.o.lock to be removed
libtool: compile: Waiting for mod_lbmethod_bytraffic.o.lock to be removed
libtool: compile: Waiting for mod_lbmethod_bytraffic.o.lock to be removed
libtool: compile: Waiting for mod_lbmethod_bytraffic.o.lock to be removed
libtool: compile: Waiting for mod_lbmethod_bytraffic.o.lock to be removed
libtool: compile: Waiting for mod_lbmethod_bytraffic.o.lock to be removed
libtool: compile: Waiting for mod_lbmethod_bytraffic.o.lock to be removed

This time I am getting error in mod_lbmethod_bytraffic.o but somethime I am
getting in other .o files also. What is the cause of this type of erro rand
how to solve it.


Thanks
HEmant


[users@httpd] Worker MPM with kill

2017-11-27 Thread Hemant Chaudhary
Hi,

I started apache server which has worker as mpm in debug mode. I killed the
process with kill -9 then it kills the process and stop debug. But when I
am using kill -term PID then it is not killing process. Whereas  kill -term
PID is woking with prefork debug.

If I want to use kill -term PID in debug mode of worker then how to do that.

Thanks
Hemant


[users@httpd] Aapche with c99 or c11

2017-11-23 Thread Hemant Chaudhary
Hi All,

I have compiled my apache with c99 and its working fine. I am planning to
use c11 compiler also.
Is there any impact will occur if I use c11 in place of c99 ?

Few more questions :
1) My apr is not supporting sendfile,random and mmap. What will be the
impact ?
2) When I am sending request from apache j-meter to my apache server then
for http is working fine with good TPS but for https, TPS is not good
because for most of the request it is taking connection time of
7000-9000ms. Is there anything am I missing in ssl configuration so that it
shouldn't connect continuously.

Thanks
Hemant


Re: [users@httpd] Apache creates Semaphore

2017-11-09 Thread Hemant Chaudhary
Hi,

Yes kill -Term works for me even without patch of code.
I have one more doubt, I checked with ipcs command that there is only entry
of semaphore and no entry in shared memory.

If I have nothing in shared memory then why am I using semaphore?
What are the critical section in apache for which it requires semaphores.

Thanks
Hemant


On Fri, Nov 3, 2017 at 5:17 PM, Yann Ylavic  wrote:

> On Fri, Nov 3, 2017 at 12:42 PM, Hemant Chaudhary
>  wrote:
> >
> > I killed as kill -9 process_id_of_httpd
>
> Well, you don't let httpd cleanup anything before exiting by doing
> this (it's simply killed immediately).
> Why kill with no arg (i.e. kill -TERM) wouldn't be enough?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Hemant Chaudhary
Hi

I build httpd by myself from source code on HPE nonstop.

On Nov 3, 2017 5:12 PM, "Yann Ylavic"  wrote:

> On Fri, Nov 3, 2017 at 7:09 AM, Hemant Chaudhary
>  wrote:
> >
> > When I am setting Mutex pthread or Mutex Pthread default in httpd.conf,
> > getting following error
> >
> > AH00526: Syntax error on line 42 of
> > /home/hemant_super/hemant/dev_11oct/conf/httpd.conf:
> > Invalid Mutex argument pthread (Mutex mechanisms are: 'none', 'default',
> > 'fcntl:/path/to/file', 'file:/path/to/file', 'sysvsem', 'sem')
>
> What system is it?
> Did you build httpd by yourself or it's from some distro?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Hemant Chaudhary
Hi

I killed as kill -9 process_id_of_httpd

On Nov 3, 2017 5:05 PM, "Yann Ylavic"  wrote:

> Hi Hemant,
>
> On Fri, Nov 3, 2017 at 12:01 PM, Hemant Chaudhary
>  wrote:
> > I tried with the patch of code you have asked for prefork.c and worker.c.
> > But If I am closing apache gracefully then semaphore is not in shared
> > location but if I am killing process then still semaphore is there in
> shared
> > location.
>
> How do you kill httpd? "kill -TERM" should work... "kill -KILL" is a
> bit, well overkill :p
>
> Regards,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Hemant Chaudhary
Hi,
I tried with the patch of code you have asked for prefork.c and worker.c.
But If I am closing apache gracefully then semaphore is not in shared
location but if I am killing process then still semaphore is there in
shared location.

Is there any way I get rid of semaphore because I want to run single
process only.

Thanks
hemant

On Fri, Nov 3, 2017 at 2:56 AM, Yann Ylavic  wrote:

> Hi Hemant,
>
> On Thu, Nov 2, 2017 at 12:08 PM, Hemant Chaudhary
>  wrote:
> >
> > For my product I need to run apache as single process. As httpd -X works
> for
> > me. But the issue is to stop httpd -X, we need to kill process. While
> > killing the process, semaphore exists in kernel directory.
>
> As Luca said, the default semaphore mechanism (i.e. if not changed by
> ./configure) used by httpd is "sysvsem", and it indeed leaks a
> descriptor when not exiting properly (or from debug mode).
>
> The easier way to use another mechanism is the Mutex directive, for
> instance:
> Mutex pthread default
> defined globally will use a mechanism which does not have this issue.
>
> If you really want to stay with "sysvsem" mechanism, the following
> patch will do it for the debug mode too:
>
> Index: server/mpm/event/event.c
> ===
> --- server/mpm/event/event.c(revision 1814101)
> +++ server/mpm/event/event.c(working copy)
> @@ -691,6 +691,7 @@ static void clean_child_exit(int code)
>
>  if (one_process) {
>  event_note_child_killed(/* slot */ 0, 0, 0);
> +atexit(apr_terminate);
>  }
>
>  exit(code);
> Index: server/mpm/prefork/prefork.c
> ===
> --- server/mpm/prefork/prefork.c(revision 1814101)
> +++ server/mpm/prefork/prefork.c(working copy)
> @@ -229,6 +229,7 @@ static void clean_child_exit(int code)
>
>  if (one_process) {
>  prefork_note_child_killed(/* slot */ 0, 0, 0);
> +atexit(apr_terminate);
>  }
>
>  ap_mpm_pod_close(my_bucket->pod);
> Index: server/mpm/worker/worker.c
> ===
> --- server/mpm/worker/worker.c  (revision 1814101)
> +++ server/mpm/worker/worker.c  (working copy)
> @@ -435,6 +435,7 @@ static void clean_child_exit(int code)
>
>  if (one_process) {
>  worker_note_child_killed(/* slot */ 0, 0, 0);
> +atexit(apr_terminate);
>  }
>
>  exit(code);
> _
>
> >
> > Therefore I commented following lines in worker.c
> >
> > if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i",
> > i),ap_proc_mutex_create(&all_buckets[i].mutex,NULL,
> AP_ACCEPT_MUTEX_TYPE,
> > id, s, pconf, 0) {
> >ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
> (startup ?
> > NULL : s),  "could not create accept mutex");
> >  return !OK;
> >
> >  After commenting above line, when I am starting httpd -X, it is giving
> > signal 31 error.
>
> This can't work, the mutex will be used later on so it will crash.
> Thus this change is incomplete, and the complete one is probably more
> complex than the changes proposed above.
>
> >
> > What should I change if I want to start apache in debug mode and not to
> > create semaphore ?
>
> I don't think suppressing this mutex (or any other process/global
> mutex which your configuration may need, soon or later...) is wise.
> You should go with avoiding the leak (as proposed above).
>
>
> Regards,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Apache creates Semaphore

2017-11-02 Thread Hemant Chaudhary
Hi Yann,

When I am setting Mutex pthread or Mutex Pthread default in httpd.conf,
getting following error

AH00526: Syntax error on line 42 of
/home/hemant_super/hemant/dev_11oct/conf/httpd.conf:
Invalid Mutex argument pthread (Mutex mechanisms are: 'none', 'default',
'fcntl:/path/to/file', 'file:/path/to/file', 'sysvsem', 'sem')

When I tried with Mutex None, it is giving below error
/home/hemant_super/hemant/dev_11oct/bin: ./httpd -V
AH00526: Syntax error on line 42 of
/home/hemant_super/hemant/dev_11oct/conf/httpd.conf:
None is not allowed for mutex type default

Any idea why am I getting this error and how to solve it.

Thanks
Hemant



On Fri, Nov 3, 2017 at 2:56 AM, Yann Ylavic  wrote:

> Hi Hemant,
>
> On Thu, Nov 2, 2017 at 12:08 PM, Hemant Chaudhary
>  wrote:
> >
> > For my product I need to run apache as single process. As httpd -X works
> for
> > me. But the issue is to stop httpd -X, we need to kill process. While
> > killing the process, semaphore exists in kernel directory.
>
> As Luca said, the default semaphore mechanism (i.e. if not changed by
> ./configure) used by httpd is "sysvsem", and it indeed leaks a
> descriptor when not exiting properly (or from debug mode).
>
> The easier way to use another mechanism is the Mutex directive, for
> instance:
> Mutex pthread default
> defined globally will use a mechanism which does not have this issue.
>
> If you really want to stay with "sysvsem" mechanism, the following
> patch will do it for the debug mode too:
>
> Index: server/mpm/event/event.c
> ===
> --- server/mpm/event/event.c(revision 1814101)
> +++ server/mpm/event/event.c(working copy)
> @@ -691,6 +691,7 @@ static void clean_child_exit(int code)
>
>  if (one_process) {
>  event_note_child_killed(/* slot */ 0, 0, 0);
> +atexit(apr_terminate);
>  }
>
>  exit(code);
> Index: server/mpm/prefork/prefork.c
> ===
> --- server/mpm/prefork/prefork.c(revision 1814101)
> +++ server/mpm/prefork/prefork.c(working copy)
> @@ -229,6 +229,7 @@ static void clean_child_exit(int code)
>
>  if (one_process) {
>  prefork_note_child_killed(/* slot */ 0, 0, 0);
> +atexit(apr_terminate);
>  }
>
>  ap_mpm_pod_close(my_bucket->pod);
> Index: server/mpm/worker/worker.c
> ===
> --- server/mpm/worker/worker.c  (revision 1814101)
> +++ server/mpm/worker/worker.c  (working copy)
> @@ -435,6 +435,7 @@ static void clean_child_exit(int code)
>
>  if (one_process) {
>  worker_note_child_killed(/* slot */ 0, 0, 0);
> +atexit(apr_terminate);
>  }
>
>  exit(code);
> _
>
> >
> > Therefore I commented following lines in worker.c
> >
> > if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i",
> > i),ap_proc_mutex_create(&all_buckets[i].mutex,NULL,
> AP_ACCEPT_MUTEX_TYPE,
> > id, s, pconf, 0) {
> >ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
> (startup ?
> > NULL : s),  "could not create accept mutex");
> >  return !OK;
> >
> >  After commenting above line, when I am starting httpd -X, it is giving
> > signal 31 error.
>
> This can't work, the mutex will be used later on so it will crash.
> Thus this change is incomplete, and the complete one is probably more
> complex than the changes proposed above.
>
> >
> > What should I change if I want to start apache in debug mode and not to
> > create semaphore ?
>
> I don't think suppressing this mutex (or any other process/global
> mutex which your configuration may need, soon or later...) is wise.
> You should go with avoiding the leak (as proposed above).
>
>
> Regards,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Apache creates Semaphore

2017-11-02 Thread Hemant Chaudhary
Hi Luca,

If I choose to go with MPM and to spawn single process then it will create
parent process and then child process where parent process monitor the
server and child process serve the request. But I need only one process
which works for both as parent and child which is achieved in httpd -X.
httpd -X creates one process which monitor apache as well as serves the
request.

Is it possible to disable mutex while configuring apache, so that it will
not create semaphores ?

Thanks
Hemant

On Thu, Nov 2, 2017 at 5:09 PM, Luca Toscano  wrote:

> Hi Hemant,
>
> as indicated in https://httpd.apache.org/docs/2.4/mod/core.html#mutex you
> can use different kind of mutex implementations and experiment with them.
> From your description though it seems to me that your approach of killing
> httpd leads to semaphore leaking, something that would be avoided with a
> graceful shutdown. I would encourage you to not use httpd -X but to
> configure your mpm to spawn one process only (note that you might need
> svn.apache.org/r1748336 or httpd >= 2.4.21).
>
> Hope that helps,
>
> Luca
>
>
> 2017-11-02 12:08 GMT+01:00 Hemant Chaudhary  com>:
>
>> Hi Yann,
>>
>> For my product I need to run apache as single process. As httpd -X works
>> for me. But the issue is to stop httpd -X, we need to kill process. While
>> killing the process, semaphore exists in kernel directory.
>> If I repeat for 10-15 times, then it will give error like no space
>> available on device.
>> To solve this error, either I need to explicitly kill each semaphore id
>> and then start. So I thought not to create semaphore itself.
>> Therefore I commented following lines in worker.c
>>
>> if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i",
>> i),ap_proc_mutex_create(&all_buckets[i].mutex,NULL,
>> AP_ACCEPT_MUTEX_TYPE,  id, s, pconf, 0) {
>>ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
>> (startup ? NULL : s),  "could not create accept mutex");
>>  return !OK;
>>
>>  After commenting above line, when I am starting httpd -X, it is giving
>> signal 31 error. When starting with httpd, its only starting parent and
>> killing child processes with signal 31 error.
>>
>> What should I change if I want to start apache in debug mode and not to
>> create semaphore ?
>>
>> Thanks
>> Hemant
>>
>>
>>
>> On Thu, Nov 2, 2017 at 4:01 PM, Yann Ylavic  wrote:
>>
>>> Hi Hemant,
>>>
>>> On Thu, Nov 2, 2017 at 5:47 AM, Hemant Chaudhary
>>>  wrote:
>>> >
>>> > Semaphore is used in multi process environment to share resources
>>> within
>>> > processes. But when I am starting apache in debug mode i:e single
>>> process
>>> > then still it creates semaphore. May I know the reason why it is
>>> creating
>>> > semaphore in debug mode also.
>>>
>>> The debug mode has no particular code optimization or walkout,
>>> precisely because we want to be able to diagnose potential bugs for
>>> the non-debug case.
>>>
>>> Regards,
>>> Yann.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>> For additional commands, e-mail: users-h...@httpd.apache.org
>>>
>>>
>>
>


Re: [users@httpd] Apache creates Semaphore

2017-11-02 Thread Hemant Chaudhary
Hi Yann,

For my product I need to run apache as single process. As httpd -X works
for me. But the issue is to stop httpd -X, we need to kill process. While
killing the process, semaphore exists in kernel directory.
If I repeat for 10-15 times, then it will give error like no space
available on device.
To solve this error, either I need to explicitly kill each semaphore id and
then start. So I thought not to create semaphore itself.
Therefore I commented following lines in worker.c

if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i",
i),ap_proc_mutex_create(&all_buckets[i].mutex,NULL, AP_ACCEPT_MUTEX_TYPE,
id, s, pconf, 0) {
   ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv, (startup
? NULL : s),  "could not create accept mutex");
 return !OK;

 After commenting above line, when I am starting httpd -X, it is giving
signal 31 error. When starting with httpd, its only starting parent and
killing child processes with signal 31 error.

What should I change if I want to start apache in debug mode and not to
create semaphore ?

Thanks
Hemant



On Thu, Nov 2, 2017 at 4:01 PM, Yann Ylavic  wrote:

> Hi Hemant,
>
> On Thu, Nov 2, 2017 at 5:47 AM, Hemant Chaudhary
>  wrote:
> >
> > Semaphore is used in multi process environment to share resources within
> > processes. But when I am starting apache in debug mode i:e single process
> > then still it creates semaphore. May I know the reason why it is creating
> > semaphore in debug mode also.
>
> The debug mode has no particular code optimization or walkout,
> precisely because we want to be able to diagnose potential bugs for
> the non-debug case.
>
> Regards,
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] Apache creates Semaphore

2017-11-01 Thread Hemant Chaudhary
Hi,

Semaphore is used in multi process environment to share resources within
processes. But when I am starting apache in debug mode i:e single process
then still it creates semaphore. May I know the reason why it is creating
semaphore in debug mode also.

Thanks
Hemant


Re: [users@httpd] Start apache with tomcat

2017-10-30 Thread Hemant Chaudhary
Hi

Actually its ajp.conf and httpd.conf.
Then what should i write in ajp.conf to work based on my workarund.
Thanks
hemant

On Oct 30, 2017 6:19 PM, "Eric Covener"  wrote:

> ProxyPass directives in ajp.txt don't make any sense, follow some
> basic examples.
>
> On Mon, Oct 30, 2017 at 2:52 AM, Hemant Chaudhary
>  wrote:
> > Hi All,
> >
> > I am attaching my server.xml, httpd.conf and ajp.conf . Please let me
> know
> > where am I going wrong.
> >
> > location of tomcat - /home/ananya/apache-tomcat
> > location of apache - /home/ananya/apache-2.4.25
> >
> > On browser I am giving "15.213.91.33:5643/manager/index.html" as
> request.
> >
> > On Thu, Oct 26, 2017 at 6:30 PM, Hemant Chaudhary
> >  wrote:
> >>
> >> My apache error log says nothing but timcat error log has this thing
> when
> >> i request to tomcat port.
> >>
> >> Oct 26, 2017 12:51:24 PM org.apache.coyote.ajp.AjpMessage processHeader
> >>
> >> SEVERE: Invalid message received with signature 18245
> >>
> >>
> >> On Oct 26, 2017 6:15 PM, "Eric Covener"  wrote:
> >>>
> >>> On Thu, Oct 26, 2017 at 8:22 AM, Hemant Chaudhary
> >>>  wrote:
> >>> > Hi,
> >>> >
> >>> > If I am using http and apache port then index.html of apache is
> >>> > displayed
> >>> > not of ajp.
> >>> >
> >>> > Do I need to change in ajp.conf and server.xml ?
> >>>
> >>> Hard to guess why your ProxyPass is not used, could be something
> >>> hidden in the full config. Have you looked at the error log?
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> >>> For additional commands, e-mail: users-h...@httpd.apache.org
> >>>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> > For additional commands, e-mail: users-h...@httpd.apache.org
>
>
>
> --
> Eric Covener
> cove...@gmail.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] Apache with Semaphore

2017-10-30 Thread Hemant Chaudhary
Hi

When I am starting apache in debug mode then it creates semaphore. In
another terminal I am giving command "httpd -k stop" to stop apache. It
stops successfully but it is not removing semaphore.

Why apache is not sending signal to remove semaphore in debug mode after
stop it.

Thanks
Hemant


Re: [users@httpd] Start apache with tomcat

2017-10-29 Thread Hemant Chaudhary
Hi All,

I am attaching my server.xml, httpd.conf and ajp.conf . Please let me know
where am I going wrong.

location of tomcat - /home/ananya/apache-tomcat
location of apache - /home/ananya/apache-2.4.25

On browser I am giving "15.213.91.33:5643/manager/index.html" as request.

On Thu, Oct 26, 2017 at 6:30 PM, Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> My apache error log says nothing but timcat error log has this thing when
> i request to tomcat port.
>
> Oct 26, 2017 12:51:24 PM org.apache.coyote.ajp.AjpMessage processHeader
>
> SEVERE: Invalid message received with signature 18245
>
> On Oct 26, 2017 6:15 PM, "Eric Covener"  wrote:
>
>> On Thu, Oct 26, 2017 at 8:22 AM, Hemant Chaudhary
>>  wrote:
>> > Hi,
>> >
>> > If I am using http and apache port then index.html of apache is
>> displayed
>> > not of ajp.
>> >
>> > Do I need to change in ajp.conf and server.xml ?
>>
>> Hard to guess why your ProxyPass is not used, could be something
>> hidden in the full config. Have you looked at the error log?
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>>
ProxyRequests Off

Require all granted



ProxyPassajp://15.213.91.33:5643/manager/




#ProxyPass   "/home/ananya/apache-tomcat-7.0.82/webapps/manager/" 
"ajp://15.213.91.33:5643/manager/"
#ProxyPassReverse   "/home/ananya/apache-tomcat-7.0.82/webapps/manager/" 
"http://15.213.91.33:5643/manager/";

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" 
# will be interpreted as '/logs/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/home/ananya/apache-2.4.25"

#
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
#
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
#
# Mutex default:logs

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the 
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
Listen 15.213.91.33:5643
#Listen 5643

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
#LoadModule authz_dbm_mod

Re: [users@httpd] Start apache with tomcat

2017-10-26 Thread Hemant Chaudhary
My apache error log says nothing but timcat error log has this thing when i
request to tomcat port.

Oct 26, 2017 12:51:24 PM org.apache.coyote.ajp.AjpMessage processHeader

SEVERE: Invalid message received with signature 18245

On Oct 26, 2017 6:15 PM, "Eric Covener"  wrote:

> On Thu, Oct 26, 2017 at 8:22 AM, Hemant Chaudhary
>  wrote:
> > Hi,
> >
> > If I am using http and apache port then index.html of apache is displayed
> > not of ajp.
> >
> > Do I need to change in ajp.conf and server.xml ?
>
> Hard to guess why your ProxyPass is not used, could be something
> hidden in the full config. Have you looked at the error log?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Start apache with tomcat

2017-10-26 Thread Hemant Chaudhary
Hi,

If I am using http and apache port then index.html of apache is displayed
not of ajp.

Do I need to change in ajp.conf and server.xml ?

On Oct 26, 2017 5:37 PM, "Eric Covener"  wrote:

> > From browser I am sending request  ajp://15.213.91.33:5644, but getting
> "this page is not working".
>
> Your browser wouldn't use ajp, it would use http.  It would also use
> the HTTP servers port, not tomcats.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Start apache with tomcat

2017-10-26 Thread Hemant Chaudhary
Hi

Few questions regarding your setup.
What is the Listen or port of your apache server ? Is it 8009 ?
Tomcat and apache should start in same or different port ?

After comment in server.xml, do we need to add anything there ?

What url should I use to access tomcat from browser ?

In my setup, I am starting tomcat at 5644 and apache at 5643 port.
and in ajp.conf using 5644(tomacat) port and using same port (5644) to
access from browser.

Thanks
Hemant


On Thu, Oct 26, 2017 at 1:41 PM, kohmoto  wrote:

> Hi,
>
> This is may way with httpd and tomcat.
>
> Step 1.
> The following phrase is comment out  from server.xml.
> 
>
> Step 2
> The followings are activated in httpd.conf
>
> LoadModule proxy_module lib/httpd/modules/mod_proxy.so
> LoadModule proxy_ajp_module lib/httpd/modules/mod_proxy_ajp.so
>
> Step 3
> The following statement is added in httpd.conf
>
> Include /etc/httpd/conf/extra/httpd-proxy.conf
>
> Step 4
> The location of httpd-proxy.conf is httpd/conf/extra/httpd-proxy.conf
>
> The following lines are written in httpd-proxy.conf for test.
>
> 
> ProxyPass ajp://localhost:8009/examples/
> 
>
> 
> ProxyPass ajp://localhost:8009/manager/
> 
>
>
> Step 5
> Start httpd and tomcat.
>
> Thank you.
>
> Yours truly,
> Kazuhiko Kohmoto
>
>
>
> On 2017/10/26 15:24, Hemant Chaudhary wrote:
>
> Hi All,
>
> I am using tomcat-7.0.82 and httpd-2.4.25.
>
>
> Thanks
> Hemant
>
>
>


[users@httpd] Start apache with tomcat

2017-10-25 Thread Hemant Chaudhary
Hi All,

I am using tomcat-7.0.82 and httpd-2.4.25.

Following are my configuration :

in server.xml

 

  



in httpd.conf

Listen 5643

Loaded mod_proxy_ajp and mod_proxy

Include /home/ananya/apache-2.4.25/other/ajp.conf


in ajp.conf

ProxyRequests Off



   Require all granted



ProxyPass   / ajp://15.213.91.33:5644/

ProxyPassReverse / ajp://15.213.91.33:5644/



I started both tomcat and apache server. Apache is listening on port 5643
and tomcat on 5644.


>From browser I am sending request  ajp://15.213.91.33:5644, but getting
"this page is not working".


I checked in catalina.log ,

Oct 26, 2017 12:51:24 PM org.apache.coyote.ajp.AjpMessage processHeader

SEVERE: Invalid message received with signature 18245


Where am I going wrong ?
how to send request from browser.
Apache location is = /home/ananya/apache-2.4.25/conf
Tomcat location is = /home/ananya/apache-tomcat-7.0.82/conf


Thanks
Hemant


[users@httpd] log in socket.c in APR

2017-10-22 Thread Hemant Chaudhary
Hi All,

I want to add log statement in apr to check some function in apr. When I am
adding ap_log_perror in socket.c in apr, it is giving error..

Is there nay way to print logs of apr. please help.

Thanks
Hemant


[users@httpd] apr_socket_accept error

2017-10-11 Thread Hemant Chaudhary
Hi,

When I am starting my apache-2.4.25, I am getting following error.

[Wed Oct 11 13:05:23.521575 2017] [core:error] [pid 1744830478]
(4104)Socket operation on non-socket: AH02179: apr_socket_accept: (client
socket)

What are the reasons for this error.
Help will be apreciated.

Thanks
Hemant


[users@httpd] How to stop apache from debugging

2017-09-14 Thread Hemant Chaudhary
Hi,

I started debugging with "./httpd -X" command. It starts debugging. Now I
want to stop debugging and start the server normally.

Which command should I use to stop debugging ?

HC


Re: AW: [users@httpd] Run apache without master [wd-vc]

2017-09-13 Thread Hemant Chaudhary
As i have seen in my system that master process also binds to port that i
have given in my configuration. Then how master process is binding to port
80 ? If i am running my apache other than root user then how can master
binds to port 80 ?

If i am running apache as root user then on any port my apache is working
but other than root user, i need to give port greater than 1024.

Thanks
Hemant

On Sep 13, 2017 5:56 PM, "Bremser, Kurt (Allianz Technology GmbH)" <
kurt.brem...@allianz.at> wrote:

> Spawning children servers one very important purpose: while the master has
> to be run as root to bind to the privileged port 80, the child is spawned
> as the user named in the configuration, reducing security issues by orders
> of magnitude.
> Changing that and running the whole server process (inlcuding spawned cgi
> scripts etc) as root would be extremely stupid, IMO.
>
> Kurt Bremser
> Allianz Technology GmbH
>
> Newton was wrong. There is no gravity. The Earth sucks.
> ____
> Von: Hemant Chaudhary [hemantdude.chaudh...@gmail.com]
> Gesendet: Mittwoch, 13. September 2017 14:03
> An: users@httpd.apache.org
> Betreff: Re: [users@httpd] Run apache without master [wd-vc]
>
> Yes true. I want to start only one process and it should not spawn child
> processes.
> In apache, we have master process and then it spawns child. After that
> child serves requests by client.
> My aim is to start master process and it should not spawn child as well as
> it should serve requests from client.
>
> Thanks
> Hemant
>
> On Wed, Sep 13, 2017 at 5:18 PM, Bremser, Kurt (Allianz Technology GmbH) <
> kurt.brem...@allianz.at<mailto:kurt.brem...@allianz.at>> wrote:
> In most cases, you can only have ONE process binding to ONE
> IP-address/port combination. Children of this process will then inherit the
> socket, which is the way how apache works.
>
> On Linux and BSD, there is the SO_REUSEPORT option that can be set by a
> listening process, so that other processes can also bind to the socket, and
> let the OS handle which incoming data ends up where.
> If you think about that, it opens the port up for hijacking, as the
> initial listener process has no idea which other processes might also bind
> to the port and intercept traffic.
>
> So the apache method of one master process binding to the port and
> spawning children is the prudent one.
>
> Kurt Bremser
> Allianz Technology GmbH
>
> Newton was wrong. There is no gravity. The Earth sucks.
> 
> Von: Hemant Chaudhary [hemantdude.chaudh...@gmail.com<mailto:hemantdude.
> chaudh...@gmail.com>]
> Gesendet: Mittwoch, 13. September 2017 13:29
> An: users@httpd.apache.org<mailto:users@httpd.apache.org>
> Betreff: Re: [users@httpd] Run apache without master [wd-vc]
>
> Hi
>
> I want to create different processes not forking from parent or anywhere.
> It is still okay if parent process is started and parent process will not
> fork child processes but parent should serve requests.
>
> On Sep 13, 2017 4:47 PM, "Eric Covener" mailto:cove
> n...@gmail.com><mailto:cove...@gmail.com<mailto:cove...@gmail.com>>> wrote:
> On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
> mailto:hemantdude.chaudh...@gmail.com
> ><mailto:hemantdude.chaudh...@gmail.com<mailto:hemantdude.chaudhary@
> gmail.com>>> wrote:
> > Hi,
> >
> > I want to start my apache without master process means when I will give
> > "httpd" command, it should start 5 worker process which has access to
> > httpd.conf as well as serve requests.
> >
> > Is it possible to achieve this ? If yes, then how should to achieve this
> ?
>
> Not really. Why not just ignore the parent process? The worst thing
> that can happen is that it doesn't manage the children, which you're
> already losing in this hypothetical setup.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org<mailto:users-
> unsubscr...@httpd.apache.org><mailto:users-unsubscr...@httpd.apache.org
> <mailto:users-unsubscr...@httpd.apache.org>>
> For additional commands, e-mail: users-h...@httpd.apache.org users-h...@httpd.apache.org><mailto:users-h...@httpd.apache.org users-h...@httpd.apache.org>>
>
>
> Allianz Technology GmbH
> 1130 Wien, Hietzinger Kai 101-105
> FN 365014k, Handelsgericht Wien
> UID: ATU 66614737
>
> http://www.allianz.at
>
> 
> Dieses E-Mail und allfaellig daran angeschlossene Anhaenge
> enthalten Informationen, die vertraul

Re: [users@httpd] Run apache without master [wd-vc]

2017-09-13 Thread Hemant Chaudhary
Yes true. I want to start only one process and it should not spawn child
processes.
In apache, we have master process and then it spawns child. After that
child serves requests by client.
My aim is to start master process and it should not spawn child as well as
it should serve requests from client.

Thanks
Hemant

On Wed, Sep 13, 2017 at 5:18 PM, Bremser, Kurt (Allianz Technology GmbH) <
kurt.brem...@allianz.at> wrote:

> In most cases, you can only have ONE process binding to ONE
> IP-address/port combination. Children of this process will then inherit the
> socket, which is the way how apache works.
>
> On Linux and BSD, there is the SO_REUSEPORT option that can be set by a
> listening process, so that other processes can also bind to the socket, and
> let the OS handle which incoming data ends up where.
> If you think about that, it opens the port up for hijacking, as the
> initial listener process has no idea which other processes might also bind
> to the port and intercept traffic.
>
> So the apache method of one master process binding to the port and
> spawning children is the prudent one.
>
> Kurt Bremser
> Allianz Technology GmbH
>
> Newton was wrong. There is no gravity. The Earth sucks.
> ____
> Von: Hemant Chaudhary [hemantdude.chaudh...@gmail.com]
> Gesendet: Mittwoch, 13. September 2017 13:29
> An: users@httpd.apache.org
> Betreff: Re: [users@httpd] Run apache without master [wd-vc]
>
> Hi
>
> I want to create different processes not forking from parent or anywhere.
> It is still okay if parent process is started and parent process will not
> fork child processes but parent should serve requests.
>
> On Sep 13, 2017 4:47 PM, "Eric Covener" mailto:cove
> n...@gmail.com>> wrote:
> On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
> mailto:hemantdude.chaudh...@gmail.com>>
> wrote:
> > Hi,
> >
> > I want to start my apache without master process means when I will give
> > "httpd" command, it should start 5 worker process which has access to
> > httpd.conf as well as serve requests.
> >
> > Is it possible to achieve this ? If yes, then how should to achieve this
> ?
>
> Not really. Why not just ignore the parent process? The worst thing
> that can happen is that it doesn't manage the children, which you're
> already losing in this hypothetical setup.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org<mailto:users-
> unsubscr...@httpd.apache.org>
> For additional commands, e-mail: users-h...@httpd.apache.org users-h...@httpd.apache.org>
>
>
> Allianz Technology GmbH
> 1130 Wien, Hietzinger Kai 101-105
> FN 365014k, Handelsgericht Wien
> UID: ATU 66614737
>
> http://www.allianz.at
>
> 
> Dieses E-Mail und allfaellig daran angeschlossene Anhaenge
> enthalten Informationen, die vertraulich und
> ausschliesslich fuer den (die) bezeichneten Adressaten
> bestimmt sind.
> Wenn Sie nicht der genannte Adressat sind, darf dieses
> E-Mail samt allfaelliger Anhaenge von Ihnen weder anderen
> Personen zugaenglich gemacht noch in anderer Weise
> verwertet werden.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, bitten
> wir Sie, dieses E-Mail und saemtliche angeschlossene
> Anhaenge zu loeschen.
>
> Please note: This email and any files transmitted with it is
> intended only for the named recipients and may contain
> confidential and/or privileged information. If you are not the
> intended recipient, please do not read, copy, use or disclose
> the contents of this communication to others and notify the
> sender immediately. Then please delete the email and any
> copies of it. Thank you.
>
> 
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Run apache without master

2017-09-13 Thread Hemant Chaudhary
Hi

I want to create different processes not forking from parent or anywhere.
It is still okay if parent process is started and parent process will not
fork child processes but parent should serve requests.

On Sep 13, 2017 4:47 PM, "Eric Covener"  wrote:

> On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
>  wrote:
> > Hi,
> >
> > I want to start my apache without master process means when I will give
> > "httpd" command, it should start 5 worker process which has access to
> > httpd.conf as well as serve requests.
> >
> > Is it possible to achieve this ? If yes, then how should to achieve this
> ?
>
> Not really. Why not just ignore the parent process? The worst thing
> that can happen is that it doesn't manage the children, which you're
> already losing in this hypothetical setup.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] Run apache without master

2017-09-13 Thread Hemant Chaudhary
Hi,

I want to start my apache without master process means when I will give
"httpd" command, it should start 5 worker process which has access to
httpd.conf as well as serve requests.

Is it possible to achieve this ? If yes, then how should to achieve this ?

Thanks
hemant


[users@httpd] Waiting for mod_dav.o.lock to be removed

2017-09-08 Thread Hemant Chaudhary
HI

I am getting "libtool:Waiting for mod_dav.o.lock to be removed" error while
make apache.

Any help will be appreciated.

Thanks
Hemant


[users@httpd] Which file creates master process

2017-09-06 Thread Hemant Chaudhary
Hi

I have apache-2.4.25 on my ststem. When we start server, initially master
process starts and give access to mpm. I want to know which ".c" file is
used to create master process before worker.c.


Thanks
Hemant


[users@httpd] Build apache without mpm

2017-08-30 Thread Hemant Chaudhary
Hi

By which configuration I can build apache without threaded> I dont want to
sue mpm.

Thanks
Hemant


Re: [users@httpd] MPM_Worker main process

2017-08-30 Thread Hemant Chaudhary
Hi Luca,

Thanks for reply.
Actually I want to use apache web server for some transaction where I can't
afford any type of failure. That's why I was trying If by mistake someone
killed or something happen to my parent process then still apache can
handle requests and serve. Thats why I have query that if parent process is
not there then what are the functionalities will I lost ?



Regards
Hemant

On Wed, Aug 30, 2017 at 12:43 PM, Luca Toscano 
wrote:

> Hi Hemant,
>
> 2017-08-30 8:26 GMT+02:00 Hemant Chaudhary  >:
>
>> Hi folks,
>>
>> I have my apache-2.4.25 with worker mpm. For testing, I have killed the
>> master/main process and send simultaneous requests from apache j-meter and
>> my apache serves all the requests. What I have observed is that  even with
>> loads number of  worker threads are same, it means I lost  forking
>> capability because of main process.
>>
>> My query is without Master process, what functionalities will I loose?
>>
>
> afaik anything that requires the master process (graceful reload, restart,
> spawn of new processes due to MaxRequestPerChild reached, etc..) will not
> work anymore. I'd strongly suggest not to play with the master process or
> attempt to get rid of it for some reason, but I am not sure what is the
> goal of your test :)
>
> Luca
>
>


[users@httpd] MPM_Worker main process

2017-08-29 Thread Hemant Chaudhary
Hi folks,

I have my apache-2.4.25 with worker mpm. For testing, I have killed the
master/main process and send simultaneous requests from apache j-meter and
my apache serves all the requests. What I have observed is that  even with
loads number of  worker threads are same, it means I lost  forking
capability because of main process.

My query is without Master process, what functionalities will I loose?


Thanks
Hemant


[users@httpd] User Auth type in apache-2.4.25

2017-08-20 Thread Hemant Chaudhary
Hi ,

I have user and group in my httpd.config. I want to use user in Auth type
instead of basic or digest. so that whenever customer try to open
directory, promt will ask to enter username and password and customer can
enter "user" as username and password.

Is there any option to achieve this or I need to write my own module for
this.


Cheers,
Hemant


[users@httpd] Use MPM other than worker,event and prefork

2017-08-17 Thread Hemant Chaudhary
Hi folks,

I have installed apache-2.4.25 with worker module. But I want my apache to
start with my own module instead of worker module. In httpd.config, I have
commented LoadModule worker.so, but when I am staring apache, it is looking
for worker module.

Where I need to change code so that it will not look for worker module and
start with my module.

Thanks
Hemant


Re: [users@httpd] How to use binary to run httpd in different location

2017-08-03 Thread Hemant Chaudhary
Yes ./httpd -f location of config files works for me.

Thanks


On Thu, Aug 3, 2017 at 10:29 AM, William A Rowe Jr 
wrote:

> On Wed, Aug 2, 2017 at 6:24 AM, Eric Covener  wrote:
> > On Wed, Aug 2, 2017 at 5:21 AM, Hemant Chaudhary
> >  wrote:
> >> Hi
> >>
> >> I have ported apache on my machine. I have copied bin,lib.conf,modules,
> >> htdocs,logs to another location. Now I want to run my apache in new
> location
> >> with these things only.
> >> I changed path in httpd.conig and apachectl of new location, but while
> >> starting it is starting apache in old location.
> >>
> >> For example :
> >> I ported apache on /home/hemant ..
> >> I copied bin,conf,logs,htdocs,modules to /home/rakesh and in
> httpd.config I
> >> replace all path of /home/hemant to /home/rakesh and changed port also.
> But
> >> when I am starting apache, it is only starting at /home/hemant.
> >
> > pass -d  /home/rakesh/... to apachectl?
>
> That would be the best case. It might also be necessary to flip the
> LD_LIBRARY_PATH to point to the {httpd-dir}/lib directory so that all
> of the linked libraries are loaded correctly.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] How to use binary to run httpd in different location

2017-08-02 Thread Hemant Chaudhary
Hi

I have ported apache on my machine. I have copied bin,lib.conf,modules,
htdocs,logs to another location. Now I want to run my apache in new
location with these things only.
I changed path in httpd.conig and apachectl of new location, but while
starting it is starting apache in old location.

For example :
I ported apache on /home/hemant ..
I copied bin,conf,logs,htdocs,modules to /home/rakesh and in httpd.config I
replace all path of /home/hemant to /home/rakesh and changed port also. But
when I am starting apache, it is only starting at /home/hemant.

Without again configure,make and make install can I use it another location
?

Thanks
Hemant


[users@httpd] Re: Mod_http2 as static

2017-07-19 Thread Hemant Chaudhary
Hi

It is not creating .so for mod_lua also. Only creating mod_lua.a and
mod_http2.a . But for other modules like mod_authn_file.so is create,
mod_mpm_worker.so etc.

Thanks
Hemant

On Thu, Jul 20, 2017 at 12:11 PM, Hemant Chaudhary <
hemantdude.chaudh...@gmail.com> wrote:

> Hi all
>
> I want to load mod_http2 in my apache-2.4.25. I have installed nghttp2
> also.
> But my all others modules are shared i:e .so but my mod_http2 is creating
> only static i:e .a
>
> In my configure I have given --enable-mods-shared=all and
> --with-nghttp2=/path/of/ngttp2
>
> I tried with --enable-http2., also creating only static not dynamic.
>
> Please help to create .so of http2.
>
> Thanks
> Hemant
>


  1   2   >