Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Help with web sharing (bus error on httpd startup)

Help with web sharing (bus error on httpd startup)
Thread Tools
Nai no Kami
Senior User
Join Date: Aug 2000
Location: Buenos Aires
Status: Offline
Reply With Quote
Aug 27, 2001, 11:51 AM
 
The problem is: Web sharing does not start up. I searched this forums and I found the commands to enable, restart, etc the server from the terminal. When I type

apachectl start

I get an error telling me that

/usr/sbin/apachectl start: httpd could not be started

When I try to so a httpd start I get a Bus error

Does anyone know what's going on? Can anyone help me on this?

Please don't hesitate to email me if you want to try a troubleshooting guess.
Thank you very very much!

[ 08-27-2001: Message edited by: Nai no Kami ]

Y no entienden nada... ¡y cómo se divierten!...
     
<theolein at work>
Guest
Status:
Reply With Quote
Aug 27, 2001, 12:57 PM
 
I have excatly the same problem after installing the web sharing update: Bus error on httpd start. This is from the httpd demon itself which means it's not a config error. Sh't. Does apple include the sources for apache when making packages. i.e. Can we re
-compile this ourselves?
     
Nai no Kami  (op)
Senior User
Join Date: Aug 2000
Location: Buenos Aires
Status: Offline
Reply With Quote
Aug 27, 2001, 01:50 PM
 
Good to know I am not alone (bad also, because there is another that is having trouble)...

I have been using websharing a lot, but this problem came all of a sudden.
I have recalled that there is a version of Apache No. 1.3.20 (ours is 1.3.19) and there are instructions on how to complile at http://www.stepwise.com
My only concern is that I have not installed the Developer Tools on my iBook (little HD space left) and I cannot compile. If there is somebody kind enough to post a compiled version....

Nevertheless, I tried to remove the Web Sharinf package out of the Receipts folder and firing up the SW Update Panel. Downloaded and installed. No success.

I will try to download the 10.0.4 update and try a reinstall to see if it works. I really need my server back (my only way to share my Mac at work).

Thanks for answering. If I happen to solve the problem I'll drop you a line.

Y no entienden nada... ¡y cómo se divierten!...
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Aug 29, 2001, 05:28 AM
 
Hi, I found this at macfixit: http://www.macfixitforums.com/php/sh...&Number=215586

Maybe it will help.
weird wabbit
     
Nai no Kami  (op)
Senior User
Join Date: Aug 2000
Location: Buenos Aires
Status: Offline
Reply With Quote
Aug 29, 2001, 05:42 PM
 
