I'd wish to install Epeios so that I can then run mod_profile with Openfire.
I've tried to install Epeios (without mod_profile first) on Ubuntu Feisty with erlang-1:11.b.2-4ubuntu1 and erlang-dev installed from APT, but unsuccessfully.
Here's the full installation :
$ cd /opt
$ sudo mkdir /opt/epeios-1.0.0
$ sudo chown -R kael epeios-1.0.0/
$ chmod u+rwx -R epeios-1.0.0/
$ svn co
...
Checked out revision 494.
$ export EPEIOS_ROOT=/opt/epeios-1.0.0/
$ cd epeios-1.0.0
$ vim sys.config.mk
[
%% Please, use an absolute lib path matching your actual configuration
%% Epeios container configuration:
{epeios, [{epeios_name, "epeios.domain.tld"},
{epeios_server_host, "localhost"},
{epeios_server_port, 8888},
{epeios_secret, "secret"},
{epeios_module, "mod_pubsub"},
{epeios_host_config, []},
{epeios_db_path, "database"},
{epeios_lib_path, "/opt/epeios-1.0.0/lib/darwin-x86"}]},
%% Logging configuration:
{kernel, [{error_logger, {file, "logs/epeios_app.log"}},
{start_ddll, true},
{start_disk_log, false},
{start_os, true},
{start_pg2, true},
{start_timer, true}]},
{sasl, [{sasl_error_logger, {file, "logs/epeios_sasl_log"}}]}
].
$ ./build.sh
Recompile: src/ejabberd
Recompile: src/ejabberd_config
Recompile: src/ejabberd_router
Recompile: src/epeios_app
Recompile: src/epeios_config
Recompile: src/epeios_services
Recompile: src/epeios_sup
Recompile: src/xmpp_component
pushed 1st report level verbose(2)
[builder:608] systools:make_script() -> ok
$ priv/epeios.start
Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [kernel-poll:false]
Eshell V5.5.2 (abort with ^G)
1> {"Kernel pid terminated",application_controller,"{application_start_failure,epeios,{shutdown,{epeios_app,start,[normal,[]]}}}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,epeios,{shutdown,{epeios_app,start,[normal,[]]}}})
$ vim logs/epeios_app.log
=ERROR REPORT==== 29-Jan-2008::22:28:11 ===
E(<0.48.0>:translate:58) : enoent
=INFO REPORT==== 29-Jan-2008::22:28:11 ===
application: epeios
exited: {shutdown,{epeios_app,start,[normal,[]]}}
type: permanent
$ vim logs/epeios_sasl.log
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.42.0>},
{name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.43.0>},
{name,overload},
{mfa,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.41.0>},
{name,sasl_safe_sup},
{mfa,{supervisor,
start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.44.0>},
{name,release_handler},
{mfa,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
application: sasl
started_at: nonode@nohost
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.53.0>},
{name,disk_log_sup},
{mfa,{disk_log_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.54.0>},
{name,disk_log_server},
{mfa,{disk_log_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.67.0>},
{name,mnesia_event},
{mfa,{mnesia_sup,start_event,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.69.0>},
{name,mnesia_monitor},
{mfa,{mnesia_monitor,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.70.0>},
{name,mnesia_subscr},
{mfa,{mnesia_subscr,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.71.0>},
{name,mnesia_locker},
{mfa,{mnesia_locker,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.72.0>},
{name,mnesia_recover},
{mfa,{mnesia_recover,start,[]}},
{restart_type,permanent},
{shutdown,180000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.76.0>},
{name,dets_sup},
{mfa,{dets_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.77.0>},
{name,dets},
{mfa,{dets_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.73.0>},
{name,mnesia_tm},
{mfa,{mnesia_tm,start,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.86.0>},
{name,mnesia_checkpoint_sup},
{mfa,{mnesia_checkpoint_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.87.0>},
{name,mnesia_snmp_sup},
{mfa,{mnesia_snmp_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.88.0>},
{name,mnesia_controller},
{mfa,{mnesia_controller,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.89.0>},
{name,mnesia_late_loader},
{mfa,{mnesia_late_loader,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.68.0>},
{name,mnesia_kernel_sup},
{mfa,{mnesia_kernel_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
application: mnesia
started_at: nonode@nohost
=CRASH REPORT==== 29-Jan-2008::22:28:11 ===
crasher:
pid: <0.92.0>
registered_name: stringprep
error_info: {{case_clause,{error,{open_error,-10}}},
[{stringprep,init,1},
{gen_server,init_it,6},
{proc_lib,init_p,5}]}
initial_call: {gen,init_it,
[gen_server,
<0.48.0>,
self,
{local,stringprep},
stringprep,
[],
[]]}
ancestors: [<0.48.0>]
messages: []
links: []
dictionary: []
trap_exit: false
status: running
heap_size: 377
stack_size: 21
reductions: 160
neighbours:
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,inet_gethost_native_sup}
started: [{pid,<0.96.0>},{mfa,{inet_gethost_native,init,[[]]}}]
=PROGRESS REPORT==== 29-Jan-2008::22:28:11 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.95.0>},
{name,inet_gethost_native_sup},
{mfa,{inet_gethost_native,start_link,[]}},
{restart_type,temporary},
{shutdown,1000},
{child_type,worker}]
=SUPERVISOR REPORT==== 29-Jan-2008::22:28:11 ===
Supervisor: {local,ejabberd_sup}
Context: start_error
Reason: {{badmatch,{error,{open_error,-10}}},
[{xmpp_component,start_xml_parser,1},
{xmpp_component,init,1},
{gen_fsm,init_it,6},
{proc_lib,init_p,5}]}
Offender: [{pid,undefined},
{name,xmpp_component},
{mfa,{xmpp_component,
start_link,
["epeios.domain.tld",
"localhost",
8888,
"secret",
mod_pubsub]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]
=CRASH REPORT==== 29-Jan-2008::22:28:11 ===
crasher:
pid: <0.47.0>
registered_name: []
error_info: {shutdown,{epeios_app,start,[normal,[]]}}
initial_call: {application_master,init,
[<0.5.0>,
<0.46.0>,
{appl_data,
epeios,
[ejabberd_sup],
undefined,
{epeios_app,[]},
[xmpp_component,
epeios_services,
epeios_config,
epeios_sup,
ejabberd_router,
ejabberd_config,
epeios_app,
ejabberd],
[],
infinity,
infinity},
normal]}
ancestors: [<0.46.0>]
messages: [{'EXIT',<0.48.0>,normal}]
links: [<0.46.0>,<0.5.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 233
stack_size: 21
reductions: 83
neighbours:
Apparently, the translate.beam file is not detected whereas it exists :
$ locate /opt/epeios*/translate
/opt/epeios-1.0.0/lib/.svn/text-base/translate.beam.svn-base
/opt/epeios-1.0.0/lib/.svn/prop-base/translate.beam.svn-base
/opt/epeios-1.0.0/lib/translate.beam
/opt/epeios-1.0.0/ebin/translate.beam
Wondering what I'm missing.
Any idea anyone ?
Thanks.
stringprep_drv.so
=CRASH REPORT==== 29-Jan-2008::22:28:11 ===
crasher:
pid: <0.92.0>
registered_name: stringprep
error_info: {{case_clause,{error,{open_error,-10}}},
[{stringprep,init,1},
{gen_server,init_it,6},
{proc_lib,init_p,5}]}
initial_call: {gen,init_it,
[gen_server,
<0.48.0>,
self,
{local,stringprep},
stringprep,
[],
[]]}
ancestors: [<0.48.0>]
messages: []
links: []
dictionary: []
trap_exit: false
status: running
heap_size: 377
stack_size: 21
reductions: 160
neighbours:
Here we see that the stringprep module couldn't load its shared library,
stringprep_drv.so
. Maybe setting the environment variableEJABBERD_SO_PATH
would help?Epeios + mod_profile : How to set up User-Profile ?
Here we see that the stringprep module couldn't load its shared library,
stringprep_drv.so
. Maybe setting the environment variableEJABBERD_SO_PATH
would help?Thank you very much for the clue.
The EPEIOS_ROOT path was correctly set, but the epeios_lib_path was uncorrectly set to :
{epeios_lib_path, "/opt/epeios-1.0.0/lib/darwin-x86"}
instead of :
{epeios_lib_path, "/opt/epeios-1.0.0/lib/linux-x86"}
I then copied mod_profile.erl in /opt/epeios-1.0.0/modules, launched epeios :
$ priv/epeios.start
Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [kernel-poll:false]
Eshell V5.5.2 (abort with ^G)
1>
and Epeios works and appears in the component session interface. Thank you very much. :)
Now, I'm searching how to use mod_profile with Epeios, following xmpp://jabber.se mod_profile :
<iq type='get'
to='kael@jabber.se'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
<iq from="kael@jabber.se" to="kael@example.net/Gajim" id="disco1" type="result">
<query xmlns="http://jabber.org/protocol/disco#info">
<identity category="pubsub" type="pep"/>
<feature var="vcard-temp"/>
<feature var="http://jabber.org/protocol/profile"/>
<feature var="http://jabber.org/protocol/commands"/>
</query>
</iq>
<iq type='get'
to='kael@jabber.se'
id='iq1'>
<profile xmlns='http://jabber.org/protocol/profile'/>
</iq>
<iq from="kael@jabber.se" to="kael@example.net/Gajim" id="iq1" type="result">
<x xmlns="jabber:x:data" type="result">
<field var="FORM_TYPE" type="hidden">
<value>http://jabber.org/protocol/profile</value>
</field>
<field var="nickname">
<value>Hamlet</value>
</field>
<field var="country">
<value>DK</value>
</field>
<field var="locality">
<value>Elsinore</value>
</field>
<field var="email">
<value>hamlet@denmark.lit</value>
</field>
</x>
</iq>
I queried disco#items and disco#info on example.net, kael @ example.net, epeios.example.net and kael @ epeios.example.net with both namespaces (the one used in the XEP and the other user by jabber.se), but I can't find how to upload a profile.
In sys.config.mk, I added a line :
{mod_profile, []},
But it doesn't seem enough, does it ?
What am I missing ?
And a last question : how to launch Epeios without process output, with a "nohup ... &" like ?
Cheers.
N.B.: I'm a not pro of Ejabberd and Erlang, though.
Hm...
I queried disco#items and disco#info on example.net, kael @ example.net, epeios.example.net and kael @ epeios.example.net with both namespaces (the one used in the XEP and the other user by jabber.se), but I can't find how to upload a profile.
In sys.config.mk, I added a line :
{mod_profile, []},
But it doesn't seem enough, does it ?
Hm… I really don't know much about Epeios, but I'm not sure if it's possible to use it for something like mod_profile, which handles requests on behalf of users. It's theoretically possible, but the protocol that Epeios uses (XEP-0114 ) doesn't allow a component to install an IQ handler in the server, as you've already noticed; even making the component respond on its own address would need some black magic, I guess…
And a last question : how to launch Epeios without process output, with a "nohup ... &" like ?
I prefer "screen" and detaching ☺ Running
erl
with the-detached
option might work, though.