Sponsored Content
Full Discussion: Error when starting apache
Operating Systems HP-UX Error when starting apache Post 302980895 by bakunin on Sunday 4th of September 2016 04:43:24 PM
Old 09-04-2016
I am by no means an HP-UX expert, so please take my explanations cum grano salis.

First: stopping/starting/monitoring the apache process: On all systems i used Apache on (various Linuxes, AIX, Solaris) Apache was started and stopped by the apachectl command. I would be astonished if this is not the case on HP-UX.

Also, the processes are usually not named "apache" but "httpd". Might it be possible that you haven't stopped the (real) Apache-processes at all and this is why all the sockets are in use?

Quote:
Originally Posted by anaigini45
Killing the processes from the lsof output seems easy.
However, how do I remove/kill all the "CLOSE_WAIT" and "ESTABLISHED" status of port 80 from the netstat output? (Since there is so many listed).

Is killing the process the option in the first place?
A process uses a socket to create a connection. Once this connection is up and running, it appears in the netstat-list in the status "ESTABLISHED". When this connection is decomissioned again, it goes into the status "fin_wait" (actually there are FIN_WAIT_1 and FIN_WAIT_2 because this is a 4-way handshake process) and the socket is freed up after a certain time. This time can be configured (usually in units of half-seconds) in some kernel-tuning parameter. I don't know how to do that in HP-UX but with this information you should find it by searching the documentation.

CLOSE_WAIT is similar to FIN_WAIT in that the connection is in the process of closing. It means that the local host has received a termination request and has already acknowledged it. If you want to know more details about TCP/IP i suggest W. Richard Stevens excellent book "TCP/IP Illustrated" (3 volumes) - what is not in there isn't worth knowing.

After this little theory excursion: you can kill the processes, but do it by sending SIGTERM (kill -15) instead of the all-too-common SIGKILL (kill -9)! The difference is that SIGTERM tells a process to end, so it can clean up what it has allocated (that includes closing open connections hence freeing the sockets). SIGKILL will kill the process immediately and all this cleanup work will not be done at all.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

starting Apache on Solaris 8

I am not by any means a UNIX guru if you can't already tell by the question I'm about to ask. How do I launch Apache web server on my SOlaris 8 server without rebooting it? Any help would be much appreciated!!! -Thanks (5 Replies)
Discussion started by: jskillet
5 Replies

2. UNIX for Dummies Questions & Answers

Starting Apache

I successfully installed Apache, but When I tried to start it I experienced problems. After installing and compiling, I typed the PREFIX "usr/local/ apache/bin/apachect1 start." The output was path not found. After checking the apachect1 file using vi, I found the file empty. There was no... (4 Replies)
Discussion started by: cstovall
4 Replies

3. Programming

starting with APR (Apache Portable Runtime)

Hi I am new to APR and I started programming using APR 1.2.2. So please guide me how to start learning it? (0 Replies)
Discussion started by: sumsin
0 Replies

4. Shell Programming and Scripting

Docbase starting Error

Hi All, I am trying to start the docbase but i am getting the following error-: $ ./dm_start_ncsglorbiprd00 interpreter "/bin/sh" not found file link resolves to "/usr/bin/sh" sh: ./dm_start_ncsglorbiprd00: not found. Can anyone please help me in this regard. Thanks in advance ... (0 Replies)
Discussion started by: Divyac
0 Replies

5. Solaris

Problems starting apache 1.3 with mysql

I've been working on a project to replace one of the my group's primary NIS servers. It also runs mysql and apache, as it is the host for the our team's hardware tracking database and website. Its running apache 1.3, and for some odd reason, I can't get apache to start on system boot. The... (1 Reply)
Discussion started by: godspunk32
1 Replies

6. UNIX for Dummies Questions & Answers

Error about SSLProtocol when starting Apache

I just installed Apache 2.2.6 & when trying to start it i got this: Invalid command 'SSLProtocol', perhaps misspelled or defined by a module not included in the server configuration Any help? (3 Replies)
Discussion started by: moe2266
3 Replies

7. Web Development

Problems starting Apache 2.0.54

Hi, I just installed Apache 2.0.54 and when I try and start httpd I get mohit@mohit-desktop:/sw/pkg/apache/bin$ ./httpd -k start httpd: Could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName (13): make_sock: could not bind to address :80 no listening... (1 Reply)
Discussion started by: mojoman
1 Replies

8. UNIX for Advanced & Expert Users

Starting an Apache Server

Sir, I have installed an Apache server in Fedora 9 (packages) and when i go to etc folder and try the command httpd -k start it says command not found....can any one help me out!!! ---------- Post updated at 12:02 PM ---------- Previous update was at 11:46 AM ---------- When i... (4 Replies)
Discussion started by: bssandeshbs
4 Replies

9. Red Hat

Error while starting Apache after compiling PHP and Curl

Hello, I am facing an issue while starting the apache server after compiling php and curl. Below are the versions i am using. php-5.2.17 httpd-2.2.17 curl-7.16.0 CentOS5.5x64 Compiling above packages without curl working very fine but when trying to compile php with curl below error is... (1 Reply)
Discussion started by: sunnysthakur
1 Replies

10. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies
started(7)						 Miscellaneous Information Manual						started(7)

NAME
started - event signalling that a job is running SYNOPSIS
started JOB=JOB INSTANCE=INSTANCE [ENV]... DESCRIPTION
The started event is generated by the Upstart init(8) daemon when an instance of a job has finished starting and is now running. The JOB environment variable contains the job name, and the INSTANCE environment variable contains the instance name which will be empty for sin- gle-instance jobs. init(8) emits this event as an informational signal, services and tasks started or stopped by this event will do so in parallel with other activity. It is typically combined with the stopping(7) event by services declaring a dependency. Job configuration files may use the export stanza to export environment variables from their own environment into the started event. See init(5) for more details. EXAMPLE
A service that wishes to depend on another service might use: start on started apache stop on stopping apache A task that must be run after another task or service has been started might use: start on started postgresql SEE ALSO
starting(7) stopping(7) stopped(7) init(5) Upstart 2009-07-09 started(7)
All times are GMT -4. The time now is 04:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy