Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#425 Minix FAILED with not defined Socket macro SOMAXCONN

1.500
open
nobody
Minix (1)
5
2014-03-26
2014-03-22
Zoltan Arpadffy
No

Hello

On a Minix system: Minix minix.polarhome.com 3.2.1 i686
with perl:
bash-4.2# perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for i386-minix

Copyright 1987-2011, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

... the installation fails with the following output.

Operating system name: Generic Linux
Operating system version: 3.2


Usermin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- If the webserver should use SSL (if your system supports it).

Web server port (default 20000): 81
The Perl SSLeay library is not installed. SSL not available.


Creating web server config files..
hostname: not found
..done

Creating access control file..
..done

Inserting path to perl into scripts..
..done

Creating start and stop scripts..
..done

Copying config files..
at changepass chfn commands cron cshrc fetchmail file filter forward gnupg htaccess-htpasswd htaccess language mailbox mailcap man mysql plan postgresql proc procmail quota schedule shell spam ssh telnet theme tunnel updown usermount
..done

Creating uninstall script /etc/opt/usermin/uninstall.sh ..
..done

Changing ownership and permissions ..
..done

Attempting to start Usermin mini web server..
Starting Usermin server in /etc/opt/usermin-1.590
Pre-loaded WebminCore
Your vendor has not defined Socket macro SOMAXCONN, used at /etc/opt/usermin-1.590/miniserv.pl line 568
ERROR: Failed to start web server!

Is there anything I can do to make it work?

Thank you.

Regards,
Z

Discussion

  • Jamie Cameron
    Jamie Cameron
    2014-03-23

    I have no idea, sorry ... Minix is not a supported operating system in Webmin.

    You may need to ask the Perl developers why SOMAXCONN is not defined, as it is on all other Unix-like systems.

     
  • Hello Jamie,

    Minix is not a supported operating system

    Yes, I am aware of that... but after some puzzle game I have succeded to run Usermin on Minix version 3.2.1

    First issue was to solve the "not defined Socket macro SOMAXCONN" problem.
    Indeed it is not defined on Minix for some reason and I relpaced with a constant 128 in miniserv.pl's listen calls - like:

    listen($fh, 128);

    This is a dirty workaround and if you decide to implement this should be coded more nicely.

    This is change based on /usr/include/sys/socket.h files found on the most OS-es:

    /
    * Maximum queue length specifiable by listen.
    /
    (hash)define SOMAXCONN 128

    With these changes the miniserv starts.

    Second issue was to configure the authentication and the modules to reflect the Minix environment.

    Minix userspace is very similar to NetBSD's and it uses netbsd ports too.
    After changing some paths and config... it workes perfect.

    Please, find attached the config files in usermin-minix-1.590.tar.gz

    I have not created a patch for oschooser.pl, os_list.txt - it is better that a professional does, but I can provide the following information:

    bash-4.2# uname -n
    minix.polarhome.com
    bash-4.2# uname -r
    3.2.1
    bash-4.2# uname -v
    3.2.1
    bash-4.2# uname -m
    i686
    bash-4.2# uname -p
    i386
    bash-4.2# uname -a
    Minix minix.polarhome.com 3.2.1 i686

    as well as there is a /etc/version file that could be useful to detect the OS

    bash-4.2# cat /etc/version
    3.2.1, SVN revision , generated Fri Feb 15 11:34:15 GMT 2013

    Hope, Jamie, you would be able to merge these changes to the next release.

    Thank you.

    Best regards,
    Z

     
    Last edit: Zoltan Arpadffy 2014-03-25
  • Jamie Cameron
    Jamie Cameron
    2014-03-25

    Is SOMAXCONN defined to be 128 on all operating systems though? Hard-coding it could cause the wrong listen queue size to be used on non-Minix systems.

     
  • Hmmm not on all systems.
    I have found a range up to 4096 (on HPUX).
    I would recoomend to test if SOMAXCONN is defined. If not (or it is explicitly an Minix system) define to 128.

    Thanks,
    Z

     
  • Thank you Jamie.
    This looks perfect.

    Please, let me know if you have implemented the rest of Minix related changes - I am burning to test them.

    Thank you.
    Z

     
  • Jamie Cameron
    Jamie Cameron
    2014-03-26

    Which other Minix related changes were those?

    If you have specific code changes, you can propose then via the webmin github.