Menu

#4059 miniserv error and process closes after login

1.580
closed-fixed
5
2014-08-28
2012-02-21
luison
No

Been using webmin for long years. On a virtualized system one of the virtual machines on Debian 6 webmin stopped working suddenly after a restart with no apparently package update o major change.

We start webmin:
Login page appears with no styles and inmediately the miniserv processes exit.

We believe it has to do something with some other system update or permissions that appeared after the reboot. The host machine runs wbemin fine. Another VM on the same system with a a similar setup and Debian also works fine.

We've restored previous days machines, reinstalled webmin packages and perl libs, etc with no success.

No error on syslog.

miniserv.error:
[21/Feb/2012:18:37:19 +0100] PAM authentication enabled
Failed to initialize SSL connection
Failed to initialize SSL connection
Failed to initialize SSL connection
Can't call method "add" on an undefined value at /usr/share/webmin/miniserv.pl line 5448.

miniserv.debug:
miniserv.pl starting ..
Reading crons from /etc/webmin/webmincron/crons
adding cron id=12898177655301 module=system-status func=scheduled_collect_system_info
adding cron id=12898177645145 module=cron func=cleanup_temp_files
Running cron id=12898177655301 module=system-status func=scheduled_collect_system_info
Running cron id=12898177645145 module=cron func=cleanup_temp_files
main: inline EOF
main: inline EOF
main: inline EOF
main: Starting handle_request loop pid=2019
handle_request: from 46.XXX.XXX.XXX to 10.0.0.101 ipv6=0
handle_request: passed IP checks
handle_request: passed timeout check
handle_request reqline=GET / HTTP/1.1
handle_request: got headline Host: s11.alsur.es:10101
handle_request: got headline Connection: keep-alive
handle_request: got headline User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11
handle_request: got headline Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
handle_request: got headline Accept-Encoding: gzip,deflate,sdch
handle_request: got headline Accept-Language: es-ES,en-GB;q=0.8,es;q=0.6,en;q=0.4
handle_request: got headline Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
handle_request: got headline Cookie: sid=97955aa544f6324295e4e25fdcf84a1e; EMBPERL_UID=b682439c958d495c3b2393d05bb160cd; PVEAuthCookie=root::root::1329845061::8b574ae5da4ae$
handle_request: Need authentication
main: inline verify 97955aa544f6324295e4e25fdcf84a1e 0
handle_request: page=/session_login.cgi simple=/session_login.cgi
handle_request: initial full=
handle_request: full=/usr/share/webmin/session_login.cgi
handle_request: executing CGI
REMOTE_USER =
BASE_REMOTE_USER =
main: Done handle_request loop pid=2019
main: Starting handle_request loop pid=2020
handle_request: from 46.XXX.XXX.XXX to 10.0.0.101 ipv6=0
handle_request: passed IP checks
handle_request: passed timeout check
handle_request reqline=GET /unauthenticated/style.css HTTP/1.1
handle_request: got headline Host: XXX.XXXXX.XX:10101
handle_request: got headline Connection: keep-alive
handle_request: got headline User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11
handle_request: got headline Accept: text/css,*/*;q=0.1
handle_request: got headline Referer: https://xxx.xxxxx.xxx:10101/
handle_request: got headline Accept-Encoding: gzip,deflate,sdch
handle_request: got headline Accept-Language: es-ES,en-GB;q=0.8,es;q=0.6,en;q=0.4
handle_request: got headline Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
handle_request: got headline Cookie: sid=97955aa544f6324295e4e25fdcf84a1e; EMBPERL_UID=b682439c958d495c3b2393d05bb160cd; PVEAuthCookie=root::root::1329845061::8b574ae5da4ae$
handle_request: Need authentication

And then nothing... miniserv stopped running and nothing listening to 10000

Completely lost now and no idea how to proceed.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2012-02-21

    Try running :

    /etc/webmin/stop
    strace -o /tmp/strace.out -f /etc/webmin/start

    Then try a login, and after webmin crashes attach the file /tmp/strace.out to this bug report.

     
  • luison

    luison - 2012-02-22

    strace.out requested

     
  • luison

    luison - 2012-02-22

    Requested trace attached as requested. Thanks.

     
  • Jamie Cameron

    Jamie Cameron - 2012-02-22

    Ok, I think I see the issue .. does your system have the MD5 or Digest::MD5 perl modules installed?

    You can check by running the following commands :

    perl -e "use MD5"

    perl -e "use Digest::MD5"

    Let me know what they output.

     
  • luison

    luison - 2012-02-22

    Thanks for the quick response. We did thought about MD5 and/or some Perl libs but we did compare /usr/share/perl and perl5 dirs with a working one and didn't find any major issues. We also tried addind MD5 perl libs but only via aptitude.

    perl -e "use MD5" or perl -e "use MD5" DO NOT return anything, which I believe means they are available, no?

     
  • Jamie Cameron

    Jamie Cameron - 2012-02-23

    Ok, it looks like maybe the MD5

     
  • Jamie Cameron

    Jamie Cameron - 2012-02-23

    Ok, it looks like maybe the MD5 perl module is installed, but not working.

    Could you try running the following command and posting the output :

    perl -e 'use MD5; $dummy = new MD5; $dummy->add("foo")'

     
  • luison

    luison - 2012-02-23

    root@box1:/# perl -e "use MD5"
    root@box1:/# perl -e 'use MD5; $dummy = new MD5; $dummy->add("foo")'
    Can't locate object method "new" via package "MD5" (perhaps you forgot to load "MD5"?) at -e line 1.

     
  • luison

    luison - 2012-02-23

    We've now figured out that as you mentioned something to do with the module is causing the issue, although we are still not sure how or why it would only show up after a system restart.

    This is where we track it to so far, see if it gives you any clues as we are completely lost now:

    After your comments regarding MD5 we tried reinstalling certain libs:
    apt-get install libdigest-md5-file-perl
    apt-get install libcrypt-passwdmd5-perl

    We also tried
    apt-get install --reinstall libdigest-md5-perl
    which is part of Perl itself in Debian 6.

    We also tried reinstalling MD5 libs via CPAN shell as well as upgrading.

    We then figured out comparing files from another working system that there was a difference with a symlink:

    /usr/lib/perl/5.10/MD5.pm
    pointing to
    /usr/lib/perl/5.10/Digest/MD5.pm

    This is a requirement of a Perl cgi-bin script we use via Apache, that on the other hand, we've had for years on various systems.

    Removing this and restarting webmin makes it work although on the other working VM we have exactly this same setup with no issues.

    At a certain point we pointed the link to the updated version via CPAN shell that isntalls to /usr/local/lib/perl/5.10.1/Digest/MD5.pm (local/lib instead of lib/) and sudenly (not sure at what point) everything was working well. We tested a restart of the machine and on return Webmin fails again as soon as we connect to it via web.

    The debug from our apache software when we remove the link is:
    ERROR: MD5 not found: Digest::MD5 object version 2.51 does not match bootstrap parameter 2.39 at /usr/lib/perl/5.10/MD5.pm line 24. Compilation failed in require at (eval 6) line 3.

    And as mentioned earlier on another system with the same setup the link to MD5.pm does not cause any issues to Webmin.
    We have the impression something odd with the installation of the Perl modules either via Debian packages or CPAN is causing the issue, but we are completely lost now, as that is a vital cgi script we need.

     
  • luison

    luison - 2012-02-23

    Forgot to mention... this means that when Webmin works I get:

    root@box1:/# perl -e "use MD5"

    Can't locate MD5.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/loca l/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.1 0 /usr/local/lib/site_perl .) at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.

     
  • Jamie Cameron

    Jamie Cameron - 2012-02-23

    Ok, that explains it .. the problem is that Webmin looks for a Perl module called "MD5" to perform md5 hashing, and when it finds one assumes that it actually works. Later on when it tries to use the module, it fails and terminates the Webmin process.

    I have just created a 1.581 development version which you will be able to download from http://www.webmin.com/devel.html shortly which fixes this issue. You can then safely restore the MD5.pm symlink, and restart Webmin.

     
  • Jamie Cameron

    Jamie Cameron - 2012-02-23
    • status: open --> closed-fixed
     
  • luison

    luison - 2012-02-24

    Not sure why it happened now, but the update worked great.
    Many thanks for your help.

     

Log in to post a comment.