mod_register_web

Где-то, что-то пошло не так.

Сервер 2.0.1.
Настроил mod_register_web согласно инструкции.
Перезапустил сервер.
Во время подключения https://example.org:5281/register/ принимаю сертификат.
И ВСЕ. Кроме сертификата больше ничего не передается, на экране пусто.

Куда смотреть?

ejabberd.log sasl.log ?

Sorry, I don't understand russian.

Acid Burn wrote:

Куда смотреть?

ERROR REPORT ---> ejabberd.log sasl.log ?

##ejabberd.log## I(<0.256.0>:

##ejabberd.log##
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.422>) Accepted connection {{172,21,8,60},2039} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.438>) Accepted connection {{172,21,8,60},2040} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.456>) Accepted connection {{172,21,8,60},2041} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.476>) Accepted connection {{172,21,8,60},2042} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.480>) Accepted connection {{172,21,8,60},2043} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.484>) Accepted connection {{172,21,8,60},2045} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.492>) Accepted connection {{172,21,8,60},2046} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.496>) Accepted connection {{172,21,8,60},2047} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.516>) Accepted connection {{172,21,8,60},2051} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.560>) Accepted connection {{172,21,8,60},2054} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.660>) Accepted connection {{172,21,8,60},2062} -> {{172,21,2,35},5281}
I(<0.256.0>:ejabberd_listener:112) : (#Port<0.696>) Accepted connection {{172,21,8,60},2063} -> {{172,21,2,35},5281}
I(<0.5281.0>:ejabberd_service:115) : ({socket_state,gen_tcp,#Port<0.5083>,<0.5280.0>}) External service connected
I(<0.5281.0>:ejabberd_service:352) : terminated: normal
I(<0.266.0>:ejabberd_listener:112) : (#Port<0.5281>) Accepted connection {{127,0,0,1},38085} -> {{127,0,0,1},5347}
I(<0.5485.0>:ejabberd_service:115) : ({socket_state,gen_tcp,#Port<0.5281>,<0.5484.0>}) External service connected
I(<0.15281.0>:ejabberd_service:115) : ({socket_state,gen_tcp,#Port<0.14789>,<0.15280.0>}) External service connected
I(<0.15281.0>:ejabberd_service:352) : terminated: normal
I(<0.266.0>:ejabberd_listener:112) : (#Port<0.15281>) Accepted connection {{127,0,0,1},60009} -> {{127,0,0,1},5347}
I(<0.15789.0>:ejabberd_service:115) : ({socket_state,gen_tcp,#Port<0.15281>,<0.15788.0>}) External service connected

##sasl.log##
=PROGRESS REPORT==== 29-May-2008::21:27:05 ===
supervisor: {local,ejabberd_listeners}
started: [{pid,<0.268.0>},
{name,5281},
{mfa,
{ejabberd_listener,start,
[5281,ejabberd_http,
[tls,
{certfile,"/opt/ejabberd/conf/ssl.pem"},
{request_handlers,
[{["register"],mod_register_web}]}]]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]

empty page

Hello all,

I got an empty page too when browsing http://jabberdomain.tld:5280/register/

I use ejabberd 2.0.3 Debian with the latest mod_register_web for ejabberd 2.0.x from SVN and configured the request handler to the standard ejabberd_httpd on port 5280. But it does not work with an alternative ejabberd_httpd on port 5281 either. I did not try tls for ejabberd_httpd, is this maybe mandatory?

Help would be appreciated! :-)

Regards,
Martin

Try the new mod_register_web 2.0.x branch

Roi wrote:

I use ejabberd 2.0.3 Debian with the latest mod_register_web for ejabberd 2.0.x from SVN

For mod_register_web there is only trunk directory, and it said to work with ejabberd 2.0.2. This is incorrect, that's why it didn't work for you.

mod_register_web trunk requires a recent ejabberd trunk SVN. I've fixed the README.

For your case, I've created a 2.0.x branch of mod_register_web that compiles and works correctly with ejabberd 2.0.3.

Re: Try the new mod_register_web 2.0.x branch

Ah I see, thank you very much. I replaced the module and it works now! :-) Thank you very very much!

Hi, let's try in english I

Hi, let's try in english
I can see the dialog of sertificate, but when I try to apply it - it shows me empty web page

Found problem, need to patch ejabberd

Acid Burn wrote:

I can see the dialog of sertificate, but when I try to apply it - it shows me empty web page

Strange: your logs don't show error messages.

I tried ejabberd 2.0.1 + mod_register_web and I get the same problem than you! I see in my logs:

=CRASH REPORT==== 31-May-2008::20:04:58 ===
  crasher:
    pid: <0.349.0>
    registered_name: []
    exception error: undefined function ejabberd_web:make_xhtml/2
...

I forgot this module requires a change in ejabberd.
Solutions:

  • You can apply this patch to ejabberd 2.0.1 to use the module.
  • That module will work correctly with ejabberd 2.0.2 (not yet released).
--- src/web/ejabberd_web.erl
+++ src/web/ejabberd_web.erl
@@ -28,7 +28,7 @@
 -author('alexey@process-one.net').
 
 %% External exports
--export([make_xhtml/1,
+-export([make_xhtml/1, make_xhtml/2,
          error/1]).
 
 -include("ejabberd.hrl").
@@ -42,12 +42,16 @@
 %% that third parties can use ejabberd_web as an "utility" library.
 
 make_xhtml(Els) ->
+    make_xhtml([], Els).
+
+make_xhtml(HeadEls, Els) ->
     {xmlelement, "html", [{"xmlns", "http://www.w3.org/1999/xhtml"},
 			  {"xml:lang", "en"},
 			  {"lang", "en"}],
      [{xmlelement, "head", [],
        [{xmlelement, "meta", [{"http-equiv", "Content-Type"},
-			      {"content", "text/html; charset=utf-8"}], []}]},
+			      {"content", "text/html; charset=utf-8"}], []}
+	| HeadEls]},
       {xmlelement, "body", [], Els}
      ]}.
 

mod_register_web - not work.

Ejabberd 2.0.2_2 - ejabberd-2.0.2_2-linux-x86_64-installer.bin

If call https://temp.ru:5281/register/ - I show empty web page.

mod_register_web - SVN 11/01/09

Log sasl.log:

=CRASH REPORT==== 12-Jan-2009::13:22:46 ===
  crasher:
    pid: <0.352.0>
    registered_name: []
    exception error: bad argument
      in function  apply/3
         called as apply("/usr/local/ejabberd/lib/ejabberd-2.0.2_2/ebin/mod_register_web",
                         process,[])
      in call from ejabberd_http:process/2
      in call from ejabberd_http:process_request/1
      in call from ejabberd_http:process_header/2
      in call from lists:foldl/3
      in call from ejabberd_http:receive_headers/1
    initial call: ejabberd_http:receive_headers({state,tls,
                                                 {tlssock,#Port<0.411>,
                                                  #Port<0.412>},
                                                 undefined,undefined,
                                                 undefined,undefined,
                                                 undefined,undefined,"en",
                                                 [{["register"],
                                                   "/usr/local/ejabberd/lib/ejabberd-2.0.2_2/ebin/mod_register_web"}],
                                                 false,[]})
    ancestors: [ejabberd_http_sup,ejabberd_sup,<0.37.0>]
    messages: []
    links: [<0.254.0>,#Port<0.411>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 4181
    stack_size: 23
    reductions: 1577
  neighbours:

=SUPERVISOR REPORT==== 12-Jan-2009::13:22:46 ===
     Supervisor: {local,ejabberd_http_sup}
     Context:    child_terminated
     Reason:     badarg
     Offender:   [{pid,<0.352.0>},
                  {name,undefined},
                  {mfa,
                      {ejabberd_http,start_link,
                          [{gen_tcp,#Port<0.411>},
                           [tls,
                            {certfile,"/usr/local/ejabberd/conf/server.pem"},
                            {request_handlers,
                                [{["register"],
                                  "/usr/local/ejabberd/lib/ejabberd-2.0.2_2/ebin/mod_register_web"}]}]]}},
                  {restart_type,temporary},
                  {shutdown,brutal_kill},
                  {child_type,worker}]

Show lines in ejabberd.cfg

Can you show here the lines that you added in ejabberd.cfg to {listen, and {modules ?

mod_register_web + ejabberd 2.0.5

=SUPERVISOR REPORT==== 17-Jun-2009::20:59:17 ===
     Supervisor: {local,ejabberd_http_sup}
     Context:    child_terminated
     Reason:     function_clause
     Offender:   [{pid,<0.19034.0>},
                  {name,undefined},
                  {mfa,
                      {ejabberd_http,start_link,
                          [{gen_tcp,#Port<0.21711>},
                           [{request_handlers,
                                [{["register"],mod_register_web}]}]]}},
                  {restart_type,temporary},
                  {shutdown,brutal_kill},
                  {child_type,worker}]

I got an empty page too when browsing https://www.xmpp.kz:5281/register/
ejabberd 2.0.5
Help would be appreciated!

Regards, Victor

Blank Page Help

Hi,
I have ejabberd version 2.0.3-1 installed on a 64 bit Ubuntu Jaunty Server machine.

I am getting the same blank page problem. I tried the 2.0.x branch as well as the trunk version of mod_register_web to no avail.

Any help would be greatly appreciated and thank you for all of the great work!
Rob

Can you show the lines you

Can you show the lines you added in ejabberd.cfg? And can you check and show if you get any ERROR or CRASH messages in ejabberd.log or sasl.log, when ejabberd is started or when you try to access the page?

Syndicate content