1

I am doing all this from the root account.

I have followed this guide: https://www.digitalocean.com/community/articles/how-to-install-rails-apache-and-mysql-on-ubuntu-with-passenger

I have tried mounting extra swap space since server only has 512MB of RAM (half shared, half "mine").

I have installed the software the passenger installation guide was depending on.

When I run passenger-install-apache2-module and rvmsudo passenger-install-nginx-module I get all green during the checks and then the last thing that happens before it always stalls for a long time and then kicks me out of the ssh session:

mkdir -p buildout/common/libpassenger_common/ApplicationPool2
g++ -Iext -Iext/common -Iext/libev -Wno-ambiguous-member-template -D_REENTRANT -I/usr/local/include -DHAS_TR1_UNORDERED_MAP -DHAVE_ACCEPT4 -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -o buildout/common/libpassenger_common/ApplicationPool2/Implementation.o -c ext/common/ApplicationPool2/Implementation.cpp
Write failed: Broken pipe

I am pulling hair but it doesn't help much. There doesn't seem to be any trace of this problem using my google-fu so I'm guessing I FUBAR'd the server at an earlier point. But I have really only tried to install rails so there's not a lot of other things on it.

I have ruby on RVM, if that matters.

Any ideas?

edit: ps xfawww output:

  PID TTY      STAT   TIME COMMAND
    2 ?        S      0:00 [kthreadd]
    3 ?        S      0:01  \_ [ksoftirqd/0]
    4 ?        S      0:00  \_ [kworker/0:0]
    5 ?        S      0:00  \_ [kworker/u:0]
    6 ?        S      0:00  \_ [migration/0]
    7 ?        S      0:02  \_ [watchdog/0]
    8 ?        S      0:00  \_ [migration/1]
    9 ?        S      0:00  \_ [kworker/1:0]
   10 ?        S      0:01  \_ [ksoftirqd/1]
   11 ?        S      0:01  \_ [watchdog/1]
   12 ?        S      0:00  \_ [migration/2]
   13 ?        S      0:00  \_ [kworker/2:0]
   14 ?        S      0:01  \_ [ksoftirqd/2]
   15 ?        S      0:01  \_ [watchdog/2]
   16 ?        S      0:00  \_ [migration/3]
   17 ?        S      0:00  \_ [kworker/3:0]
   18 ?        S      0:01  \_ [ksoftirqd/3]
   19 ?        S      0:01  \_ [watchdog/3]
   20 ?        S<     0:00  \_ [cpuset]
   21 ?        S<     0:00  \_ [khelper]
   22 ?        S      0:00  \_ [kdevtmpfs]
   23 ?        S<     0:00  \_ [netns]
   24 ?        S      0:00  \_ [kworker/u:1]
   25 ?        S      0:00  \_ [xenwatch]
   26 ?        S      0:00  \_ [xenbus]
   27 ?        S      0:03  \_ [sync_supers]
   28 ?        S      0:00  \_ [bdi-default]
   29 ?        S<     0:00  \_ [kintegrityd]
   30 ?        S<     0:00  \_ [kblockd]
   31 ?        S      0:07  \_ [kworker/2:1]
   32 ?        S<     0:00  \_ [ata_sff]
   33 ?        S      0:00  \_ [khubd]
   34 ?        S<     0:00  \_ [md]
   36 ?        S      0:00  \_ [khungtaskd]
   37 ?        D      0:12  \_ [kswapd0]
   38 ?        SN     0:00  \_ [ksmd]
   39 ?        S      0:00  \_ [fsnotify_mark]
   40 ?        S      0:00  \_ [ecryptfs-kthrea]
   41 ?        S<     0:00  \_ [crypto]
   49 ?        S<     0:00  \_ [kthrotld]
   50 ?        S      0:00  \_ [khvcd]
   51 ?        S      0:07  \_ [kworker/1:1]
   70 ?        S<     0:00  \_ [devfreq_wq]
   94 ?        S      0:07  \_ [kworker/0:1]
  163 ?        S      0:07  \_ [kworker/3:1]
  204 ?        S      0:01  \_ [kjournald]
  612 ?        S      0:02  \_ [flush-202:1]
    1 ?        Ss     0:00 /sbin/init
  273 ?        S      0:00 upstart-udev-bridge --daemon
  287 ?        Ss     0:00 /sbin/udevd --daemon
  376 ?        S      0:00  \_ /sbin/udevd --daemon
  389 ?        S      0:00  \_ /sbin/udevd --daemon
  394 ?        Ss     0:00 /usr/sbin/sshd -D
