can´t connect to ejabberd at localhost via client

Hi!

I used the linux-binary-installer to test ejabberd on my personal computer (ubuntu 6.06 i386).
The installation worked fine, even an admin-user was generatet.

I want to test it first, so i set localhost as host.

The Web-Admin-Login as constantin@localhost on http://localhost:5280/admin/ does it´s job and i could configure the server if i wanted to.

But the Problem is like i explained in the title: connection to the server via gaijm, gaim and psi doesn´t work.

For example Psi gives me this error: Bei der Kommunikation mit dem Jabber-Server ist ein Fehler aufgetreten. Details: XMPP-Stream-Fehler: Fehler (Generic stream error)

For those, who don´t understand german: While communication with the Jabber-Server a failure occured. Details: XMPP-Stream-Failure: Failure (Generic stream error)

Maybe my ejabberd.cfg would be helpfull. Here it is:

% $Id: $

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, "constantin"}}.

% Blocked users:
%{acl, blocked, {user, "test"}}.

% Local users:
{acl, local, {user_regexp, "constantin"}}.

% 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:
% You could replace {allow, all} with {deny, all} to prevent user from using in-band registration
{access, register, [{allow, all}]}.

% After successful registration user will get message with following subject
% and body:
%{welcome_message,
% {"Welcome!",
% "Welcome to Instant Messaging server localhost. "
% "For information about ejabberd visit http://www.process-one.net/"}}.
% 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, ["constantin@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}]}.

% Authentification method. If you want to use internal user base, then use
% this line:
{auth_method, internal}.

% For LDAP authentification 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 authentification via external script use the following:
%{auth_method, external}.
%{extauth_program, "/path/to/authentification/script"}.

% For authentification via ODBC use the following:
%{auth_method, odbc}.
%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.

% Host name:
{hosts, ["localhost"]}.

% Default language for server messages
% TODO: Use installer selection
{language, "de"}.

% Listened ports:
{listen, [
{5222, ejabberd_c2s, [{access, c2s},
{shaper, c2s_shaper}]},
%% Use this line to enable SSL:
%%{5223, ejabberd_c2s, [{access, c2s}, ssl, {certfile, "/home/constantin/ejabberd-1.1.1/conf/server.pem"}]},
%%
%% Use those lines instead for TLS support:
%%{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper},
%% starttls, {certfile, "/home/constantin/ejabberd-1.1.1/conf/server.pem"}]},
%% {5223, ejabberd_c2s, [{access, c2s},
%% tls, {certfile, "/home/constantin/ejabberd-1.1.1/conf/server.pem"}]},

%% Remove this line if you want to prevent s2s connections:
{5269, ejabberd_s2s_in, [{shaper, s2s_shaper}]},

%% remove http_poll to remove support for http polling
%% remove web_admin to disable admin interface:
{5280, ejabberd_http, [http_poll, web_admin]}
%% This is an example on how to define an external service/transport:
%% {8888, ejabberd_service, [{access, all},
%% {hosts, ["icq.localhost", "sms.localhost"],
%% [{password, "secret"}]}]}
]}.

% If SRV lookup fails, then port 5269 is used to communicate with remote server
{outgoing_s2s_port, 5269}.

% Used modules:
{modules,
[
{mod_register, [{access, register}]},
{mod_roster, []},
{mod_privacy, []},
{mod_adhoc, []},
{mod_configure, []}, % Depends on mod_adhoc
{mod_configure2, []},
{mod_disco, []},
{mod_stats, []},
{mod_vcard, []},
{mod_offline, []},
{mod_announce, [{access, announce}]}, % Depends on mod_adhoc
{mod_echo, [{host, "echo.localhost"}]},
{mod_private, []},
{mod_irc, []},
% Default options for mod_muc:
% host: "conference." ++ ?MYNAME
% access: all
% access_create: all
% access_admin: none (only room creator has owner privileges)
{mod_muc, [{access, muc},
{access_create, muc},
{access_admin, muc_admin}]},
{mod_pubsub, []},
{mod_time, []},
{mod_last, []},
%%{mod_xmlrpc,[{port, 4560},{timeout, 5000}]},
{mod_version, []},
{mod_shared_roster, []}
]}.

% Local Variables:
% mode: erlang
% End:

Trying to connect doesn´t leave anything inside the ejabberd-log.

While trying out i

While trying out i recognized, adding users with the ejabberd-web-interface doesn´t work. with ejabberdctl i can add users.

Re: While trying out i

donconso wrote:

While trying out i recognized, adding users with the ejabberd-web-interface doesn´t work. with ejabberdctl i can add users.

What error do you get?

i don´t get an error. Only

i don´t get an error. Only a blank side, when i try to submit the user and the password

I still got no idea, why i

I still got no idea, why i can´t connect to ejabberd with a jabber-client, so please tell me where to start searching.
Perhaps someone can find a mistake in my config, i posted in the first message. Or do you miss any information?

The only error message i get is from the client which tells me, there is a stream-error.

Thanks for answering

Re: I still got no idea, why i

donconso wrote:

Perhaps someone can find a mistake in my config, i posted in the first message. Or do you miss any information?

The config looks much like the default config. So I think it is ok.

donconso wrote:

The only error message i get is from the client which tells me, there is a stream-error.

Did you already tried to connect with telenet? How do you try to connect? Did you verified ejabberd is running? Do you see anything special in the logs?

telnet localhost 5222 Trying

telnet localhost 5222
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
^
Invalid XMLConnection closed by foreign host.

constantin@constantin-desktop:~$ telnet localhost 5280
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Connection closed by foreign host.

