I've had an installation of Ejabberd with JWChat working on the same machine under (I think) Debian Woody... BUT I had to rebuild the server (after I broke it installing egroupware... but that's another story)..
So, having remembered that Ejabberd was a nice and easy install I thought, come back here, follow the install tutorial and it should be nice...
No such joy...
I've followed the tutorial to the letter, but I can't get into ejabberd or jwchat at all..
I can stop and start the server nicely, I can check on the status, using ejabberctl status.
BUT I can't register a user, or get into webadmin...
If I try registering a user I get this:
ukec4deb1:/etc/apache2# ejabberdctl --node ejabberd@ukec4deb1 register argon0 jabber.crystaleu.net argon0 Can't register user "argon0@jabber.crystaleu.net" at node ejabberd@ukec4deb1: {'EXIT', {badarg, [{erlang, port_control, [stringprep_port,1,"jabber.crystaleu.net"]}, {stringprep,control,2}, {jlib,nameprep,1}, {ejabberd_auth,try_register,3}, {rpc,'-handle_call/3-fun-0-',6}]}}
My ejabberd.cfg file is below. My server is called ukec4deb1, on the uk.crystaleu.net domain. I have set up a hosts entry for jabber.crystaleu.net for this machine.
Any Ideas anyone?
% Default Debian ejabberd.cfg %override_acls. % Users that have admin access. Add line like one of the following after you % will be successfully registered on server to get admin access: %{acl, admin, {user, "aleksey"}}. {acl, admin, {user, "argon0"}}. % Blocked users: %{acl, blocked, {user, "test"}}. % Local users: {acl, local, {user_regexp, ""}}. % Another examples of ACLs: %{acl, jabberorg, {server, "jabber.org"}}. %{acl, aleksey, {user, "aleksey", "jabber.ru"}}. %{acl, test, {user_regexp, "^test"}}. %{acl, test, {user_glob, "test*"}}. % Only admins can use configuration interface: {access, configure, [{allow, admin}]}. % Every username can be registered via in-band registration: {access, register, [{allow, all}]}. % None username can be registered via in-band registration: %{access, register, [{deny, all}]}. % After successful registration user will get message with following subject % and body: {welcome_message, {"Welcome!", "Welcome to Debian Jabber Service. " "For information about Jabber visit http://jabber.org"}}. % Replace them with 'none' if you don't want to send such message: %{welcome_message, none}. % List of people who will get notifications about registered users %{registration_watchers, ["admin1@localhost", % "admin2@localhost"]}. % Only admins can send announcement messages: {access, announce, [{allow, admin}]}. % Only non-blocked users can use c2s connections: {access, c2s, [{deny, blocked}, {allow, all}]}. % Set shaper with name "normal" to limit traffic speed to 1000B/s {shaper, normal, {maxrate, 1000}}. % Set shaper with name "fast" to limit traffic speed to 50000B/s {shaper, fast, {maxrate, 50000}}. % For all users except admins used "normal" shaper {access, c2s_shaper, [{none, admin}, {normal, all}]}. % For all S2S connections used "fast" shaper {access, s2s_shaper, [{fast, all}]}. % Admins of this server are also admins of MUC service: {access, muc_admin, [{allow, admin}]}. % All users are allowed to use MUC service: {access, muc, [{allow, all}]}. % This rule allows access only for local users: {access, local, [{allow, local}]}. % Authentication method. If you want to use internal user base, then use % this line: {auth_method, internal}. % For LDAP authentication use these lines instead of above one: %{auth_method, ldap}. %{ldap_servers, ["localhost"]}. % List of LDAP servers %{ldap_uidattr, "uid"}. % LDAP attribute that holds user ID %{ldap_base, "dc=example,dc=com"}. % Search base of LDAP directory %{ldap_rootdn, "dc=example,dc=com"}. % LDAP manager %{ldap_password, "******"}. % Password to LDAP manager % For authentication via external script use the following: %{auth_method, external}. %{extauth_program, "/path/to/authentication/script"}. % For authentication via ODBC use the following: %{auth_method, odbc}. %{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}. % Host(s) name: (replace for your hostname(s)) % Old {host, "localhost"}. option is equivalent to {hosts, ["localhost"]}. {hosts, ["localhost", "jabber.crystaleu.net"]}. % Default language for server messages {language, "en"}. % Listened ports: {listen, [{5222, ejabberd_c2s, [{access, c2s}, starttls, {certfile, "/etc/ssl/certs/ejabberd.pem"}, {shaper, c2s_shaper}]}, {5223, ejabberd_c2s, [{access, c2s}, tls, {certfile, "/etc/ssl/certs/ejabberd.pem"}, {shaper, c2s_shaper}]}, {5269, ejabberd_s2s_in, [{shaper, s2s_shaper}]}, {5280, ejabberd_http, [http_poll, web_admin]} ]}. % If SRV lookup fails, then port 5269 is used to communicate with remote server {outgoing_s2s_port, 5269}. % Used modules: {modules, [ {mod_announce, [{access, announce}]}, {mod_register, [{access, register}]}, {mod_roster, []}, {mod_shared_roster, []}, {mod_privacy, []}, {mod_configure, []}, {mod_configure2, []}, {mod_disco, [{extra_domains, ["users.jabber.org"]}]}, {mod_stats, []}, {mod_vcard, []}, {mod_offline, []}, {mod_echo, []}, {mod_private, []}, {mod_irc, []}, {mod_muc, [{access, muc}, {access_create, muc}, {access_admin, muc_admin}]}, {mod_pubsub, []}, {mod_time, []}, {mod_last, []}, {mod_version, []} ]}.
Oh, and if I try to telnet
Oh, and if I try to telnet to it on 5222 I get nothing - But if I check the processes (using Webmin) I can see it is listening on 30000 (and something e.g. 32771) I have telnetted to this address locally - and connect - but get thrown out after a few seconds.
AND I can't get to the webadmin screen either.
Argon0
if I try to telnet to it on
I tried this:
That's what I was hoping to
That's what I was hoping to try - (I read up about that in the Jabberd manual)....
I'll reply to your other post separately, once I've checked out the Log files.
Thanks
Argon0
I can stop and start the
Check the logs. It will have a lot of informational 'PROGRESS REPORT'. Look for 'ERROR REPORT' or other messages.
Log Files...
I can't find any....
Checking processes with Webmin I come up with this:
For process /usr/lib/erlang/erts-5.1/bin/beam -- -root /usr/lib/erlang -progname erl -- -home /var/lib/ejabberd -sname ejabberd -s ejabberd -kernel inetrc "/etc/ejabberd/inetrc" -ejabberd config "/etc/ejabberd/ejabberd.cfg" log_path "/var/log/ejabberd/ejabberd.log" -sasl sasl_error_logger {file,"/var/log/ejabberd/sasl.log"} -mnesia dir "/var/lib/ejabberd" -noshell -noinp_shell -noshell -noinput (PID 5738)
Which implies the logs should be in /var/logs/ejabberd but this directory is empty...
I'll check the permissions on that dir but don't think that's going to be the issue.
Argon0
Permissions are OK
I've checked permissions on the directories involved, and they are all very loose (i.e. 777).
If I try and start ejabberd using the erl command like so:
erl -pa /usr/lib/erlang/lib/ejabberd-0.9.8/ebin -sname jabber -s ejabberd
I get the followin output:
Erlang (BEAM) emulator version 5.1 [source]
Eshell V5.1 (abort with ^G)
(jabber@ukec4deb1)1>
=INFO REPORT==== 31-Oct-2005::10:16:57 ===
application: ejabberd
exited: "invalid return value from ejabberd_app:start(normal,[]) -> {'EXIT',\n {undef,\n [{mnesia,\n system_info,\n [extra_db_nodes]},\n {ejabberd_app,db_init,0},\n {ejabberd_app,start,2},\n {application_master,start_it_old,4}]}}"
type: temporary
Checking Status - I get nodedown..
HAYELP!!!
Check if Mnesia is installed
That error indicates that the Mnesia library (included in Erlang/OTP) was not available for ejabberd to use it.
If you compiled Erlang from source, check that the Mnesia library files were compiled and installed. In my computer I have 29 *.beam files:
If they are installed, check if Erlang can load and start it:
OK, I have now gone back to
OK, I have now gone back to scratch - uninstalled everything to do with Ejabberd, and followed the tutorial to do everything from source, including installing erlang, and Ejabberd...
Now I'm stuck again...
I have mnsesia installed (I get the same response as you get above).
When I run the start command from the tutorial I just get a new line...
(no ejabberd process running when I check processes though).
If I remove the -detached I get an error about long name, so I change the tag to -sname ejabberd and then I get this:
=INFO REPORT==== 1-Nov-2005::12:16:45 ===
application: ejabberd
exited: "invalid return value from ejabberd_app:start(normal,[]) -> {'EXIT',\"no such file or directory\"}"
type: temporary
Which is probable to do with the lack of ejabberd.cfg
Where should all the files be following the install from source..
And what should path point to in order to enable everything...
Thanks for your help
Argon0
Ah,well, I'm getting
Ah,well, I'm getting somewhere, when I point the start up line at somewhere I KNOW there is a "valid" ejabberd.cfg file (i.e.
su ejabberd -c "erl -s ejabberd -name ejabberd -ejabberd config '\"/etc/ejabberd/ejabberd.cfg\"'") it doesn't error.
From an alternative console I can now kick off a telnet localhost 5222 and get connected AND get some xml sent back to me when I type anything (good jabber behaviour)....
Hmmm - well it looks like I've got it working... Now I just need to know where all the files "Should" be, and how to get ejabberdctl to work (it doesn't recognise my server, despite me knowing its up, and being in the admin page!)...
Also how to get ejabberd to launch on server start... But that can't be too diccifult.. But I also need to know how to "stop" the service (without ejabberdctl working - well I can at least do that from the admin interface!).
where all the files "Should"
Check if the explanation onBug #171 is clear enought.
ejabberdctl NODENAME COMMAND, where NODENAME is the Erlang node name. Check the ejabberd logs for the exact node name. It may be something like 'ejabberd@hostname'.
Writting a script and adding it to init.d. Download and look at the Debian package as an example.
Using ejabberdctl.
Thanks & Issues with the JWCHAT Tutorial
Following an e-mail exchange with Stefan Strigler (creator of JWCHAT(?)) I have identified an issue tiwh tht Tutorial for JWCHAT...
The Tutorial says:
#
Configure JWChat
Edit config.js to suit your needs. Particularly important are these options:
var JABBERSERVER = "jabber.mycompany.com"
var HTTPBASE = "http-poll/";
var DEFAULTCONFERENCEROOM = "talks";
var DEFAULTCONFERENCESERVER = "conference.jabber.mycompany.com";
#
In Stefan's words:
"Yes, configuration has changed slightly at this point as JWChat supports
choosing from more then one backend now (if more then one has been
configured). Thus HTTPBASE and JABBERSERVER have been replaced by a
BACKENDS array."
Thus tutorial needs amendment - at least for version 1.02Beta.
The Variables that NEED to be set are:
var SITENAME = "jabber.company.com";
var DEFAULTRESOURCE = "jwchat";
The rest should be
Argon0
P.s. will post this as a new topic as well.
File Locations & ejabberdctl
Well, no, not really - a list of directories would be helpful...
At the moment my files are spread around in some odd places - the only "standard" one seems to be /etc/ejabberd/ejabberd.cfg
(for instance ejabberdctl is in "/ejabberd/ejabberd/tools", and I've had to add a path line to get it to launch...
As to running ejabberdctl...
I get this when running it from the tools dir:
"{"init terminating in do_boot",{undef,[{ejabberd_ctl,start,[]},{init,start_it,1},{init,start_em,1}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
"
And nothing (except the help page) when I run it from the src dir (/ejabberd/ejabberd/src).. Checking the ejabberd.log file I see this at the time I try and run ejabberdctl:
=ERROR REPORT==== 2005-11-02 11:57:04 ===
** Connection attempt from disallowed node ejabberdctl@ukec4deb1 **
Anything I can do?
Argon0
a list of directories would
I think this is the right way to exec it.
Try executing ejabberdctl with the same system user that executes ejabberd.
Thanks, that works
Yup using the command:
su ejabberd -c "../tools/ejabberdctl ejabberd@ukec4deb1 status"
FROM the src directory works...
So now I need to write a script to do that and to take pass the variables I want it to use...
Hmmmm
need to work out how to write a script now - can't be too different from batch scripts in DOS...
Argon0