16303 ?        Ss     0:00  \_ sshd: root@pts/0    
16320 pts/0    Ss     0:00  |   \_ -bash
16580 pts/0    Sl+    0:00  |       \_ /usr/local/rvm/gems/ruby-2.0.0-p247/bin/passenger-install-apache2-module                                                                 
16702 pts/0    Sl+    0:00  |           \_ /usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/rake                                                                                                   
17120 pts/0    S+     0:00  |               \_ g++ -Iext -Iext/common -Iext/libev -Wno-ambiguous-member-template -D_REENTRANT -I/usr/local/include -DHAS_TR1_UNORDERED_MAP -DHAVE_ACCEPT4 -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -o buildout/common/libpassenger_common/ApplicationPool2/Implementation.o -c ext/common/ApplicationPool2/Implementation.cpp
17121 pts/0    D+     0:05  |                   \_ /usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus -quiet -I ext -I ext/common -I ext/libev -I /usr/local/include -imultilib . -imultiarch x86_64-linux-gnu -D_GNU_SOURCE -D _REENTRANT -D HAS_TR1_UNORDERED_MAP -D HAVE_ACCEPT4 -D HAS_ALLOCA_H -D HAS_SFENCE -D HAS_LFENCE -D PASSENGER_DEBUG -D BOOST_DISABLE_ASSERTS -D VISIBILITY_ATTRIBUTE_SUPPORTED ext/common/ApplicationPool2/Implementation.cpp -quiet -dumpbase Implementation.cpp -mtune=generic -march=x86-64 -auxbase-strip buildout/common/libpassenger_common/ApplicationPool2/Implementation.o -ggdb -Wno-ambiguous-member-template -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-attributes -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -fstack-protector -o /tmp/ccYZpm8l.s
16967 ?        Ss     0:00  \_ sshd: root@pts/1    
16986 pts/1    Ss     0:00      \_ -bash
17128 pts/1    R+     0:00          \_ ps xfawww
  429 ?        S      0:00 upstart-socket-bridge --daemon
  441 ?        Ss     0:00 dbus-daemon --system --fork --activation=upstart
  466 ?        Sl     0:35 rsyslogd -c5
  517 tty4     Ss+    0:00 /sbin/getty -8 38400 tty4
  521 tty5     Ss+    0:00 /sbin/getty -8 38400 tty5
  529 tty2     Ss+    0:00 /sbin/getty -8 38400 tty2
  530 tty3     Ss+    0:00 /sbin/getty -8 38400 tty3
  532 tty6     Ss+    0:00 /sbin/getty -8 38400 tty6
  534 ?        Ss     0:00 acpid -c /etc/acpi/events -s /var/run/acpid.socket
  540 ?        Ss     0:00 cron
  541 ?        Ss     0:00 atd
  550 ?        S      0:22 /usr/bin/daemon --pidfile /var/run/pagekite.pid.wrapper --noconfig --unsafe --respawn --delay=60 --name=pagekite -- /usr/bin/pagekite --pidfile /var/run/pagekite.pid --clean --runas=daemon:daemon --logfile=/var/log/pagekite/pagekite.log --optdir=/etc/pagekite.d --noloop
  585 hvc0     Ss+    0:00 /sbin/getty -8 38400 hvc0
  587 tty1     Ss+    0:00 /sbin/getty -8 38400 tty1
GioMac
  • 4,544
  • 4
  • 27
  • 41
Phil
  • 183
  • 11
  • Something like `strace` output is the ultimate way to track down what's actually going on inside of this, but let's stick with something simpler for now. Log on another time in a separate terminal and share with us the output of `ps xfawww` while the other terminal appears "stuck"; this will show us what command(s) are being run that are taking so long to complete. Alternatively (or additionally), if `passenger-install-apache2-module` is a shell script, try `bash -x passenger-install-apache2-module`. – BMDan Sep 05 '13 at 15:41
  • 2
    Have you tried using tmux or GNU screen and running passenger-install-apache2-module inside of that? Are there any out of memory errors reported in /var/log/syslog? – sciurus Sep 05 '13 at 16:13
  • @BMDan, when I run bash -x pass.... it breaks with syntax errors. I have updated the question with the ps xfawww output – Phil Sep 08 '13 at 14:48
  • so it seems that the nginx module is not compiling either, which leads me to believe there is either a giant conspiracy working aginst me, or something wrong with the compiler (which would be much worse) – Phil Sep 08 '13 at 18:43
  • Can you compile a simple "hello world" C++ program? – Mark Wagner Sep 08 '13 at 19:49
  • Yeah, a lot of the files before Implementation.cpp are compiled fine. – Phil Sep 08 '13 at 20:13
  • Try editing the `rake` invocation in the `passenger-install-apache2-module` script to add the `-v` flag, which should give you a bit more output. Alternately, grab the `g++` line from `ps` and run that by hand in the appropriate directory. What do you get? – BMDan Sep 17 '13 at 04:12

2 Answers2

0

I upgraded the server from 512MB RAM to 1024MB and everything worked.

Phil
  • 183
  • 11
  • If you know the reason this didn't work on a 512MB machine and know how to fix it, please answer. I would like to be able to go through this process on the cheaper machine, and would also like to not waste the bounty. – Phil Sep 09 '13 at 17:05
0

You should add a swap area like in this tutorial https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04

But you should use 1024 instead of 256K

Extazystas
  • 101
  • 1
  • 1
    Welcome to Serverfault! The downside to answering with a link like that is that if the link ever goes away, your answer becomes useless. It would be nice if you could include the actual information in your answer, not just the link. Also, I don't quite see how this would solve the compilation problem - could you clarify why adding/increasing a swap area will fix things? – Jenny D Jun 15 '14 at 14:16