I try to login with gaim as constantin@localhost and the port 5222

ejabberd is running, as far as ejabberdctl tells me

Here are my newest logs:

=INFO REPORT==== 2006-06-24 23:26:49 ===
I(<0.212.0>:ejabberd_listener:90): (#Port<0.246>) Accepted connection {{127,0,0,1},54734} -> {{127,0,0,1},5280}

=INFO REPORT==== 2006-06-24 23:26:49 ===
I(<0.206.0>:ejabberd_http:76): started: {gen_tcp,#Port<0.246>}

=INFO REPORT==== 2006-06-24 23:28:43 ===
I(<0.212.0>:ejabberd_listener:90): (#Port<0.282>) Accepted connection {{127,0,0,1},54743} -> {{127,0,0,1},5280}

=INFO REPORT==== 2006-06-24 23:28:43 ===
I(<0.206.0>:ejabberd_http:76): started: {gen_tcp,#Port<0.282>}

=INFO REPORT==== 2006-06-24 23:28:43 ===
I(<0.278.0>:ejabberd_http:171): (#Port<0.282>) http query: 'GET' /admin

No connection by the port 5222 is listed, although i tried connecting (via telnet and gaim).

changed the port

i changed the c2s-Port to 1080 and connecting works fine and i´m happy.

The only problem i still have is that adding new users via webinterface still doesn´t work.

I will start a new thread for it.

I have the same problem in

I have the same problem in windows.
I didn't modify the ejabberd.cfg except "{acl, admin, {user, "admin"}}."

I added a user named "william" via ejabberdctl.
And I can see "william@localhost" through the port 5280.

but when i login with "william" in Tkabber,
the ejabberdctl told me that:

=ERROR REPORT==== 21-Jul-2006::11:05:12 ===
** Generic server <0.424.0> terminating
** Last message in was {tcp,{http_poll,<0.422.0>},
<<"">>}
** When Server state == {state,{http_poll,<0.422.0>},
ejabberd_http_poll,
none,
<0.423.0>,
infinity,
{xml_stream_state,
<0.423.0>,
#Port<0.451>,
[],
0,
infinity},
infinity}
** Reason for termination ==
** {badarg,[{erlang,binary_to_term,
[<<0,0,0,0,131,108,0,0,0,1,104,2,97,0,104,2,107,0,13,115,116
,114,101,97,109,58,115,116,114,101,97,109,108,0,0,0,5,104,2,107,0,12,120,109,108
,110,115,58,115,116,114,101,97,109,107,0,32,104,116,116,112,58,47,47,101,116,104
,101,114,120,46,106,97,98,98,101,114,46,111,114,103,47,115,116,114,101,97,109,11
5,104,2,107,0,5,120,109,108,110,115,107,0,13,106,97,98,98,101,114,58,99,108,105,
101,110,116,104,2,107,0,8,120,109,108,58,108,97,110,103,107,0,5,122,104,45,67,78
,104,2,107,0,2,116,111,107,0,9,108,111,99,97,108,104,111,115,116,104,2,107,0,7,1
18,101,114,115,105,111,110,107,0,3,49>>]},
{xml_stream,parse,2},
{ejabberd_receiver,process_data,2},
{ejabberd_receiver,handle_info,2},
{gen_server,handle_msg,6},
{proc_lib,init_p,5}]}

=CRASH REPORT==== 21-Jul-2006::11:05:12 ===
crasher:
pid: <0.424.0>
registered_name: []
error_info: {badarg,[{erlang,binary_to_term,
[<<0,0,0,0,131,108,0,0,0,1,104,2,97,0,104,2,10
7,0,13,115,116,114,101,97,109,58,115,116,114,101,97,109,108,0,0,0,5,104,2,107,0,
12,120,109,108,110,115,58,115,116,114,101,97,109,107,0,32,104,116,116,112,58,47,
47,101,116,104,101,114,120,46,106,97,98,98,101,114,46,111,114,103,47,115,116,114
,101,97,109,115,104,2,107,0,5,120,109,108,110,115,107,0,13,106,97,98,98,101,114,
58,99,108,105,101,110,116,104,2,107,0,8,120,109,108,58,108,97,110,103,107,0,5,12
2,104,45,67,78,104,2,107,0,2,116,111,107,0,9,108,111,99,97,108,104,111,115,116,1
04,2,107,0,7,118,101,114,115,105,111,110,107,0,3,49>>]},
{xml_stream,parse,2},
{ejabberd_receiver,process_data,2},
{ejabberd_receiver,handle_info,2},
{gen_server,handle_msg,6},
{proc_lib,init_p,5}]}
initial_call: {gen,init_it,
[gen_server,
<0.216.0>,
<0.216.0>,
ejabberd_receiver,
[{http_poll,<0.422.0>},
ejabberd_http_poll,
none,
infinity,
<0.423.0>],
[]]}
ancestors: [ejabberd_receiver_sup,ejabberd_sup,<0.41.0>]
messages: [{'$gen_cast',close}]
links: [<0.216.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 21
reductions: 178
neighbours:

And in Tkabber,The Raw XML is:

OUT(2,william@localhost/TkabberP):
〈stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='zh-CN' to='localhost' version='1.0'〉

What's the problem?have some ideas?

Maybe it's the same problem

Maybe it's the same problem than this.

badlop,thank you!

Yes,Just it!

I spent 2 days to resolve it.
I looked for every document that maybe provides the solution.
but i'm failed.:(
so sad!

badlop is great!thanks for giving the directions.

Syndicate content