![]() |
|
|||||||
| OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
Apache webserver won't start when i do
Code:
/usr/sbin/apachectl start
|
|
||||
|
Question #1: What is the value of httpd_flags on this system?
Hint: to obtain the answer, issue the following command. Note that this command will check the results in both rc.conf and rc.conf.local, if you use the latter. Question #2: Is Apache already running? Hint: to obtain the answer, issue the following command. No response means that Apache is not running. Processes listed means that Apache is already running.
__________________
OpenBSD LiveCDs/LiveDVDs |
|
|||
|
$ grep httpd_flags /etc/rc.conf*
it returns httpd_flags=NO but then i change it to flags="" and put the line to rc.conf.local and i restart the machine. The service loaded from sendmail until httpd and stops there for long time. I think it cannot start so i Ctrl+ C to cancel it. Do I need to install apache package from the web? Because i thought apache is included in the default setup. |
|
||||
|
OpenBSD includes a secured Apache 1.3, with additional features such as integrated SSL/TLS and DSO.
As you have discovered, this is normally started via rc(8) and configured in rc.conf.local(5). It is described in httpd(8) and discussed in FAQ 10.16. It appears that this built-in httpd is not working on your system. It appears to hang, rather than start. There are no bug reports with this symptom, so I begin to suspect your configuration. Question 3: Have you ever changed, added, or removed any files in /var/www? Question 4: I'd like to know all about your OS, and your hardware configuration. Rather than ask you eight different questions, and have you try to answer them, please just post your dmesg.
__________________
OpenBSD LiveCDs/LiveDVDs |
|
|||
|
I never touch /var/www before. Here's my dmesg
Code:
# dmesg
OpenBSD 4.4 (GENERIC) #1021: Tue Aug 12 17:16:55 MDT 2008
deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Genuine Intel(R) CPU T2050 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,SSE3
real mem = 267939840 (255MB)
avail mem = 250646528 (239MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 04/10/07, BIOS32 rev. 0 @ 0xfd880, SMBIOS rev. 2.31 @ 0xe0010 (45 entries)
bios0: vendor Phoenix Technologies LTD version "6.00" date 04/10/2007
bios0: VMware, Inc. VMware Virtual Platform
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xfd880/0x780
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/176 (9 entries)
pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #2 is the last bus
bios0: ROM list: 0xc0000/0x8000 0xc8000/0x1000 0xdc000/0x4000! 0xe0000/0x4000!
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x01
pci1 at ppb0 bus 1
piixpcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <VMware Virtual IDE Hard Drive>
wd0: 64-sector PIO, LBA, 10240MB, 20971520 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <PHILIPS, CDRW/DVD SCB5265, TX11> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x08: SMBus disabled
vga1 at pci0 dev 15 function 0 "VMware Virtual SVGA II" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
drm at vga1 unsupported
bha3 at pci0 dev 16 function 0 "BusLogic MultiMaster" rev 0x01: irq 11, BusLogic 9xxC SCSI
bha3: model BT-958, firmware 5.07B
bha3: sync, parity
scsibus1 at bha3: 8 targets, initiator 7
ppb1 at pci0 dev 17 function 0 "VMware Virtual PCI-PCI" rev 0x02
pci2 at ppb1 bus 2
vic0 at pci2 dev 0 function 0 "AMD 79c970 PCnet-PCI" rev 0x10: irq 9, address 00:0c:29:60:42:54
eap0 at pci2 dev 1 function 0 "Ensoniq AudioPCI97" rev 0x02: irq 10
ac97: codec id 0x43525913 (Cirrus Logic CS4297A rev 3)
audio0 at eap0
midi0 at eap0: <AudioPCI MIDI UART>
isa0 at piixpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi1 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask e965 netmask eb65 ttymask fbff
mtrr: Pentium Pro MTRR support
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
#
|
|
|||
|
Besides that, I need run My SQL on my system too.
|
|
||||
|
Thank you. I now know:
Hint: to answer this, see the output of: Since this appears to be an httpd process hang, and not an OS hang, perhaps you can gather more diagnostic information: Run top(1) from another console while httpd is started and inoperative. Filter for httpd, and examine any httpd processes shown. Is one or more CPU bound? If not, what is/are the process(es) waiting for?Diagnostics may be obtained from tools like gdb(1), systrace(1), and ktrace(1), but you do not appear to have the applicable skills or knowledge required to deploy them. We are left with empirical examination using tools like top, systat(1), and vmstat(1). Please don't hijack your own thread, bsdnewbie. If you need assistance with MySQL:
__________________
OpenBSD LiveCDs/LiveDVDs Last edited by jggimi; 1st April 2009 at 01:26 PM. Reason: two typos |
|
|||
|
Agree,Carpetsmoker.
|
|
|||
|
I have downloaded the patch for httpd but i have problem patching it when i do
Code:
# patch -p0 < 004_httpd.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Apply by doing: | cd /usr/src | patch -p0 < 004_httpd.patch | |And then rebuild and install httpd and its modules: | cd usr.sbin/httpd | make -f Makefile.bsd-wrapper obj | make -f Makefile.bsd-wrapper cleandir | make -f Makefile.bsd-wrapper depend | make -f Makefile.bsd-wrapper | make -f Makefile.bsd-wrapper install | |If httpd had been started, you might want to run | apachectl stop |before running "make install", and | apachectl start |afterwards. | |Index: usr.sbin/httpd/src/ap/ap_hook.c |=================================================================== |RCS file: /cvs/src/usr.sbin/httpd/src/ap/ap_hook.c,v |retrieving revision 1.6 |retrieving revision 1.6.14.1 |diff -u -p -r1.6 -r1.6.14.1 |--- usr.sbin/httpd/src/ap/ap_hook.c 15 Jun 2005 00:00:09 -0000 1.6 |+++ usr.sbin/httpd/src/ap/ap_hook.c 6 Nov 2008 10:06:50 -0000 1.6.14.1 -------------------------- File to patch: 1. Maybe u think it is stupid quetion but i really don't know what is the File to patch? I have been google it and search in the openbsd faq and i found that there is a number of people don't know about this too besides I didn't found any answer for that.. 2. For the File to patch, i tried to put in the httpd.patch file and it failed. So i guess there should be a file in the /usr/src directory but nothing is there.. jggimi, Here is my swap space and I have set the RAM for OpenBSD virtual machine to 516RAM. Code:
# swapctl -lk Device 1K-blocks Used Avail Capacity Priority swap_device 313267 0 313267 0% 0 |
|
|||
|
Quote:
http://www.openbsd.org/faq/faq5.html#BldGetSrc I'm starting to think this is some elaborate April 1st joke, nobody here is aware of the state of your system.. clearly you like tweaking/changing and testing things without first understanding the repercussions of doing so, you appear to have sufficient amounts of swap and RAM for a typical home server. Possible problems? defective ram... configuration error... general user error we cannot remotely diagnose. Sorry for the harshness, but.. it had to be said. |
|
|||
|
I know about cvs in updating the source tree. But I can also update using patches and the faq really didn't mention about the "File to patch:". It does confuse a totally new BSD guy like me.
|
|
|||
|
If you read a little further on the page I linked to, you would have noticed that you can obtain the source from a local mirror..
The source is not installed into /usr/src by default, but it is distributed on both release CD-ROM's and the FTP/HTTP mirrors.. in your case... src.tar.gz is what you're looking for. Also, that errata patch is only relevant on 64-bit architectures... as mentioned clearly on the 4.4 errata page. Quote:
|
|
|||
|
Quote:
Last edited by ocicat; 2nd April 2009 at 07:09 AM. |
|
||||
|
Quote:
Quote:
usr.sbin/httpd/src/ap/ap_hook.cThese files exist in the source code, which you must manually obtain and place in /usr/src, per FAQ 5. Stupid question? No. But it is a question which highlights what appears to be a continual intentional ignorance. It appears to be a complete indifference or unwillingness to learn, to me. If so, I don't think this OS is a good one for you, as it requires a willingness to learn ... unless you have the willingness to hire professional adminstrative services instead.
__________________
OpenBSD LiveCDs/LiveDVDs |
|
|||
|
Now i managed to apply the patch. But my httpd still hangs.
|
|
||||
|
Above, I said:
Quote:
Quote:
__________________
OpenBSD LiveCDs/LiveDVDs Last edited by jggimi; 2nd April 2009 at 12:54 PM. |
|
|||
|
I run top as i # /usr/sbin/apachectl start
Code:
PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND 31997 keongpo 2 0 16M 23M sleep select 0:51 5.13% Xorg 26300 keongpo 2 0 4676K 16M sleep poll 0:02 2.98% gnome-termin 21824 keongpo 2 0 26M 52M sleep poll 0:30 0.88% firefox-bin 20119 keongpo 2 0 2648K 5928K sleep select 0:09 0.00% fluxbox 8135 keongpo 2 0 4440K 16M sleep poll 0:05 0.00% gnome-termin 17827 _pflogd 4 0 460K 296K sleep bpf 0:02 0.00% pflogd 5040 root 2 0 1072K 1456K sleep select 0:00 0.00% sendmail 28044 keongpo 2 0 1232K 3336K sleep poll 0:00 0.00% bonobo-activ 29284 keongpo 2 0 1288K 3240K sleep poll 0:00 0.00% gconfd-2 17282 keongpo 18 0 476K 412K idle pause 0:00 0.00% sh 15686 _syslogd 2 0 436K 660K sleep poll 0:00 0.00% syslogd 20343 root 2 0 1156K 1840K sleep poll 0:00 0.00% httpd 13122 keongpo 18 0 488K 400K idle pause 0:00 0.00% sh 29958 root 28 0 420K 1284K onproc - 0:00 0.00% top 29593 root 2 0 680K 768K sleep select 0:00 0.00% cron 4441 keongpo 2 0 368K 1064K idle netio 0:00 0.00% gnome-pty-h Code:
# apachectl status
Not Found
The requested URL /server-status was not found on this server.
Code:
PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND 29766 www 2 0 1344K 2188K sleep select 0:00 0.00% httpd Last edited by bsdnewbie999; 2nd April 2009 at 01:50 PM. Reason: add on |
|
|||
|
It's normal.When there is someone connecting,it'll fork a child process to take the socket.
|
|
||||
|
Usually, httpd runs as a pool of processes. It does not appear that the application has gotten that far, but you cannot be sure unless you follow my recommendation. I'll highlight it, once more, because you've missed it twice now.
Quote:
Should you bother to read httpd(8), you will see that there are a few things you could try that would be easier than posting here. Example: -X. Does it produce any console output? If there is an error, it might show here. Example: -T/-t. Do both produce confirmation of a valid httpd.conf file? Example; -V/-v. Do both produce valid output? All this time, httpd just might have been reporting problems in /var/www/logs. It is possible that the reason for the hang is in /var/www/logs/error_log.
__________________
OpenBSD LiveCDs/LiveDVDs |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP 5.2.6 and Apache 1.3 | dialeight | OpenBSD Packages and Ports | 1 | 15th June 2009 03:04 AM |
| Upgrade Apache 1.3 mod_ssl to Apache 2.2 | beandip | FreeBSD Ports and Packages | 11 | 26th March 2009 08:12 PM |
| 30 years of star wars tech | TerryP | Off-Topic | 0 | 27th December 2008 05:35 AM |
| Sun Java System Web Server - Active Server Pages (yes ASP) | hopla | FreeBSD General | 0 | 26th September 2008 08:22 AM |
| Few questions about server(openSSH, apache ,) | latorion | FreeBSD General | 10 | 11th August 2008 06:59 PM |