1

Тема: Не запускается Prosody

Пытаюсь завести Prosody, взятый из репозитория тов. viperet. Поправил пути в usr/bin/prosody и usr/bin/prosodyctl, однако lua напрочь отказывается загружать .so-библиотеки

/media/DISK_A1/system/usr/bin # ./prosodyctl 
Error: Unable to load pposix module. Check that Prosody is installed correctly.
For more help send the below error to us through http://prosody.im/discuss
error loading module 'util.pposix' from file '/media/DISK_A1/system/usr/lib/prosody/util/pposix.so':
        File not found
/media/DISK_A1/system/usr/bin/lua: error loading module 'util.encodings' from file '/media/DISK_A1/system/usr/lib/prosody/util/encodings.so':
        File not found
stack traceback:
        [C]: ?
        [C]: in function 'require'
        ...a/DISK_A1/system/usr/lib/prosody/util/prosodyctl.lua:11: in main chunk
        [C]: in function 'require'
        ./prosodyctl:126: in main chunk
        [C]: ?

Причём сами файлы на месте

/media/DISK_A1/system/usr/bin # ls /media/DISK_A1/system/usr/lib/prosody/util/pposix.so
/media/DISK_A1/system/usr/lib/prosody/util/pposix.so
/media/DISK_A1/system/usr/bin # ls /media/DISK_A1/system/usr/lib/prosody/util/encodings.so
/media/DISK_A1/system/usr/lib/prosody/util/encodings.so

.lua-файлы из того же каталога загружаются без проблем.

Подскажите в какую сторону копать, нужно ли как-то настраивать lua для работы с /media/DISK_A1/ или дело в Prosody?

2

Re: Не запускается Prosody

Sergal, скорее всего это связано с тем, что у viperet пакеты собраны для старой версии lua. Или нужно снести lua и liblua из моего репозитория и взять старые версии, или подождите. Попробую завтра собрать
luafilesystem, luaexpat, luasec и rapsody с обновленным вариантом lua.
Уже писали в соседней теме. что хотят видеть плагины lua в моей репе.

3

Re: Не запускается Prosody

Пакеты
http://keenetic.zyxmon.org/packages/lib … enetic.ipk
http://keenetic.zyxmon.org/packages/lua … enetic.ipk
http://keenetic.zyxmon.org/packages/lua … enetic.ipk
http://keenetic.zyxmon.org/packages/lua … enetic.ipk
http://keenetic.zyxmon.org/packages/lua … enetic.ipk
http://keenetic.zyxmon.org/packages/pro … enetic.ipk

Что, как минимум, похоже нужно сделать (для пакета viperet - аналогично):
(a) Исправить пути в самом начале файлов usr/bin/prosody  usr/bin/prosodyctl
(b) Написать скрипт запуска (в init.d).

Если все заработает, добавлю с этими исправлениями в репу.

4

Re: Не запускается Prosody

Большое спасибо

Пришлось исправить все пути + вот наткнулся на такой баг
http://pastebin.ru/lUWhglsN

Довольно грубый скрипт запуска

#!/bin/sh

MOUNT="/media/DISK_A1/system"
PROSODYCTL="$MOUNT/usr/bin/prosodyctl"

export PATH=$TMPINSTALL:$MOUNT/bin:$MOUNT/sbin:$MOUNT/usr/bin:$MOUNT/usr/sbin:/sbin:/usr/sbin:/bin:/usr/bin
export LD_LIBRARY_PATH=$MOUNT/lib:$MOUNT/usr/lib:/lib:/usr/lib


start() {
    $PROSODYCTL start
}
    
