LINUX.ORG.RU
ФорумAdmin

Не запускается апач


0

3

Starting web server: apache2no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information. failed!

проверил порты - чисто.

сделал strace -f /etc/init.d/apache2 start:

[pid  3815] open("/etc/ld.so.cache", O_RDONLY) = 3
[pid  3815] fstat64(3, {st_mode=S_IFREG|0644, st_size=21129, ...}) = 0
[pid  3815] mmap2(NULL, 21129, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb771e000
[pid  3815] close(3)                    = 0
[pid  3815] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid  3815] open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY) = 3
[pid  3815] read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240o\1\0004\0\0\0"..., 512) = 512
[pid  3815] fstat64(3, {st_mode=S_IFREG|0755, st_size=1441960, ...}) = 0
[pid  3815] mmap2(NULL, 1456504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75ba000
[pid  3815] mprotect(0xb7717000, 4096, PROT_NONE) = 0
[pid  3815] mmap2(0xb7718000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15d) = 0xb7718000
[pid  3815] mmap2(0xb771b000, 10616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb771b000
[pid  3815] close(3)                    = 0
[pid  3815] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75b9000
[pid  3815] set_thread_area({entry_number:-1 -> 6, base_addr:0xb75b96c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
[pid  3815] mprotect(0xb7718000, 8192, PROT_READ) = 0
[pid  3815] mprotect(0x804e000, 4096, PROT_READ) = 0
[pid  3815] mprotect(0xb7744000, 4096, PROT_READ) = 0
[pid  3815] munmap(0xb771e000, 21129)   = 0
[pid  3815] brk(0)                      = 0x8050000
[pid  3815] brk(0x8071000)              = 0x8071000
[pid  3815] open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
[pid  3815] fstat64(3, {st_mode=S_IFREG|0644, st_size=3202512, ...}) = 0
[pid  3815] mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb73b9000
[pid  3815] close(3)                    = 0
[pid  3815] fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
[pid  3815] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7723000
[pid  3815] write(1, " \33[31mfailed!\33[39;49m\n", 22 failed!
) = 22
[pid  3815] close(1)                    = 0
[pid  3815] munmap(0xb7723000, 4096)    = 0
[pid  3815] close(2)                    = 0
[pid  3815] exit_group(0)               = ?
Process 3784 resumed
Process 3815 detached
<... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3815
--- SIGCHLD (Child exited) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
exit_group(1)                           = ?

лог файла нет, проверил путь все верно. поставил даже папку на запись всех для всех.

Работает демон atd - но вроде не причём.

Roman_S
() автор топика

strace тебе показал дебуг вывод инит-скрипта, а не бинарника апача.
По теме - место на диске есть? Права на /var/log/apache2 не сбиты?

Bers666 ★★★★★
()

Система не CentOS случаем? Там на чистой установке ОС поднимается IPv6, дальше во время запуска Апач поднимается на IPv6 адресе, и когда потом пытается на IPv4, падает.

Mr_Alone ★★★★★
()
Ответ на: комментарий от Mr_Alone

apache2ctl configtest

Syntax OK

strace /usr/sbin/apache2 -f /etc/apache2/httpd.conf

.....
_llseek(3, 784, [784], SEEK_SET)        = 0
munmap(0xb61a7000, 784)                 = 0
close(3)                                = 0
gettimeofday({1400002100, 810588}, NULL) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb61a6000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb61a4000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb61a2000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb61a0000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb619e000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb619c000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb619a000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6198000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6196000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6194000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6192000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6190000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb618e000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb618c000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb618a000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6188000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6186000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6184000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6182000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6180000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb617e000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb617c000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb617a000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6178000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6176000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6174000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6172000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6170000
write(2, "no listening sockets available, "..., 46no listening sockets available, shutting down
) = 46
write(2, "Unable to open logs\n", 20Unable to open logs
)   = 20
select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
munmap(0xb62a3000, 12460)               = 0
munmap(0xb62ac000, 8348)                = 0
....
anonymous
()
Ответ на: комментарий от Bers666

Там инклидится envvars, в нём есть:

....

# this won't be correct after changing uid
unset HOME

# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
	SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
	SUFFIX=
fi

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale

export LANG

......
anonymous
()
Ответ на: комментарий от Mr_Alone

здесь уже пытаюсь кильнуть апач и заново поставить и все равно легит эта ошибка :(

anonymous
()
Ответ на: комментарий от leave
strace apache2 -D NO_DETACH -f
....
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb74da000
write(2, "apache2: option requires an argu"..., 42apache2: option requires an argument -- f
) = 42
write(2, "Usage: apache2 [-D name] [-d dir"..., 50Usage: apache2 [-D name] [-d directory] [-f file]
) = 50
write(2, "               [-C \"directive\"] "..., 49               [-C "directive"] [-c "directive"]
) = 49
write(2, "               [-k start|restart"..., 62               [-k start|restart|graceful|graceful-stop|stop]
) = 62
write(2, "               [-v] [-V] [-h] [-"..., 60               [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
) = 60
write(2, "Options:\n", 9Options:
)               = 9
write(2, "  -D name            : define a "..., 75  -D name            : define a name for use in <IfDefine name> directives
) = 75
write(2, "  -d directory       : specify a"..., 63  -d directory       : specify an alternate initial ServerRoot
) = 63
write(2, "  -f file            : specify a"..., 61  -f file            : specify an alternate ServerConfigFile
) = 61
write(2, "  -C \"directive\"     : process d"..., 69  -C "directive"     : process directive before reading config files
) = 69
write(2, "  -c \"directive\"     : process d"..., 68  -c "directive"     : process directive after reading config files
) = 68
write(2, "  -e level           : show star"..., 67  -e level           : show startup errors of level (see LogLevel)
) = 67
write(2, "  -E file            : log start"..., 50  -E file            : log startup errors to file
) = 50
write(2, "  -v                 : show vers"..., 43  -v                 : show version number
) = 43
write(2, "  -V                 : show comp"..., 45  -V                 : show compile settings
) = 45
write(2, "  -h                 : list avai"..., 71  -h                 : list available command line options (this page)
) = 71
write(2, "  -l                 : list comp"..., 48  -l                 : list compiled in modules
) = 48
write(2, "  -L                 : list avai"..., 63  -L                 : list available configuration directives
) = 63
write(2, "  -t -D DUMP_VHOSTS  : show pars"..., 76  -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)
) = 76
write(2, "  -S                 : a synonym"..., 55  -S                 : a synonym for -t -D DUMP_VHOSTS
) = 55
write(2, "  -t -D DUMP_MODULES : show all "..., 48  -t -D DUMP_MODULES : show all loaded modules
) = 48
write(2, "  -M                 : a synonym"..., 56  -M                 : a synonym for -t -D DUMP_MODULES
) = 56
write(2, "  -t                 : run synta"..., 57  -t                 : run syntax check for config files
) = 57
write(2, "  -T                 : start wit"..., 59  -T                 : start without DocumentRoot(s) check
) = 59
write(2, "  -X                 : debug mod"..., 67  -X                 : debug mode (only one worker, do not detach)
) = 67
select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
munmap(0xb77a0000, 8192)                = 0
munmap(0xb779e000, 8192)                = 0

anonymous
()
Ответ на: комментарий от leave

В принципе тоже самое вывел:

open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1637, ...}) = 0
mmap2(NULL, 1637, PROT_READ, MAP_SHARED, 3, 0) = 0xb616b000
_llseek(3, 1637, [1637], SEEK_SET)      = 0
munmap(0xb616b000, 1637)                = 0
close(3)                                = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 3
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=784, ...}) = 0
mmap2(NULL, 784, PROT_READ, MAP_SHARED, 3, 0) = 0xb616b000
_llseek(3, 784, [784], SEEK_SET)        = 0
munmap(0xb616b000, 784)                 = 0
close(3)                                = 0
gettimeofday({1400006053, 78875}, NULL) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb616a000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6168000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6166000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6164000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6162000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6160000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb615e000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb615c000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb615a000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6158000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6156000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6154000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6152000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6150000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb614e000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb614c000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb614a000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6148000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6146000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6144000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6142000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6140000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb613e000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb613c000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb613a000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6138000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6136000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6134000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6132000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6130000
write(2, "no listening sockets available, "..., 46no listening sockets available, shutting down
) = 46
write(2, "Unable to open logs\n", 20Unable to open logs
)   = 20
select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
munmap(0xb626b000, 12460)               = 0
munmap(0xb6274000, 8348)                = 0
munmap(0xb627c000, 24852)               = 0
munmap(0xb628a000, 186616)              = 0

anonymous
()
Ответ на: комментарий от anonymous

Чувак, ты какой-то упоротый. Зачем кидать последние строчки? Скинь либо весь выхлоп strace, либо сам разбирайся. И да, полный выхлоп netstat -tapn заодно покажи.

Mr_Alone ★★★★★
()
Последнее исправление: Mr_Alone (всего исправлений: 1)

Как апач ставил? из под какого пользователя апач запускаешь? Порт не занят?

Erfinder
()
Последнее исправление: Erfinder (всего исправлений: 1)
Ответ на: комментарий от Deleted

Вот я «умный» - ищу и ищу. Как раз наоборот там на «listen» при установки коммент ставит, а ввыводе какую то Х...ю пишет, которая вообще не причем.

anonymous
()
Ответ на: комментарий от Bers666

<too fat mode=1>
C:\Users\juri_gurjanov>ss
'ss' is not recognized as an internal or external command,
operable program or batch file

Mr_Alone ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.