Thanks a lot for the link!.
After reading the forum threads I discovered that my terminal prompt changed from "localhost" to "ibook" and that would be the cause for crippling my Apache.
That change came all of a sudden (or, at least, I didn't do it on purpose). Moreover, after using the terminal to inspect the /etc/ directory, I found that I had a hostconfig and a hostconfig~ file. Is this normal?.
I tried to vi them and I found that on both the hostname is AUTOMATIC.
There is also a very subtle difference on both files (but I cannot remember which). Anyhow, if having both files is abnormal, I will post their content here.

Thanks to everyone for their help!

Y no entienden nada... ¡y cómo se divierten!...
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Aug 29, 2001, 11:21 PM
 
I had a pretty similar problem... after installing the Web Sharing update I couldn't boot into OS X any more (Web Sharing was on at that time), the progress bar stopped where Apache gets started and I found no other way than renaming the httpd.conf file.
Then, after renaming it back, Apache could not be launched in the Preferences panel, but after trying around a bit and doing a "/usr/sbin/httpd -t" it sems to work fine... without changing anything in my httpd.conf or doing something with hostnames.
I still have to see if it boots, but I'm fulfilled with hope

Oh and Apple... wasn't it that the name stood for quality once ... and for shiny plastic now?

-
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Aug 30, 2001, 04:41 PM
 
I still have to see if it boots, but I'm fulfilled with hope
[/QB]
Oh, I was very wrong, after rebooting it didn't work any more.

I recommend: never install an Apple update before you've heard it actually causes no problems since there seems to be no quality control any more.
Using their #@%$*! web-upgrade you can't see any more which components are "upgraded" and what is left, so there's not much of a chance to track it down (and I'm sick of downgrading and looking for bugfixes btw).

-
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Aug 30, 2001, 08:03 PM
 
Originally posted by Nai no Kami:
<STRONG>Thanks a lot for the link!.
After reading the forum threads I discovered that my terminal prompt changed from "localhost" to "ibook" and that would be the cause for crippling my Apache.
That change came all of a sudden (or, at least, I didn't do it on purpose). Moreover, after using the terminal to inspect the /etc/ directory, I found that I had a hostconfig and a hostconfig~ file. Is this normal?.
I tried to vi them and I found that on both the hostname is AUTOMATIC.
There is also a very subtle difference on both files (but I cannot remember which). Anyhow, if having both files is abnormal, I will post their content here.

Thanks to everyone for their help!</STRONG>
Hi
The name change you mentioned happens to me as well. I get it after booting from OS9(hostname lemac) and then rebooting from OSX(dhcp-xxxxxxx). I suggest you change your hostconfig file's automatic entry to localhost and set your servername to localhost in httpd.conf and make sure the entry in hosts next to 127.0.0.1 is localhost. This should at least get apache up and running again. And as for the hostconfig~ file you can delete it. It is a temp file generated by a text editor when you edit hostconfig.

Apple needs to test these thing though. This gave me a scare, although I can usually fix things in unix systems. I had hoped that apple would better document their upgrades and at least test them out on a few systems.
weird wabbit
     
z0mbi3
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Lisbon, Portugal
Status: Offline
Reply With Quote
Aug 31, 2001, 06:25 AM
 
Nai no Kami (and the "Bus Error" people):

Wel, basically, to me experience, when there is a "Bus error" *USUALLY* there is a file that is not being opened correctly (you may not have permissions to read it, or the file may not even exist). This happens usually when you mode directories around, or install stuff on different directories than the default ones.

Nai no Kami (and the people that changed their hostname):
Well, my problem was that I changed my hostname and apache wouldn't start because of it...as a former unix geek I went and edited /etc/hosts, but I late found out that the hosts file doesn't work as expected here on OSX. So I hat to go to the dreaded NetInfo proggie and do things with that confusing GUI (it kind looks like microsoft's RegEdit).
well, I went to the (I'll call them directories) /machines and realized that there were 3 entries (-DHCP-, broadcasthost, localhost), so I selected localhost and duplicated it.
Then select the 'localhost copy' one and select the name property and double click on it's value. Write your new hostaname (for what I saw you called it ibook, mine is beowulf). ok, now save all changes, and update the copy (it will ask you if you want to do it). now you should have it working as intended...
at least that is what I did in my computer (TiBook G4 400) for it to start working... and it works flawlessly.
my next step will be to understand the inermind of the NetInfo package

Just a quick edit after reading that last comment from theolein...editing Apache's configfile (the ServerName key) doesn't work when you get multiple users and each user has a homepage, because then when you use http://macosx.host.com/~user the server will tell the browser that his name is really 127.0.0.1 and the browser will go looking for http://127.0.0.1/~user and probably it will not find it (VERY probably !!). The same goes for changing it to localhost. The best solution would be the hosts file editing but it isn't working very well (darned NetInfo Manager).

[ 08-31-2001: Message edited by: z0mbi3 ]
z0mbi3@TiBook 400 (w/384 MB RAM)

"One good thing about music, when it hits you you feel no pain" - Brad Nowell (Sublime) (Bob Marley's Cover - Trenchtown Rock)
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Aug 31, 2001, 11:38 AM
 
Hi z0mbi3:
You are probably right about having to edit netinfo. I must admit that I have no idea how netinfo actually works(internally I mean). The answer I gave will be ok for local dev work which is ok for me, but not for serving pages over the net. My problem would be that I have a cable modem and the IP is not static. That means that My domain name would change every time I booted. There are probably ways around this such as writing a perl script to change the values in httpd.conf before apache started up. But I am still left with the puzzle as to what netinfo exactly does and how. I must get up to speed with netinfo as it is the main part of osx that is radically different to other unix systems.
weird wabbit
     
z0mbi3
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Lisbon, Portugal
Status: Offline
Reply With Quote
Aug 31, 2001, 11:06 PM
 
theolein:

follow my instructions on the previous post and it *WILL* work...with ANY IP.
just don't edit the ServerName entry on httpd.conf
if you find the instructions confusing mail me ([email protected]) and I'll be glad to help you out with detailed (step-by-step) instructions...

no need to make a perl script

as for the NEtInfo manager...my exams will start in 2 weeks, and I *HAVE* to study...btw, any Computation Theory expert around here ?
z0mbi3@TiBook 400 (w/384 MB RAM)

"One good thing about music, when it hits you you feel no pain" - Brad Nowell (Sublime) (Bob Marley's Cover - Trenchtown Rock)
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 1, 2001, 12:18 AM
 
Hm, that would not solve my problem, since my hostname didn't change. For some funny reason I can start apache only from the terminal but not in the preference panel or on boot time any more. Grrrrr.

-
     
z0mbi3
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Lisbon, Portugal
Status: Offline
Reply With Quote
Sep 1, 2001, 09:26 AM
 
moonray: when you start it in the terminal what does the apachectl start command say ?
if you mail me with the answer I can try to help you...
btw, try launching apache in the terminal, then stop it (apachectl stop) and then try to launch it again using the panel....
and see if it works...
z0mbi3@TiBook 400 (w/384 MB RAM)

"One good thing about music, when it hits you you feel no pain" - Brad Nowell (Sublime) (Bob Marley's Cover - Trenchtown Rock)
     
<Nai no Kami not logged>
Guest
Status:
Reply With Quote
Sep 1, 2001, 12:50 PM
 
this is like "cosa 'e Mandinga" My little brother had a problem with Dead End 3D (a nifty puzzle game) and I had to force restart my Mac (Cmd+Ctrl+Power). After that, my hostname in the terminal changed magically to localhost again (?). I could start the webserver from the Preference Pane, but as I am at home now, I was unable to test if it's working fine. I will bring news here on monday, where I can test the results of this sudden change.

BTW, thanks to all for the support you gave to all the users in this thread.
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 2, 2001, 04:43 AM
 
z0mbi3, thanks for your offer, but I don't want to bother you with email, and here it might help others too...

I can launch if from the terminal, the only remarkable line it gives to me is "[alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName", don't know whether it did that before. When I stop it then I can indeed start it in the panel without problems.

-
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Sep 3, 2001, 02:14 AM
 
Moonray: If you go to the link above you will find some answers to your problem. They also, like zombie, suggest changing your netinfo,hostconfig and servername.
weird wabbit
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 3, 2001, 06:00 AM
 
Edit: The following was written under the impression it would work for more than three times. It didn't.. everything is like before.


Originally posted by theolein:
<STRONG>Moonray: If you go to the link above you will find some answers to your problem. They also, like zombie, suggest changing your netinfo,hostconfig and servername.</STRONG>
Thank you, does work now, after a few tries and a couple reboots (and time).

"All" I needed to do was to change "HOSTNAME=-AUTOMATIC-" to "HOSTNAME=localhost" in /etc/hostconfig *and* add a "ServerName localhost" line in /etc/httpd/httpd.conf

It seems, that the automatic-mechanism is broken or does not kick in at the right time during start-up, cause I could start apache manually from the terminal with the old configuration after booting. I hope there will be a fix soon cause it doesn't make much sense to edit 3 files (plus the NetInfo Manager entry) to change that name.

Edit: I was halfways happy for a few hours now it's like before. I dislike Apple upgrades.

-

[ 09-03-2001: Message edited by: Moonray ]
     
Nai no Kami  (op)
Senior User
Join Date: Aug 2000
Location: Buenos Aires
Status: Offline
Reply With Quote
Sep 3, 2001, 10:57 AM
 
Well, another monday at work. Bad news :-(
Although after a force restart my terminal name changed back to localhost (I never changed it, but all of a sudden It started to read ibook) I was not able to fire up the web server (I shows it boots fine on the system preferences, but I cannot connect to my mac).
As for a start in the terminal, it reads:

fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl start: httpd could not be started

I tried to start it up as root and I got that it was already running. A top showed this as a result:

444 top 13.7% 0:01.45 1 18 14 196K 224K 420K 1.31M
437 tcsh 0.0% 0:00.25 1 31 14 268K 472K 716K 5.57M
428 tcsh 0.0% 0:00.24 1 17 14 280K 472K 724K 5.57M
427 Terminal 0.0% 0:04.87 4 79 61 1.47M 6.62M 4.75M 36.4M
425 httpd 0.0% 0:00.00 1 10 159 56K 1.07M 252K 2.98M
424 httpd 0.0% 0:00.01 1 10 159 64K 1.07M 252K 2.98M
423 httpd 0.0% 0:00.01 1 10 159 68K 1.07M 256K 2.98M
422 httpd 0.0% 0:00.01 1 10 159 68K 1.07M 256K 2.98M
421 httpd 0.0% 0:00.03 1 10 159 68K 1.07M 256K 2.98M
420 httpd 0.0% 0:00.01 1 10 159 124K 1.07M 560K 2.98M
419 httpd 0.0% 0:00.31 1 10 159 32K 1.07M 992K 2.98M
415 .OmniWeb 34.8% 10:25.18 36 191 458 19.0M 15.3M 28.2M 70.1M
394 writeconfi 0.0% 0:01.29 1 28 18 400K 228K 1.23M 1.69M
387 lookupd 0.0% 0:01.27 2 36 23 348K 384K 804K 2.38M
380 netinfod 0.0% 0:00.71 1 17 15 164K 296K 428K 1.59M

I killed all the running httpd processes and started apachectl as root. Nothing. I stopped the process exited root and started again (now from the preferences). Nothing again. I really don't know what to do. I really would like to install the new 1.3.20 version, but I don't have the dev tools installed (and don't have disk space to install them).
If some unix guru could help me with this... (any unix I know I learned by ear).


Thanks a lot.

Y no entienden nada... ¡y cómo se divierten!...
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
Sep 3, 2001, 11:33 AM
 
Well, it sounds like whatever user the httpd server is running as isn't able to access the error log file. When you run it as root, it has superuser privs, so it can read and write any file, including the one in question. The simplest solution to this is to do the following in the terminal as root:

chmod 777 /private/var/log/httpd/error_log

I'm assuming the file already exists (I don't think you'd get an error message if it didn't). There's a small possibility that this could open some arcane and as-yet-unknown security hole, but chances of this are pretty slim.

Alternately, you could do what I do. I create a user/group for just for the web server (usually "web" with a group of "httpd"). Then I install Apache and all its support files in it's own directory (I use /usr/local/web - check the Apache Install docs for info). Then I do "chown -R web:httpd /usr/local/web/*". Whenever I do updates, I log in as the web user and this keeps everything secure and happy.

Hope this helps.
     
Nai no Kami  (op)
Senior User
Join Date: Aug 2000
Location: Buenos Aires
Status: Offline
Reply With Quote
Sep 3, 2001, 03:52 PM
 
This is one of the wackiest things I have ever seen. After doing some input into my terminal I discovered that I had not enough privileges to open my own conf files (agus.conf). I copied it to the desktop, made a Get Info (Cmd+I) and played around with the "Privileges" feature. Then I replaced it with the original. (I thought that doing so should have no effect, but I decided to try it anyway). After that, I can start (and verify it works) the web server from the system preferences, but I cannot start it from the Terminal. I really don't understand what is going on, but the facts are the facts.

Please someone enlighten me.

Thanks.

Y no entienden nada... ¡y cómo se divierten!...
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 4, 2001, 05:24 AM
 
I'll start over and try again, almost nothing changed:

Apache won't start for me after I installed the web sharing update... when I boot into OS X the progress bar stops when apache is started. My workaround is to rename /etc/httpd/httpd.conf to something else. If I rename it back later apache starts fine wheter I use the control panel or terminal (apachectrl start).

I changed "HOSTNAME=-AUTOMATIC-" to "HOSTNAME=localhost" in /etc/hostconfig, added a "ServerName localhost" line in /etc/httpd/httpd.conf, checked /etc/hosts for the line "127.0.0.1 localhost" and made sure there is a localhost entry under machines in the Netinfo Manager. Then just to eliminate possible problems I allowed everyone to read and write /var/log/httpd/error_log and /var/log/httpd/access_log.

It still does not work and hangs everytime I boot. Does anyone know what could be wrong?

-
     
Nai no Kami  (op)
Senior User
Join Date: Aug 2000
Location: Buenos Aires
Status: Offline
Reply With Quote
Sep 4, 2001, 05:08 PM
 
DAMN!!!! IT HAS HAPPENED AGAIN...
For a reason I really don't know the Terminal changed from 'localhost' to 'ibook' without a reason I can figure out. I realized that when I tried to enable my webserver and I found that the sharing pane had an excessive delay at opening. When I checked the IP address of the pane it read: 169.254.129.*** and the network pane reads 10.20.24.***. I really don't understand why my terminal prompt changes suddenly!. I will force restart my machine to see if it gets solved as it previously did.
If I was confused, I am now totally disoriented, plus my quota of anger, which is totally logic.
Does somebody know what may be going on here? Or I should better drop this forums and hire an exorcist, or an Aleister Crowley's deacon?

&lt;- just katharsis

Y no entienden nada... ¡y cómo se divierten!...
     
Nai no Kami  (op)
Senior User
Join Date: Aug 2000
Location: Buenos Aires
Status: Offline
Reply With Quote
Sep 4, 2001, 05:35 PM
 
I hate to admit it, but brute force did the trick. I forced my iBook to restart with the paperclip button and now my terminal prompt reads localhost again and Apache is usable now.

I hill head in the Aleister Crowley direction.

Y no entienden nada... ¡y cómo se divierten!...
     
Nai no Kami  (op)
Senior User
Join Date: Aug 2000
Location: Buenos Aires
Status: Offline
Reply With Quote
Sep 4, 2001, 05:41 PM
 
I hate to admit it, but brute force did the trick. I forced my iBook to restart with the paperclip button and now my terminal prompt reads localhost again and Apache is usable now.

I hill head in the Aleister Crowley direction.

Y no entienden nada... ¡y cómo se divierten!...
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Sep 4, 2001, 06:37 PM
 
Nai no kami, moonray: Starting apache from thr prefs panel does not start apachectl directly. If you search your machine you'll find a directory with the apache startupitems . There is a shell script in there which accesses hostconfig and runs rc.common before starting apache with apachectl. Since I changed the hostconfig line to localhost and added servername localhost to my machine, apache has been running fine. I don't want to serve files to the web though, because this will not wrok for that as far as I can tell.(Just tested it, it does work if I enter the IP)

What I did was to check that every thing is set to local host(hostconfig, httpd.conf, hosts,and netinfo).

I think this problem is not with Apache itself but rather with the thing that returns the hostname (i.e. resolver) The hostname is set pretty early on startup, and the fact that on so many people's coputer's a different hostname is returned at different times is possibly indicative of the problems apache has trying to resolve it's hostname. Any of you unix Guru's got an idea?
weird wabbit
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:25 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,