autossh fails with exit status 1 and no error message - ssh

I'm trying to run autossh (on a VM running CentOS6), but it's exiting immediately with the help message. I think this is a system issue because when I run it with the exact same parameters on another computer (running Ubuntu 14.04) it works fine. It's also fine when I run the same command but with ssh instead of autossh. So I tried strace to see if anything's wrong there. But if there is I'm not sure what it is. Any ideas?
Here's the autossh command: autossh -oStrictHostKeyChecking=no -oServerAliveInterval=15 -oServerAliveCountMax=4 -L 3130:localhost:3130 -N -i /path/to/some.pem user#remotehost
Here's the strace output (note myserver is an entry in .ssh/config that contains the same parameters as the previous command):
execve("/usr/local/bin/autossh", ["autossh", "myserver"], [/* 55 vars */]) = 0
brk(0) = 0xefc000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f26193cc000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=36751, ...}) = 0
mmap(NULL, 36751, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f26193c3000
close(3) = 0
open("/lib64/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p#\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=113432, ...}) = 0
mmap(NULL, 2198192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2618f95000
mprotect(0x7f2618fab000, 2093056, PROT_NONE) = 0
mmap(0x7f26191aa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f26191aa000
mmap(0x7f26191ac000, 6832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f26191ac000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\356\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1920936, ...}) = 0
mmap(NULL, 3750152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2618c01000
mprotect(0x7f2618d8b000, 2097152, PROT_NONE) = 0
mmap(0x7f2618f8b000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18a000) = 0x7f2618f8b000
mmap(0x7f2618f90000, 18696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2618f90000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f26193c2000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f26193c1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f26193c0000
arch_prctl(ARCH_SET_FS, 0x7f26193c1700) = 0
mprotect(0x7f2618f8b000, 16384, PROT_READ) = 0
mprotect(0x7f26191aa000, 4096, PROT_READ) = 0
mprotect(0x7f26193cd000, 4096, PROT_READ) = 0
munmap(0x7f26193c3000, 36751) = 0
write(2, "usage: autossh [-V] [-M monitor_"..., 69usage: autossh [-V] [-M monitor_port[:echo_port]] [-f] [SSH_OPTIONS]
) = 69
write(2, "\n", 1
) = 1
write(2, " -M specifies monitor port. M"..., 238 -M specifies monitor port. May be overridden by environment
variable AUTOSSH_PORT. 0 turns monitoring loop off.
Alternatively, a port for an echo service on the remote
machine may be specified. (Normally port 7.)
) = 238
write(2, " -f run in background (autoss"..., 85 -f run in background (autossh handles this, and does not
pass it to ssh.)
) = 85
write(2, " -V print autossh version and"..., 39 -V print autossh version and exit.
) = 39
write(2, "\n", 1
) = 1
write(2, "Environment variables are:\n", 27Environment variables are:
) = 27
write(2, " AUTOSSH_GATETIME - how lo"..., 259 AUTOSSH_GATETIME - how long must an ssh session be established
before we decide it really was established
(in seconds). Default is 30 seconds; use of -f
flag sets this to 0.
) = 259
write(2, " AUTOSSH_LOGFILE - file t"..., 107 AUTOSSH_LOGFILE - file to log to (default is to use the syslog
facility)
) = 107
write(2, " AUTOSSH_LOGLEVEL - level "..., 49 AUTOSSH_LOGLEVEL - level of log verbosity
) = 49
write(2, " AUTOSSH_MAXLIFETIME - set th"..., 65 AUTOSSH_MAXLIFETIME - set the maximum time to live (seconds)
) = 65
write(2, " AUTOSSH_MAXSTART - max ti"..., 69 AUTOSSH_MAXSTART - max times to restart (default is no limit)
) = 69
write(2, " AUTOSSH_MESSAGE - messag"..., 74 AUTOSSH_MESSAGE - message to append to echo string (max 64 bytes)
) = 74
write(2, " AUTOSSH_PATH - path t"..., 53 AUTOSSH_PATH - path to ssh if not default
) = 53
write(2, " AUTOSSH_PIDFILE - write "..., 49 AUTOSSH_PIDFILE - write pid to this file
) = 49
write(2, " AUTOSSH_POLL - how of"..., 70 AUTOSSH_POLL - how often to check the connection (seconds)
) = 70
write(2, " AUTOSSH_FIRST_POLL - time b"..., 71 AUTOSSH_FIRST_POLL - time before first connection check (seconds)
) = 71
write(2, " AUTOSSH_PORT - port t"..., 61 AUTOSSH_PORT - port to use for monitor connection
) = 61
write(2, " AUTOSSH_DEBUG - turn l"..., 104 AUTOSSH_DEBUG - turn logging to maximum verbosity and log to
stderr
) = 104
write(2, "\n", 1
) = 1
exit_group(1) = ?
+++ exited with 1 +++

I had exactly the same problem with autossh 1.4e on CentOS Linux 7. autossh stopped immediately and printed the help, without even trying to connect to SSH.
The solution was to specify -M 0 on the command line:
autossh -M 0 \
-oStrictHostKeyChecking=no \
-oServerAliveInterval=15 \
-oServerAliveCountMax=4 \
-L 3130:localhost:3130 \
-N -i /path/to/some.pem user#remotehost

Come on ... the autossh exits with
write(2, "usage: autossh [-V] [-M monitor_"..., 69usage: autossh [-V] [-M monitor_port[:echo_port]] [-f] [SSH_OPTIONS]
which means that you specified wrong arguments and it is trying to explain you how the syntax looks like. To see what is wrong, there are several things you can try:
Use -vvv switches to ssh to see more verbose log from the ssh.
Use AUTOSSH_DEBUG environment variable to get some debug logs from autossh.

Related

Android 10 adb shell input keyevent returns 0

I'm trying to use ADB shell input keyevent 1000 to test my custom hardware device in android 10, but it returns 0 in ADB log.
Secondly, I found ADB shell input keyevent 288 returns keycode 288, ADB shell input keyevent 289 returns 0. and the max keycode in original KeyEvent.java is 288.
How could I use ADB shell input keyevent 1000 return 1000 in android 10?
05-07 04:03:50.360 1271 1514 D InputDispatcher: Setting input event injection result to 0. injectorPid=6874, injectorUid=2000
05-07 04:03:50.361 1271 4338 D InputDispatcher: injectInputEvent - Waiting for 1 pending foreground dispatches.
05-07 04:03:50.365 3187 3187 D ViewRootImpl: processKeyEvent oldKeycode: 0 and newKeycode: 0
05-07 04:03:50.368 1271 4338 D InputDispatcher: injectInputEvent - Finished with result 0. injectorPid=6874, injectorUid=2000
when you input key > 288 will return 0, see InputReader.cpp:
if (getEventHub()->mapKey(getDeviceId(), scanCode, usageCode, mMetaState, &keyCode, &keyMetaState, &policyFlags)) {
keyCode = AKEYCODE_UNKNOWN;
keyMetaState = mMetaState;
policyFlags = 0;
}
if you could not get the mapkey, it will return AKEYCODE_UNKNOWN.

SSL handshake 20s delay to complete process

We are experiencing a delay when accessing https:// connection to our server.
There is a delay around the 20s to display the content of the page which was trace to SSL handshake process
Using
strace -o /tmp/curl.trace.log -f -tt curl -kvv --trace-time https://10.20.23.7:
We trace this to
91445 09:22:03.711590 getpeername(3, {sa_family=AF_INET, sin_port=htons(9070), sin_addr=inet_addr("10.20.23.7")}, [16]) = 0
91445 09:22:03.773153 sendto(3, "\26\3\1\0\220\1\0\0\214\3\3\332\3n\204\371\2472v\341E[\2247=2;\336\214\266}\4"..., 149, 0, NULL, 0) = 149
91445 09:22:03.773267 recvfrom(3, 0x1c2b258, 5, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
91445 09:22:03.773315 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 5000) = 0 (Timeout)
91445 09:22:08.778047 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 5000) = 0 (Timeout)
91445 09:22:13.783040 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 5000) = 0 (Timeout)
91445 09:22:18.787090 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 5000) = 1 ([{fd=3, revents=POLLIN}])
91445 09:22:20.183606 recvfrom(3, "\26\3\3\n\264", 5, 0, NULL, NULL) = 5
91445 09:22:20.183724 recvfrom(3, "\2\0\0M\3\3]\312\300\34\367\363\256%V\25s)\tSVX\317*\272=\205(\311\1<\345"..., 2740, 0, NULL, NULL) = 2740
91445 09:22:20.184242 fcntl(4, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=1073741824, len=1}) = 0
As I understand recvfrom is not able to read request which was sendto(..)
What mean line sendto, where request was sendto?
91445 09:22:03.773153 sendto(3, "\26\3\1\0\220\1\0\0\214\3\3\332\3n\204\371\2472v\341E[\2247=2;\336\214\266}\4"..., 149, 0, NULL, 0) = 149
Thank you for info.

Apache fails to start (Ubuntu 16.04) no error.log

Apache2 crashes and there's no logging in the error.log, not even after setting the Loglevel to debug in the apache2.conf.
Owner of the error.log is root
No updates or changes were made on the Server
Tried to downgrade from Apache (apt-get install --reinstall apache2=2.4.18-2ubuntu3 apache2-bin=2.4.18-2ubuntu3 apache2-data=2.4.18-2ubuntu3) but that doesn't help.
service apache2 start:
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
systemctl status apache2.service:
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2017-04-04 16:06:03 UTC; 1min 26s ago
Docs: man:systemd-sysv-generator(8)
Process: 11071 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Apr 04 16:05:43 bpi-iot-ros systemd[1]: Starting LSB: Apache2 web server...
Apr 04 16:05:43 bpi-iot-ros apache2[11071]: * Starting Apache httpd web server apache2
Apr 04 16:06:03 bpi-iot-ros apache2[11071]: *
Apr 04 16:06:03 bpi-iot-ros apache2[11071]: * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Apr 04 16:06:03 bpi-iot-ros systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 04 16:06:03 bpi-iot-ros systemd[1]: Failed to start LSB: Apache2 web server.
Apr 04 16:06:03 bpi-iot-ros systemd[1]: apache2.service: Unit entered failed state.
Apr 04 16:06:03 bpi-iot-ros systemd[1]: apache2.service: Failed with result 'exit-code'.
● service.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
journalctl -xe:
Apr 04 16:09:22 bpi-iot-ros apache2[11191]: *
Apr 04 16:09:22 bpi-iot-ros apache2[11191]: * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Apr 04 16:09:22 bpi-iot-ros systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 04 16:09:22 bpi-iot-ros systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Apr 04 16:09:22 bpi-iot-ros systemd[1]: apache2.service: Unit entered failed state.
Apr 04 16:09:22 bpi-iot-ros systemd[1]: apache2.service: Failed with result 'exit-code'.
Error log, last lines from Monday:
[Mon Apr 03 08:56:07.530514 2017] [:error] [pid 30594] [client 192.168.2.185:52276] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:60\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(147): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Obj in /var/www/nextcloud/lib/private/DB/Connection.php on line 60
[Mon Apr 03 08:56:12.034222 2017] [mpm_prefork:notice] [pid 625] AH00169: caught SIGTERM, shutting down
Edit:
apache2ctl configtest no Syntax errors.
apache2ctl -X
Child Process seems to hang up, can reach the SSL Warning (selfsigned) when attempting to reach the sitestarting
did a strace of Apache starting, some Childprocess exited with Errorcode 1 (huge File so i only copied the last Lines)
11028 open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
11028 read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\331i\1\0004\0\0\0"..., 512) = 512
11028 lseek(3, 894128, SEEK_SET) = 894128
11028 read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2960) = 2960
11028 lseek(3, 888324, SEEK_SET) = 888324
11028 read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\3\f"..., 51) = 51
11028 fstat64(3, {st_mode=S_IFREG|0755, st_size=897088, ...}) = 0
11028 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f72000
11028 mmap2(NULL, 963928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e3e000
11028 mprotect(0xb6f14000, 65536, PROT_NONE) = 0
11028 mmap2(0xb6f24000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd6000) = 0xb6f24000
11028 mmap2(0xb6f27000, 9560, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f27000
11028 close(3) = 0
11028 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f71000
11028 set_tls(0xb6f714c0, 0xb6f71b98, 0xb6f7c050, 0xb6f714c0, 0xb6f7c050) = 0
11028 mprotect(0xb6f24000, 8192, PROT_READ) = 0
11028 mprotect(0xb6f51000, 8192, PROT_READ) = 0
11028 mprotect(0x21000, 4096, PROT_READ) = 0
11028 mprotect(0xb6f7b000, 4096, PROT_READ) = 0
11028 munmap(0xb6f73000, 21672) = 0
11028 ioctl(1, TCGETS, 0xbedb2554) = -1 EINVAL (Invalid argument)
11028 brk(NULL) = 0x1d23000
11028 brk(0x1d44000) = 0x1d44000
11028 stat64("/root/.terminfo", 0x1d23160) = -1 ENOENT (No such file or directory)
11028 stat64("/etc/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
11028 stat64("/lib/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
11028 stat64("/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
11028 gettimeofday({1491321517, 321307}, NULL) = 0
11028 access("/etc/terminfo/x/xterm", R_OK) = -1 ENOENT (No such file or directory)
11028 access("/lib/terminfo/x/xterm", R_OK) = 0
11028 open("/lib/terminfo/x/xterm", O_RDONLY|O_LARGEFILE) = 3
11028 fstat64(3, {st_mode=S_IFREG|0644, st_size=3361, ...}) = 0
11028 read(3, "\32\1)\0&\0\17\0\235\1u\5xterm|xterm-debian|X"..., 4096) = 3361
11028 read(3, "", 4096) = 0
11028 close(3) = 0
11028 gettimeofday({1491321517, 324975}, NULL) = 0
11028 ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
11028 ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
11028 ioctl(2, TIOCGWINSZ, {ws_row=54, ws_col=189, ws_xpixel=0, ws_ypixel=0}) = 0
11028 fstat64(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
11028 write(1, "\33[39;49m", 8) = 8
10941 <... read resumed> "\33[39;49m", 128) = 8
11028 exit_group(0) = ?
10941 read(3, <unfinished ...>
11028 +++ exited with 0 +++
10941 <... read resumed> "", 128) = 0
10941 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11028, si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
10941 sigreturn({mask=[]}) = 0
10941 close(3) = 0
10941 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 11028
10941 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb6fae418) = 11029
11029 close(12 <unfinished ...>
10941 wait4(-1, <unfinished ...>
11029 <... close resumed> ) = 0
11029 close(11) = 0
11029 close(10) = 0
11029 execve("/bin/echo", ["/bin/echo", "-e", " \33[31mfailed!\33[39;49m"], [/* 19 vars */]) = 0
11029 brk(NULL) = 0x318000
11029 uname({sysname="Linux", nodename="bpi-iot-ros", ...}) = 0
11029 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
11029 mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f2e000
11029 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
11029 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
11029 fstat64(3, {st_mode=S_IFREG|0644, st_size=21672, ...}) = 0
11029 mmap2(NULL, 21672, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f28000
11029 close(3) = 0
11029 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
11029 open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
11029 read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\331i\1\0004\0\0\0"..., 512) = 512
11029 lseek(3, 894128, SEEK_SET) = 894128
11029 read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2960) = 2960
11029 lseek(3, 888324, SEEK_SET) = 888324
11029 read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\3\f"..., 51) = 51
11029 fstat64(3, {st_mode=S_IFREG|0755, st_size=897088, ...}) = 0
11029 mmap2(NULL, 963928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e1d000
11029 mprotect(0xb6ef3000, 65536, PROT_NONE) = 0
11029 mmap2(0xb6f03000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd6000) = 0xb6f03000
11029 mmap2(0xb6f06000, 9560, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f06000
11029 close(3) = 0
11029 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f27000
11029 set_tls(0xb6f27870, 0xb6f27f48, 0xb6f31050, 0xb6f27870, 0xb6f31050) = 0
11029 mprotect(0xb6f03000, 8192, PROT_READ) = 0
11029 mprotect(0x24000, 4096, PROT_READ) = 0
11029 mprotect(0xb6f30000, 4096, PROT_READ) = 0
11029 munmap(0xb6f28000, 21672) = 0
11029 brk(NULL) = 0x318000
11029 brk(0x339000) = 0x339000
11029 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
11029 write(1, " \33[31mfailed!\33[39;49m\n", 22) = 22
11029 close(1) = 0
11029 close(2) = 0
11029 exit_group(0) = ?
11029 +++ exited with 0 +++
10941 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 11029
10941 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11029, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
10941 sigreturn({mask=[]}) = 11029
10941 close(12) = 0
10941 close(11) = 0
10941 exit_group(1) = ?
10941 +++ exited with 1 +++
(Posted on behalf of the OP).
I dont know exactly how, but it's solved... maybe reinstalling libapache2-mod-php7.0 was the failure.

apache failing to boot

I successfully installed apache on my machine,but when I try to run it throws core dump.
I ran it again using strace,it throws core dump at write system call.
Below is the extract from output of stace. What can I infer from this error ?
write(2, "/tools/abc/local/bin/apachectl: line 79: 14372 Segmentation fault (core dump"..., 120/tools/abc/local/bin/apachectl: line 79: 14372 Segmentation fault (core dumped) $HTTPD -k $ARGV
) = 120
EDIT
Output of strace -s 100 httpd -k start
execve("/tools/abc/local/bin/httpd", ["httpd", "-k", "start"], [/* 38 vars */]) = 0
brk(0) = 0xe7e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffa0aece000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffa0aecd000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffa0aecc000
arch_prctl(ARCH_SET_FS, 0x7ffa0aecd680) = 0
--- SIGSEGV (Segmentation fault) # 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++
Memory fault(coredump)

Apache allow & deny rules parsed differently on different RHEL versions?

I have 6 machines: 3 running RHEL 3 (Taroon Update 9) and 3 other running RHEL 5.6 (Tikanga).
They all share a NFS volume containing
an Apache 2.2.4 installation
that Apache's configuration files
the PHP scripts and other content served by that Apache
On each machine, that shared Apache is started with the "-D $hostname" option to distinguish from the Apache instances running on the other machines. (Where $hostname is the hostname of the machine).
There is a load balancer (another Apache) in front of these 6 machines, balancing the requests between them.
The problem:
I've placed a .htaccess file in a directory containing these rules:
order deny,allow
deny from all
allow from my.very.own.ip
(I've tried the same rules in the configuration file between , with the same result)
Any request from any IP other than my.very.own.ip is denied by all 6 Apaches.
Requests from my.very.own.ip that hit the first 3 Apaches (running on RHEL 3) are accepted, which is normal.
Requests from my.very.own.ip that hit the last 3 Apaches (running on RHEL 5.6) are denied (HTTP 403, client denied by server configuration), which is not normal.
I've ran a strace on all the Apache servers (and their forked children) and this is how they look like:
- on a "good" Apache with request coming from my.very.own.ip
19553 read(7, "GET /my/website"..., 8000) = 1761
19553 gettimeofday({1343736878, 168708}, NULL) = 0
19553 gettimeofday({1343736878, 168787}, NULL) = 0
19553 gettimeofday({1343736878, 168835}, NULL) = 0
19553 stat64("/shark/apps/apache1/conf/www/maps/stationlist.txt", {st_mode=S_IFREG|0644, st_size=5557, ...}) = 0
19553 stat64("/shark/apps/apache1/conf/somedir/stationkidsurls.txt", {st_mode=S_IFREG|0644, st_size=6200, ...}) = 0
19553 stat64("/shark/www_docs/my/website/php/script.php", {st_mode=S_IFREG|0644, st_size=2449, ...}) = 0
19553 open("/shark/www_docs/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
19553 open("/shark/www_docs/my/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
19553 open("/shark/www_docs/my/website/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
19553 open("/shark/www_docs/my/website/php/.htaccess", O_RDONLY|O_LARGEFILE) = 10
19553 fstat64(10, {st_mode=S_IFREG|0644, st_size=51, ...}) = 0
19553 read(10, " order deny,allow\n deny f"..., 4096) = 51
19553 read(10, "", 4096) = 0
19553 close(10) = 0
19553 open("/shark/www_docs/my/website/php/script.php/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
19553 getpid() = 19553
19553 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) = 0
19553 rt_sigaction(SIGPROF, {0x1280014, [PROF], SA_RESTORER|SA_RESTART, 0x3c10d8}, {0x1280014, [PROF], SA_RESTORER|SA_RESTART, 0x3c10d8}, 8) = 0
19553 rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
19553 getcwd("/", 4095) = 2
19553 chdir("/shark/www_docs/my/website/php") = 0
- on a "bad" Apache with request coming from my.very.own.ip
1723 read(9, "GET /my/website"..., 8000) = 1761
1723 gettimeofday({1343736621, 548677}, NULL) = 0
1723 gettimeofday({1343736621, 548735}, NULL) = 0
1723 gettimeofday({1343736621, 548771}, NULL) = 0
1723 stat64("/shark/apps/apache1/conf/www/maps/stationlist.txt", {st_mode=S_IFREG|0644, st_size=5557, ...}) = 0
1723 stat64("/shark/apps/apache1/conf/somedir/stationkidsurls.txt", {st_mode=S_IFREG|0644, st_size=6200, ...}) = 0
1723 stat64("/shark/www_docs/my/website/php/script.php", {st_mode=S_IFREG|0644, st_size=2449, ...}) = 0
1723 open("/shark/www_docs/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1723 open("/shark/www_docs/my/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1723 open("/shark/www_docs/my/website/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1723 open("/shark/www_docs/my/website/php/.htaccess", O_RDONLY|O_LARGEFILE) = 12
1723 fstat64(12, {st_mode=S_IFREG|0644, st_size=51, ...}) = 0
1723 read(12, " order deny,allow\n deny f"..., 4096) = 51
1723 read(12, "", 4096) = 0
1723 close(12) = 0
1723 open("/shark/www_docs/my/website/php/script.php/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
1723 gettimeofday({1343736621, 550606}, NULL) = 0
1723 write(10, "[Tue Jul 31 08:10:21 2012] [erro"..., 159) = 159
729 <... read resumed> "[Tue Jul 31 08:10:21 2012] [erro"..., 65536) = 159
729 gettimeofday({1343736621, 550743}, NULL) = 0
729 gettimeofday({1343736621, 550786}, NULL) = 0
What do you think?
The only difference between these machines in the RHEL version. That may also mean that the NFS share ( /shark ) is mounted differently...
I've modified the .htaccess an changed the allow,deny rule with a Rewrite (requests not coming from my.very.own.ip are redirected to somewhere else). But... I'm still wondering why the same rules behave differently on different machines (same Apache, same configuration files).
Thank you!