stop() {
    $PROSODYCTL stop
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        start
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        ;;
esac

5

Re: Не запускается Prosody

Sergal, у Вас в одном месте очепятка в 'media'.
Пакет в реозитории. Патчи при сборке накладываются на исходные файлы? поэтому я мог ошибиться.
Sergal, если есть возможность - проверьте версию из репы.

6

Re: Не запускается Prosody

У пакета Prosody в репозитории неправильные пути в prosody и prosodyctl, видимо их поменял configure при сборке. Можно, наверное, поменять их уже в самом пакете или после установки.

7

Re: Не запускается Prosody

Sergal, добавил еще один патч для сборки. В бинарной репе пакет будет позже.

8

Re: Не запускается Prosody

После недельных усилий поиска флехи с ext2... у меня получилось установить opkg. Пару пакетов поставил. Настроил крон и curl - все прошло как по маслу (респект и уважение Админу форума).

Добавил трех юзеров поочереди командой в SSH  prosodyctl adduser  (yes@192.168.1.1, no@192.168.1.1, add@example.com). Пароль для каждого. Перезагрузил Флеху, нажимая кнопку рядом с USB.

Внес в файлы:
\\192.168.1.1\disk_a1\system\usr\bin\prosodyctl
\\192.168.1.1\disk_a1\system\usr\bin\prosody
исправления
...
CFG_SOURCEDIR='/media/DISK_A1/system/usr/lib/prosody';
CFG_CONFIGDIR='/media/DISK_A1/system/etc/prosody';
CFG_PLUGINDIR='/media/DISK_A1/system/usr/lib/prosody/modules/';
CFG_DATADIR='/media/DISK_A1/system/etc/prosody/data';
...
Перезагрузил Флеху.
Наконец-то увидел в PS:
...
6741 root       1020 S   /bin/sh /media/DISK_A1/system/etc/init.d/S60prosody s
6742 root       3336 S   lua /media/DISK_A1/system/usr/bin/prosodyctl start
6749 root       1020 S   sh -c prosody
6750 root       4996 S   lua /media/DISK_A1/system/usr/bin/prosody
...

Набрал команду:
/media/DISK_A1/system/root # prosodyctl status
Warning: Couldn't switch to Prosody user/group 'prosody'/'prosody': no-such-group
Prosody is not running
/media/DISK_A1/system/root #

Подвисает если написать
# prosodyctl start
...
Что делать дальше разбираюсь... жду подсказок. Никогда не настраивал XMPP

Отредактировано Vizman (2013-04-21 23:23:06)

9

Re: Не запускается Prosody

Только сейчас обратил внимание, что обновил prosody, но забыл выложить бинарный пакет. Пакет обновлен.

10

Re: Не запускается Prosody

Точно такая же ошибка и незапускается, конфиг правильный вроде, хмрр настраивал не раз. Видимо требует группу и юзера? или что ,может поможет кто?

11

Re: Не запускается Prosody

Ошибка с отсутствием пользователя/группы. Где нибудь есть таблетка от данного бага?
/media/DISK_A1/system/root # prosodyctl status
Warning: Couldn't switch to Prosody user/group 'prosody'/'prosody': no-such-group
Prosody is not running

12

Re: Не запускается Prosody

В Entware есть и adduser и addgroup.

13

Re: Не запускается Prosody

А где можно найти подробный процесс добавления?

14

Re: Не запускается Prosody

May 27 19:54:06 general    info    Hello and welcome to Prosody version 0.6.2
May 27 20:28:43 general    info    Hello and welcome to Prosody version 0.6.2
May 27 20:28:43 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 20:29:00 general    info    Shutting down...
May 27 20:29:00 general    info    Shutdown status: Cleaning up
May 27 20:29:00 general    info    Shutdown status: Closing all active sessions
May 27 20:29:00 general    info    Shutdown status: Closing all server connections
May 27 20:29:00 general    info    Shutdown complete
May 27 20:32:16 general    info    Hello and welcome to Prosody version 0.6.2
May 27 20:32:16 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 20:37:05 general    info    Hello and welcome to Prosody version 0.6.2
May 27 20:37:06 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 20:50:33 general    info    Hello and welcome to Prosody version 0.6.2
May 27 20:50:34 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 29 00:00:35 general    info    Hello and welcome to Prosody version 0.6.2
May 27 20:52:54 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 20:53:08 general    info    Hello and welcome to Prosody version 0.6.2
May 27 20:53:08 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 20:53:08 socket    warn    server.lua, port 5222: address already in use
May 27 20:53:08 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 20:53:08 socket    warn    server.lua, port 5269: address already in use
May 27 20:53:08 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 20:53:08 socket    warn    server.lua, port 5347: address already in use
May 27 20:53:08 general    error    Failed to open server port 5347, this port is in use by another application
May 27 21:04:51 general    info    Hello and welcome to Prosody version 0.6.2
May 27 21:04:52 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 21:04:52 socket    warn    server.lua, port 5222: address already in use
May 27 21:04:52 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 21:04:52 socket    warn    server.lua, port 5269: address already in use
May 27 21:04:52 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 21:04:52 socket    warn    server.lua, port 5347: address already in use
May 27 21:04:52 general    error    Failed to open server port 5347, this port is in use by another application
May 27 21:09:56 general    info    Hello and welcome to Prosody version 0.6.2
May 27 21:09:56 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 21:09:56 socket    warn    server.lua, port 5222: address already in use
May 27 21:09:56 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 21:09:56 socket    warn    server.lua, port 5269: address already in use
May 27 21:09:56 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 21:09:56 socket    warn    server.lua, port 5347: address already in use
May 27 21:09:56 general    error    Failed to open server port 5347, this port is in use by another application
May 27 21:10:12 general    info    Shutting down...
May 27 21:10:12 general    info    Shutdown status: Cleaning up
May 27 21:10:12 general    info    Shutdown status: Closing all active sessions
May 27 21:10:12 general    info    Shutdown status: Closing all server connections
May 27 21:10:12 general    info    Shutdown complete
May 27 21:19:51 c2s4c53e0    info    Client connected
May 27 21:19:51 c2s4c53e0    info    Disconnecting client, <stream:error> is: <stream:error><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>This server does not serve 18ko.noip.me</text></stream:error>
May 27 21:19:51 c2s4c53e0    info    Client disconnected: This server does not serve 18ko.noip.me
May 27 21:19:51 c2s4c53e0    info    Destroying session for (unknown) ((unknown)@18ko.noip.me)
May 27 21:20:09 c2s523e38    info    Client connected
May 27 21:20:09 c2s523e38    info    Disconnecting client, <stream:error> is: <stream:error><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>This server does not serve 18ko.noip.me</text></stream:error>
May 27 21:20:09 c2s523e38    info    Client disconnected: This server does not serve 18ko.noip.me
May 27 21:20:09 c2s523e38    info    Destroying session for (unknown) ((unknown)@18ko.noip.me)
May 27 21:23:13 general    info    Hello and welcome to Prosody version 0.6.2
May 27 21:23:13 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 21:23:13 socket    warn    server.lua, port 5222: address already in use
May 27 21:23:13 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 21:23:13 socket    warn    server.lua, port 5269: address already in use
May 27 21:23:13 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 21:23:13 socket    warn    server.lua, port 5347: address already in use
May 27 21:23:13 general    error    Failed to open server port 5347, this port is in use by another application
May 27 21:41:02 general    info    Hello and welcome to Prosody version 0.6.2
May 27 21:41:02 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 21:41:02 socket    warn    server.lua, port 5222: address already in use
May 27 21:41:02 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 21:41:02 socket    warn    server.lua, port 5269: address already in use
May 27 21:41:02 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 21:41:03 socket    warn    server.lua, port 5347: address already in use
May 27 21:41:03 general    error    Failed to open server port 5347, this port is in use by another application
May 27 21:41:18 general    info    Shutting down...
May 27 21:41:18 general    info    Shutdown status: Cleaning up
May 27 21:41:18 general    info    Shutdown status: Closing all active sessions
May 27 21:41:18 general    info    Shutdown status: Closing all server connections
May 27 21:41:18 general    info    Shutdown complete
May 27 22:03:03 general    info    Hello and welcome to Prosody version 0.6.2
May 27 22:03:03 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 22:03:03 socket    warn    server.lua, port 5222: address already in use
May 27 22:03:03 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 22:03:03 socket    warn    server.lua, port 5269: address already in use
May 27 22:03:03 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 22:03:03 socket    warn    server.lua, port 5347: address already in use
May 27 22:03:03 general    error    Failed to open server port 5347, this port is in use by another application
May 27 22:08:27 general    info    Hello and welcome to Prosody version 0.6.2
May 27 22:08:28 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 22:08:28 socket    warn    server.lua, port 5222: address already in use
May 27 22:08:28 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 22:08:28 socket    warn    server.lua, port 5269: address already in use
May 27 22:08:28 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 22:08:28 socket    warn    server.lua, port 5347: address already in use
May 27 22:08:28 general    error    Failed to open server port 5347, this port is in use by another application
May 27 22:13:31 general    info    Hello and welcome to Prosody version 0.6.2
May 27 22:13:32 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 22:13:32 socket    warn    server.lua, port 5222: address already in use
May 27 22:13:32 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 22:13:32 socket    warn    server.lua, port 5269: address already in use
May 27 22:13:32 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 22:13:32 socket    warn    server.lua, port 5347: address already in use
May 27 22:13:32 general    error    Failed to open server port 5347, this port is in use by another application
May 27 22:27:29 c2s544e70    info    Client connected
May 27 22:27:29 c2s544e70    info    Disconnecting client, <stream:error> is: <stream:error><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>This server does not serve 18ko.noip.me</text></stream:error>
May 27 22:27:29 c2s544e70    info    Client disconnected: This server does not serve 18ko.noip.me
May 27 22:27:29 c2s544e70    info    Destroying session for (unknown) ((unknown)@18ko.noip.me)
May 27 22:30:07 general    info    Hello and welcome to Prosody version 0.6.2
May 27 22:30:07 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 22:30:07 socket    warn    server.lua, port 5222: address already in use
May 27 22:30:07 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 22:30:07 socket    warn    server.lua, port 5269: address already in use
May 27 22:30:07 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 22:30:07 socket    warn    server.lua, port 5347: address already in use
May 27 22:30:07 general    error    Failed to open server port 5347, this port is in use by another application
May 27 22:34:41 c2s53c870    info    Client connected
May 27 22:34:41 c2s53c870    info    Disconnecting client, <stream:error> is: <stream:error><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>This server does not serve 18ko.noip.me</text></stream:error>
May 27 22:34:41 c2s53c870    info    Client disconnected: This server does not serve 18ko.noip.me
May 27 22:34:41 c2s53c870    info    Destroying session for (unknown) ((unknown)@18ko.noip.me)
May 27 23:49:57 general    info    Hello and welcome to Prosody version 0.6.2
May 27 23:49:57 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 27 23:49:57 socket    warn    server.lua, port 5222: address already in use
May 27 23:49:57 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 27 23:49:57 socket    warn    server.lua, port 5269: address already in use
May 27 23:49:57 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 27 23:49:57 socket    warn    server.lua, port 5347: address already in use
May 27 23:49:57 general    error    Failed to open server port 5347, this port is in use by another application
May 28 00:30:25 general    info    Hello and welcome to Prosody version 0.6.2
May 28 00:30:26 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 28 00:30:26 socket    warn    server.lua, port 5222: address already in use
May 28 00:30:26 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 28 00:30:26 socket    warn    server.lua, port 5269: address already in use
May 28 00:30:26 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 28 00:30:26 socket    warn    server.lua, port 5347: address already in use
May 28 00:30:26 general    error    Failed to open server port 5347, this port is in use by another application
May 28 02:35:49 general    info    Hello and welcome to Prosody version 0.6.2
May 28 02:35:49 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 28 02:35:49 socket    warn    server.lua, port 5222: address already in use
May 28 02:35:49 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 28 02:35:49 socket    warn    server.lua, port 5269: address already in use
May 28 02:35:49 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 28 02:35:49 socket    warn    server.lua, port 5347: address already in use
May 28 02:35:49 general    error    Failed to open server port 5347, this port is in use by another application
May 28 08:02:21 general    info    Hello and welcome to Prosody version 0.6.2
May 28 08:02:22 hostmanager    error    No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.
May 28 08:02:22 socket    warn    server.lua, port 5222: address already in use
May 28 08:02:22 general    error    Failed to open server port 5222, check that Prosody or another XMPP server is not already running and using this port
May 28 08:02:22 socket    warn    server.lua, port 5269: address already in use
May 28 08:02:22 general    error    Failed to open server port 5269, check that Prosody or another XMPP server is not already running and using this port
May 28 08:02:22 socket    warn    server.lua, port 5347: address already in use
May 28 08:02:22 general    error    Failed to open server port 5347, this port is in use by another application

Это лог, я так понимаю у меня порты заняты или закрыты?

15

Re: Не запускается Prosody

Нужна помощь в написании нормального скрипта запуска, а не то что в пакете, либо правильная инструкция по настройке Prosody (второго, как я вижу у Вас нет, да и помогать никто не собирается).

https://youtu.be/P1xmJhWgSKo

На видео видно, что скрипт запускается и Prosody работает. Но стоит закрыть окно в котором запущен Prosody - процесс останавливается, как следствие останавливается сервер.

P.S. Логи показать не могу т.к. они пишутся в папку var, а эта папка в определенный момент стала файлом. Как открывать её не знаю.

Я надеюсь здесь есть люди, которые помогут решить проблему.

16

Re: Не запускается Prosody

Konstantin18ko :

Я надеюсь здесь есть люди, которые помогут решить проблему.

Без базовых знаний linux Вы не решите ни эту, ни другие проблемы. Вам на другой форум, где обучают основам linux. И изучите уже правила проведения на технических форумах - http://maddog.sitengine.ru/smart-question-ru.html.

А пока подсказка - поинтересуйтесь что обозначает символ &, для чего нужны утилиты screen, tmux и подобные.
Если сами исправите скрипт, напишите сюда - https://github.com/Entware/entware/issues

17

Re: Не запускается Prosody

Во время танцев с бубнами выявилось две проблемы (можно пофиксить одним приемом):
1. Во время установки не создается директория /system/var/run/prosody/ в которой лежит *.pid файл (Фиксим созданием директории)
2. mod_posix работает постоянно (из-за него процесс стартовал, но не получал статус running), даже если в конфиге он деактивирован (т.к. нельзя отключить фиксим см. пункт выше).

Осталась извечная проблема:
Warning: Couldn't switch to Prosody user/group 'prosody'/'prosody': no-such-group.

P.S. Скиньте S60Prosody, а то я файл удалил.

Отредактировано Konstantin18ko (2015-06-01 23:10:13)