View previous topic :: View next topic |
Author |
Message |
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Sun Sep 23, 2012 9:23 pm Post subject: Apache on Raspberry Pi |
|
|
Team,
I'm trying yo get Apache2 to run on Raspberry Pi. As I write, its building without ssl as I found some posts suggesting that this could be a problem.
[ebuild R ] www-servers/apache-2.2.22-r1 USE="suexec threads -debug -doc -ldap (-selinux) -ssl* -static" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -proxy_scgi -reqtimeout -substitute -version" APACHE2_MPMS="-event -itk -peruser -prefork -worker" 0 kB
The only pages that are actually served are autoindex pages. Have a look at http://62.3.120.142/~roy to see for yourself.
Even the page fails.
The log is full of Code: | [Sun Sep 23 21:45:35 2012] [notice] child pid 10057 exit signal Segmentation fault (11) | which looks like a very bad thing.
The filesystems are mostly mounted over nfs
Code: | Pi_Net # df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 17740116 10574360 6264588 63% /
192.168.10.30:/var/armv6j/ 17740116 10574360 6264588 63% /
tmpfs 110308 224 110084 1% /run
cgroup_root 10240 0 10240 0% /sys/fs/cgroup
udev 10240 0 10240 0% /dev
shm 110308 0 110308 0% /dev/shm
/dev/mmcblk0p3 29515348 8950984 19065052 32% /home
192.168.10.30:/usr/portage 17740160 10574336 6264704 63% /usr/portage |
/home is on a 32G SDHC Class 4 card
lockfiles are in /run, not /var/run, since /var is not on a local drive.
Its a ~arm install, built with a mix of crossdev on an AMD64, cross distcc and native compiles.
Google suggets building for gdb ... which makes my eyes glaze over. Before I go that route, is there anything obvious I'm missing?
Edit - removing ssl didn't change anything _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Mon Sep 24, 2012 3:26 am Post subject: |
|
|
Are you using the kernel bcmrpi_cutdown_defconfig? It enables CONFIG_EXPERT, which makes some things optional that apache requires for proper functioning. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Mon Sep 24, 2012 7:06 am Post subject: |
|
|
chithanh,
That may well be it. I've been putting off building my own kernel, I'm still using 3.1.9+ #110.
Kernel build time tonight. I'll post back with an update. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Mon Sep 24, 2012 10:42 pm Post subject: |
|
|
chithanh,
I cloned 3.2.27 from git.
It detects everything but never mounts root. It waits for a very long time even with rootwait removed from cmdline.txt
Theres no panic ... I must be doing something daft.
root is on a usb disk - its detected and the partitions are shown.
As its USB, I use ext2. The kernel has ext4 and used ext4 for ext2/3 built in. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Fri Sep 28, 2012 12:01 am Post subject: |
|
|
The 3.2.27's bcmrpi_cutdown_defconfig should directly give you a booting config. Are you running up-to-date firmware? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Fri Sep 28, 2012 8:03 pm Post subject: |
|
|
chithanh,
I have updated the firmware, made a booting 3.2.17 kernel from bcmrpi_cutdown_defconfig, used that as the basis of my own kernel with all of the Expert Menu options on and I still get segfaults on anything except an auto index page. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Sat Sep 29, 2012 1:42 am Post subject: |
|
|
I suggest that you disable CONFIG_EXPERT altogether.
Is apache the only program that segfaults? Can you get a backtrace? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Sat Sep 29, 2012 2:13 pm Post subject: |
|
|
chithanh,
I was being lazy with Expert as its forced on by something.
Its only Apache that segfaults - then only when serving something other then an auto index page.
I can get a backtrace but I was hoping to avoid it as it will be a first for me.
According to Google I will need to rebuild Apache to do it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Sun Oct 14, 2012 5:47 pm Post subject: |
|
|
My original install, with all the issues was a mix of cross compiled, native build and pump mode cross distcc built packages.
Having wimped out of learning to get a stack trace for the first time on something as complex as Apache, I rebuilt everything with pump mode cross distcc.
The only thing that would not build was Apache as it kept having linker problems with apr_crypto_<anything>
I traced that to a missing nss USE flag. I'm not sure if thats a bug or not.
Apache now says http://192.168.100.33 wrote: | It works! | as it should.
I might have got there faster had I not been tempted by gcc-4.7.2 turning up in my cross environment. I should have known better ... too many variables.
Adding USE=nss and reverting to gcc-4.6.3 all round made it work. It makes me wonder how Apache ever built to give me segfaults in the first place.
Now to move all the pieces back to root over NFS _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8723 Location: ~Brussels - Belgique
|
Posted: Wed May 15, 2013 10:58 am Post subject: |
|
|
Hello,
It seems nss is needed, at least for dev-libs/apr-util.
I had crashes on a ~x86 configuration, and after added nss support in apr-utils, Apache-2.4 worked.
I opened a bug asking to enforce that dependancy _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
brutto n00b
Joined: 13 Jul 2013 Posts: 1
|
Posted: Sat Jul 13, 2013 1:07 pm Post subject: |
|
|
chithanh wrote: | Are you using the kernel bcmrpi_cutdown_defconfig? It enables CONFIG_EXPERT, which makes some things optional that apache requires for proper functioning. |
How can I check this information, please?
My apache is failing with segmentation faults too
As far as I know, which is very little, getting an apache backtrace is no easy matter.
Perhaps I should go for another webserver? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Sat Jul 13, 2013 4:08 pm Post subject: |
|
|
brutto,
Welcome to Gentoo.
If you need to ask about that, its not your problem but to test
zgrep /proc/config.gz CONFIG_EXPERT will tell the setting of that symbol. I get Code: | roy@Pi_Net ~ $ zgrep CONFIG_EXPERT /proc/config.gz
CONFIG_EXPERT=y |
Its not a problem by itself as its a control to enable you to set other options as you wish.
With the distributed kernel, apache works fine.
I did get apache to work but I have yet to build a working kernel.
You can see Kernel- Seeds on Apache on Gentoo on Pi at http://62.3.120.142/~seeds
It might be a bit slow now as your post reminded me to update the Pi.
I can host my Pi /usr/portage/packages if you want some binaries to play with. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|