Приветствую!
Ejabberd как простой jabber-сервер работает, и вот захотелось шлюза в ICQ. Как ejabberd, так и pyicqt работают на одной машине с айпишником, скажем, "1.2.3.4".
Почитал вот эту доку:
и сделал так:
=====================[ejabberd.cfg]====================
{host, "1.2.3.4"}.
{listen,
[
{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}]},
{5223, ejabberd_c2s, [{access, c2s}, ssl, {certfile, "/etc/ejabberd/ssl.pem"}]},
{5269, ejabberd_s2s_in, [{shaper, s2s_shaper}]},
{5347, ejabberd_service, [{access, all}, host, "1.2.3.4", [{password, "mypassword"}]]}
]}.
=====================[ejabberd.cfg]====================
===================[pyicqt config.xml]=================
[pyicqt]
[jid]icq.1.2.3.4[/jid]
[spooldir].[/spooldir]
[pid]PyICQt.pid[/pid]
[mainServer]1.2.3.4[/mainServer]
[mainServerJID]ejabberd.1.2.3.4[/mainServerJID]
[port]5347[/port]
[secret]mypassword[/secret]
[lang]en[/lang]
[encoding]iso-8859-1[/encoding]
[icqServer]login.icq.com[/icqServer]
[icqPort]5190[/icqPort]
[debugLevel]3[/debugLevel]
[debugFile]./debug.log[/debugFile]
[reactor]poll[/reactor]
[xdbDriver]xmlfiles[/xdbDriver]
[disableAvatars/]
[/pyicqt]
===================[pyicqt config.xml]=================
В результате ejabberd пишет в stdout следующее:
====================================================
=CRASH REPORT==== 31-Aug-2006::22:09:51 ===
crasher:
pid: <0.535.0>
registered_name: []
error_info: {{badmatch,{error,{{badmatch,false},
[{ejabberd_service,init,1},
{gen_fsm,init_it,6},
{proc_lib,init_p,5}]}}},
[{ejabberd_listener,accept,3},{proc_lib,init_p,5}]}
initial_call: {ejabberd_listener,init,
[5347,
ejabberd_service,
[{access,all},
host,
"1.2.3.4",
[{password,"mypassword"}]]]}
ancestors: [ejabberd_listeners,ejabberd_sup,<0.41.0>]
messages: []
links: [#Port<0.652>,<0.207.0>,#Port<0.651>]
dictionary: []
trap_exit: false
status: running
heap_size: 377
stack_size: 21
reductions: 406
neighbours:
=SUPERVISOR REPORT==== 31-Aug-2006::22:09:51 ===
Supervisor: {local,ejabberd_listeners}
Context: child_terminated
Reason: {{badmatch,{error,{{badmatch,false},
[{ejabberd_service,init,1},
{gen_fsm,init_it,6},
{proc_lib,init_p,5}]}}},
[{ejabberd_listener,accept,3},{proc_lib,init_p,5}]}
Offender: [{pid,<0.535.0>},
{name,5347},
{mfa,{ejabberd_listener,
start,
[5347,
ejabberd_service,
[{access,all},
host,
"1.2.3.4",
[{password,"mypassword"}]]]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]
==================================================
а pyicqt в лог пишет следующее:
==================================================
[2006-08-31 22:09:37] Starting factory
[2006-08-31 22:09:37] INFO :: :: PyTransport :: componentDisconnected :: {'self': 'instance'} ::
[2006-08-31 22:09:37] will retry in 2 seconds
[2006-08-31 22:09:37] Stopping factory
[2006-08-31 22:09:40] Starting factory
[2006-08-31 22:09:40] INFO :: :: PyTransport :: componentDisconnected :: {'self': 'instance'} ::
[2006-08-31 22:09:40] will retry in 2 seconds
[2006-08-31 22:09:40] Stopping factory
[2006-08-31 22:09:43] Starting factory
[2006-08-31 22:09:43] INFO :: :: PyTransport :: componentDisconnected :: {'self': 'instance'} ::
[2006-08-31 22:09:43] will retry in 2 seconds
[2006-08-31 22:09:43] Stopping factory
[2006-08-31 22:09:45] Starting factory
[2006-08-31 22:09:45] INFO :: :: PyTransport :: componentDisconnected :: {'self': 'instance'} ::
[2006-08-31 22:09:45] will retry in 2 seconds
[2006-08-31 22:09:45] Stopping factory
[2006-08-31 22:09:48] Starting factory
[2006-08-31 22:09:48] INFO :: :: PyTransport :: componentDisconnected :: {'self': 'instance'} ::
[2006-08-31 22:09:48] will retry in 3 seconds
==================================================
Вот, интересуюсь у вас: что бы это значило, и что теперь делать, чтоб все заработало?
plm wrote: ... {5347,
...
{5347, ejabberd_service, [{access, all}, host, "1.2.3.4", [{password, "mypassword"}]]}
...
Синтаксическая ошибка конфига. Читайте документацию внимательнее. Надо так:
{5347, ejabberd_service, [{access, all}, {host, "icq.1.2.3.4", [{password, "mypassword"}]}]}
О! Спасибо -
О! Спасибо - сервис появился.