[Resolved] IPv6 bugs.

Discussion in 'Bug Reports' started by envygeeks, Nov 3, 2009.

  1. envygeeks

    envygeeks New Member

    There are a few bugs in your application of IPv6 which I hope you will fix rather quickly as IPv6 is very important to us.

    Problem: Inability to set "IPv6" address in virtual host listeners and apply it to real world.
    Example: example.com, www.example.com, [2001:1::2]
    Result: 404 for http://[2001:1::2]
    Comparison: IPv4 works by application and testing, theoretically IPv6 should too.
    Where [2001:1::2] would be the actual IPv6 IP.

    Problem: Litespeed web server does not wait long enough before trying to listen again.
    Example: Restarting an IPv6 based web server results in the IPv6 listener not being started but IPv4 starting.
    Result: Failure
    Temporary Fix: Cycling then recycling again in 5 seconds (approximate)
    Last edited by a moderator: Apr 6, 2010
  2. Xorlev

    Xorlev New Member

    I would also like to see these bugs fixed. I've been transitioning my sites to IPv6 as well.
  3. mistwang

    mistwang LiteSpeed Staff

    add this to our to-do list.
  4. raphidae

    raphidae New Member

    I have also noticed this. As our network is native IPv6 a solution would be nice.

    Now I fixed it with a set of wrapper/check scripts.
  5. mistwang

    mistwang LiteSpeed Staff

    Latest 4.0.12 build should fix this. Please try a manual upgrade.
  6. raphidae

    raphidae New Member

    4.0.13 (FreeBSD 8-STABLE) still has the ipv6 listener problem:

    2010-04-01 00:08:29.428 [ERROR] [config:admin:listener:localadminlistener-6] failed to start SSL listener on address [2001:610:722:0:217:195:117:160]:280!
    2010-04-01 00:08:29.744 [ERROR] HttpListener::start(): Can't listen at address virasena.mediamonks.net-6: Address already in use!
    2010-04-01 00:08:29.744 [ERROR] HttpServer::addListener(virasena.mediamonks.net-6) failed to create new listener
    2010-04-01 00:08:29.744 [ERROR] [config:server:listener:virasena.mediamonks.net-6] failed to start listener on address [2001:610:722:0:217:195:117:160]:80!
  7. mistwang

    mistwang LiteSpeed Staff

    We need the full error log after graceful restart is initiated till the new instance of LSWS starts, usually across two log files if log file are rotated automatically when LSWS restart.

    Make sure the per process file descriptor limit is high enough.
  8. raphidae

    raphidae New Member

    Code:
    2010-04-02 06:05:17.779 [NOTICE] Server restart request from admin interface!
    2010-04-02 06:05:17.779 [NOTICE] [Child: 23440] Start shutting down gracefully ...
    2010-04-02 06:05:17.779 [NOTICE] [Child: 23438] Start shutting down gracefully ...
    2010-04-02 06:05:17.779 [NOTICE] [Child: 23439] Start shutting down gracefully ...
    2010-04-02 06:05:17.779 [NOTICE] [Child: 23437] Start shutting down gracefully ...
    2010-04-02 06:05:18.518 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 23439 !
    2010-04-02 06:05:18.623 [NOTICE] [AutoRestarter] child process with pid=23439 exited with status=0!
    2010-04-02 06:05:20.415 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 23438 !
    2010-04-02 06:05:20.518 [NOTICE] [AutoRestarter] child process with pid=23438 exited with status=0!
    2010-04-02 06:05:20.521 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 23440 !
    2010-04-02 06:05:20.630 [NOTICE] [AutoRestarter] child process with pid=23440 exited with status=0!
    2010-04-02 06:05:25.957 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 23437 !
    2010-04-02 06:05:26.000 [NOTICE] [AutoRestarter] child process with pid=23437 exited with status=0!
    2010-04-02 06:05:26.000 [NOTICE] [PID:23433] Server Stopped!
    
    Code:
    2010-04-02 06:05:17.790 [NOTICE] Free software update of your owned license will expire in 41 days.
    2010-04-02 06:05:17.790 [NOTICE] Loading LiteSpeed/4.0.13 Enterprise ...
    2010-04-02 06:05:17.792 [NOTICE] [ADMIN] server socket: uds://usr/local/lsws/admin/tmp/admin.sock.7239
    2010-04-02 06:05:17.792 [NOTICE] Loading configuration from /usr/local/lsws/conf/httpd_config.xml ...
    2010-04-02 06:05:17.793 [NOTICE] Recovering server socket: [217.195.117.160:280]
    2010-04-02 06:05:17.793 [NOTICE] Recovering server socket: [[ANY]:280]
    2010-04-02 06:05:17.793 [NOTICE] Recovering server socket: [217.195.117.160:80]
    2010-04-02 06:05:17.793 [NOTICE] Recovering server socket: [[ANY]:80]
    2010-04-02 06:05:17.793 [NOTICE] [config] chroot is disabled.
    2010-04-02 06:05:18.113 [ERROR] HttpListener::start(): Can't listen at address localadminlistener-6: Address already in use!
    2010-04-02 06:05:18.113 [ERROR] HttpServer::addListener(localadminlistener-6) failed to create new listener
    2010-04-02 06:05:18.114 [ERROR] [config:admin:listener:localadminlistener-6] failed to start SSL listener on address [2001:610:722:0:217:195:117:160]:280!
    2010-04-02 06:05:18.429 [ERROR] HttpListener::start(): Can't listen at address virasena.mediamonks.net-6: Address already in use!
    2010-04-02 06:05:18.429 [ERROR] HttpServer::addListener(virasena.mediamonks.net-6) failed to create new listener
    2010-04-02 06:05:18.429 [ERROR] [config:server:listener:virasena.mediamonks.net-6] failed to start listener on address [2001:610:722:0:217:195:117:160]:80!
    
    2010-04-02 06:05:18.429 [NOTICE] The maximum number of file descriptor limit is set to 115891.
    
    2010-04-02 06:05:18.434 [ERROR] [config:template:template for normal hosts] Listener [virasena.mediamonks.net-6] does not exist
    2010-04-02 06:05:18.444 [ERROR] [config:template:template for RoR hosts] Listener [virasena.mediamonks.net-6] does not exist
    2010-04-02 06:05:18.450 [ERROR] [config:template:template for framegame.nl hosts] Listener [virasena.mediamonks.net-6] does not exist
    2010-04-02 06:05:18.459 [NOTICE] lshttpd (23489) is ready
    
  9. mistwang

    mistwang LiteSpeed Staff

    I need INFO level log.
  10. mistwang

    mistwang LiteSpeed Staff

    Looks like [::]:280 the wildcard IPv6 is in use
    2010-04-02 06:05:17.793 [NOTICE] Recovering server socket: [[ANY]:280]

    You cannot create another listener on the same port binding to individual IPv6 address.
  11. raphidae

    raphidae New Member

    It's not. I have specific bindings:

    Code:
      <listenerList>
        <listener>
          <name>virasena.mediamonks.net</name>
          <address>217.195.117.160:80</address>
          <binding>15</binding>
          <secure>0</secure>
          <note></note>
          <vhostMapList>
            <vhostMap>
              <vhost>virasena.mediamonks.net</vhost>
              <domain>*</domain>
            </vhostMap>
          </vhostMapList>
        </listener>
        <listener>
          <name>virasena.mediamonks.net-6</name>
          <address>[2001:610:722:0:217:195:117:160]:80</address>
          <binding>15</binding>
          <secure>0</secure>
          <note></note>
          <vhostMapList>
            <vhostMap>
              <vhost>virasena.mediamonks.net</vhost>
              <domain>*</domain>
            </vhostMap>
          </vhostMapList>
        </listener>
      </listenerList>
    
    INFO level log:

    Code:
    2010-04-02 20:17:14.949 [NOTICE] Server Restart Request via Signal...
    2010-04-02 20:17:14.950 [NOTICE] [Child: 83688] Start shutting down gracefully ...
    2010-04-02 20:17:14.950 [NOTICE] [Child: 83689] Start shutting down gracefully ...
    2010-04-02 20:17:14.950 [NOTICE] [Child: 83686] Start shutting down gracefully ...
    2010-04-02 20:17:14.950 [NOTICE] [Child: 83687] Start shutting down gracefully ...
    2010-04-02 20:17:14.950 [INFO] Pass listener 217.195.117.160:280.
    2010-04-02 20:17:14.950 [INFO] Pass listener [2001:610:722:0:217:195:117:160]:280.
    2010-04-02 20:17:14.950 [INFO] Pass listener 217.195.117.160:80.
    2010-04-02 20:17:14.950 [INFO] Pass listener [2001:610:722:0:217:195:117:160]:80.
    2010-04-02 20:17:14.951 [INFO] Stop listener 217.195.117.160:280.
    2010-04-02 20:17:14.951 [INFO] Stop listener [2001:610:722:0:217:195:117:160]:280.
    2010-04-02 20:17:14.951 [INFO] Stop listener 217.195.117.160:80.
    2010-04-02 20:17:14.951 [INFO] Stop listener [2001:610:722:0:217:195:117:160]:80.
    2010-04-02 20:17:15.642 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 83688 !
    2010-04-02 20:17:15.642 [INFO] [CLEANUP] Clean up child process with pid: 83691
    2010-04-02 20:17:15.672 [NOTICE] [AutoRestarter] child process with pid=83688 exited with status=0!
    2010-04-02 20:17:15.672 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 83689 !
    2010-04-02 20:17:15.672 [INFO] [CLEANUP] Clean up child process with pid: 83690
    2010-04-02 20:17:15.680 [NOTICE] [AutoRestarter] child process with pid=83689 exited with status=0!
    2010-04-02 20:17:15.680 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 83687 !
    2010-04-02 20:17:15.680 [INFO] [CLEANUP] Clean up child process with pid: 83703
    2010-04-02 20:17:15.680 [INFO] [CLEANUP] Clean up child process with pid: 83707
    2010-04-02 20:17:15.784 [NOTICE] [AutoRestarter] child process with pid=83687 exited with status=0!
    2010-04-02 20:17:15.784 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 83686 !
    2010-04-02 20:17:15.890 [NOTICE] [AutoRestarter] child process with pid=83686 exited with status=0!
    2010-04-02 20:17:15.890 [NOTICE] [PID:83682] Server Stopped!
    
    <switch logfile>
    
    2010-04-02 20:17:14.959 [NOTICE] Free software update of your owned license will expire in 41 days.
    2010-04-02 20:17:14.959 [NOTICE] Loading LiteSpeed/4.0.13 Enterprise ...
    2010-04-02 20:17:14.961 [NOTICE] [ADMIN] server socket: uds://usr/local/lsws/admin/tmp/admin.sock.7011
    2010-04-02 20:17:14.961 [NOTICE] Loading configuration from /usr/local/lsws/conf/httpd_config.xml ...
    2010-04-02 20:17:14.963 [NOTICE] Recovering server socket: [217.195.117.160:280]
    2010-04-02 20:17:14.963 [NOTICE] Recovering server socket: [[ANY]:280]
    2010-04-02 20:17:14.963 [NOTICE] Recovering server socket: [217.195.117.160:80]
    2010-04-02 20:17:14.963 [NOTICE] Recovering server socket: [[ANY]:80]
    2010-04-02 20:17:14.963 [NOTICE] [config] chroot is disabled.
    2010-04-02 20:17:14.963 [INFO] old priority: 0, new priority: 0
    2010-04-02 20:17:14.963 [INFO] [config:server:basic] For better obscurity, server version number is hidden in the response header.
    2010-04-02 20:17:14.964 [INFO] Start listen socket [/tmp/lscgid.sock].
    2010-04-02 20:17:15.282 [ERROR] HttpListener::start(): Can't listen at address localadminlistener-6: Address already in use!
    2010-04-02 20:17:15.282 [ERROR] HttpServer::addListener(localadminlistener-6) failed to create new listener
    2010-04-02 20:17:15.282 [ERROR] [config:admin:listener:localadminlistener-6] failed to start SSL listener on address [2001:610:722:0:217:195:117:160]:280!
    2010-04-02 20:17:15.597 [ERROR] HttpListener::start(): Can't listen at address virasena.mediamonks.net-6: Address already in use!
    2010-04-02 20:17:15.597 [ERROR] HttpServer::addListener(virasena.mediamonks.net-6) failed to create new listener
    2010-04-02 20:17:15.597 [ERROR] [config:server:listener:virasena.mediamonks.net-6] failed to start listener on address [2001:610:722:0:217:195:117:160]:80!
    2010-04-02 20:17:15.597 [NOTICE] The maximum number of file descriptor limit is set to 115891.
    2010-04-02 20:17:15.603 [ERROR] [config:template:template for normal hosts] Listener [virasena.mediamonks.net-6] does not exist
    2010-04-02 20:17:15.612 [ERROR] [config:template:template for RoR hosts] Listener [virasena.mediamonks.net-6] does not exist
    2010-04-02 20:17:15.618 [ERROR] [config:template:template for framegame.nl hosts] Listener [virasena.mediamonks.net-6] does not exist
    2010-04-02 20:17:15.625 [INFO] Stop listener [ANY]:280.
    2010-04-02 20:17:15.625 [INFO] Stop listener [ANY]:80.
    2010-04-02 20:17:15.627 [NOTICE] lshttpd (83748) is ready
    2010-04-02 20:17:15.628 [NOTICE] [AutoRestarter] new child process with pid=83750 is forked!
    2010-04-02 20:17:15.628 [NOTICE] [AutoRestarter] new child process with pid=83751 is forked!
    2010-04-02 20:17:15.629 [NOTICE] [AutoRestarter] new child process with pid=83752 is forked!
    2010-04-02 20:17:15.629 [NOTICE] [AutoRestarter] new child process with pid=83753 is forked!
    2010-04-02 20:17:15.629 [INFO] Stop listener 217.195.117.160:280.
    2010-04-02 20:17:15.630 [NOTICE] Core dump is enabled.
    2010-04-02 20:17:15.630 [NOTICE] [child: 83750] Successfully change current user to www
    2010-04-02 20:17:15.630 [INFO] Stop listener 217.195.117.160:280.
    2010-04-02 20:17:15.630 [NOTICE] Core dump is enabled.
    2010-04-02 20:17:15.630 [NOTICE] [child: 83751] Successfully change current user to www
    2010-04-02 20:17:15.630 [NOTICE] [Child: 83750] Setup swapping space...
    2010-04-02 20:17:15.630 [INFO] Stop listener 217.195.117.160:280.
    2010-04-02 20:17:15.630 [NOTICE] [Child: 83751] Setup swapping space...
    2010-04-02 20:17:15.630 [NOTICE] Core dump is enabled.
    2010-04-02 20:17:15.630 [NOTICE] [child: 83752] Successfully change current user to www
    2010-04-02 20:17:15.630 [NOTICE] [Child: 83750] LiteSpeed/4.0.13 Enterprise starts successfully!
    2010-04-02 20:17:15.631 [NOTICE] [Child: 83751] LiteSpeed/4.0.13 Enterprise starts successfully!
    2010-04-02 20:17:15.631 [NOTICE] [Child: 83752] Setup swapping space...
    2010-04-02 20:17:15.631 [NOTICE] Core dump is enabled.
    2010-04-02 20:17:15.631 [NOTICE] [child: 83753] Successfully change current user to www
    2010-04-02 20:17:15.631 [NOTICE] [Child: 83752] LiteSpeed/4.0.13 Enterprise starts successfully!
    2010-04-02 20:17:15.631 [NOTICE] [Child: 83753] Setup swapping space...
    2010-04-02 20:17:15.631 [NOTICE] [Child: 83753] LiteSpeed/4.0.13 Enterprise starts successfully!
    2010-04-02 20:17:15.637 [NOTICE] New lshttpd process is ready, lshttpd (83688) stops listeners
    2010-04-02 20:17:15.637 [INFO] Stop listener 217.195.117.160:80.
    2010-04-02 20:17:15.637 [INFO] Stop listener [2001:610:722:0:217:195:117:160]:80.
    2010-04-02 20:17:15.637 [NOTICE] [Child: 83688] Shut down successfully! 
    2010-04-02 20:17:15.638 [NOTICE] [PHP5-www.monksystem.nl] stop worker processes
    2010-04-02 20:17:15.638 [INFO] Permission denied, let parent kill it: 83691
    2010-04-02 20:17:15.638 [INFO] [PHP5-www.monksystem.nl] kill pid: 83691
    2010-04-02 20:17:15.665 [NOTICE] New lshttpd process is ready, lshttpd (83686) stops listeners
    2010-04-02 20:17:15.665 [NOTICE] New lshttpd process is ready, lshttpd (83689) stops listeners
    2010-04-02 20:17:15.665 [INFO] Stop listener 217.195.117.160:280.
    2010-04-02 20:17:15.665 [INFO] Stop listener 217.195.117.160:80.
    2010-04-02 20:17:15.665 [INFO] Stop listener [2001:610:722:0:217:195:117:160]:280.
    2010-04-02 20:17:15.665 [INFO] Stop listener [2001:610:722:0:217:195:117:160]:80.
    2010-04-02 20:17:15.665 [INFO] Stop listener 217.195.117.160:80.
    2010-04-02 20:17:15.665 [NOTICE] [Child: 83689] Shut down successfully! 
    2010-04-02 20:17:15.665 [INFO] Stop listener [2001:610:722:0:217:195:117:160]:80.
    2010-04-02 20:17:15.665 [NOTICE] [Child: 83686] Shut down successfully! 
    2010-04-02 20:17:15.666 [NOTICE] [PHP5-www.monksystem.nl] stop worker processes
    2010-04-02 20:17:15.666 [INFO] Permission denied, let parent kill it: 83690
    2010-04-02 20:17:15.666 [INFO] [PHP5-www.monksystem.nl] kill pid: 83690
    2010-04-02 20:17:15.668 [NOTICE] New lshttpd process is ready, lshttpd (83687) stops listeners
    2010-04-02 20:17:15.668 [INFO] Stop listener 217.195.117.160:80.
    2010-04-02 20:17:15.668 [INFO] Stop listener [2001:610:722:0:217:195:117:160]:80.
    2010-04-02 20:17:15.668 [NOTICE] [Child: 83687] Shut down successfully! 
    2010-04-02 20:17:15.669 [NOTICE] [PHP5-virasena.mediamonks.net] stop worker processes
    2010-04-02 20:17:15.669 [INFO] [PHP5-virasena.mediamonks.net] kill pid: 83707
    2010-04-02 20:17:15.669 [NOTICE] [PHP5-www.monksystem.nl] stop worker processes
    2010-04-02 20:17:15.669 [INFO] Permission denied, let parent kill it: 83703
    
  12. raphidae

    raphidae New Member

    There seems to be a problem with the bindings. You can see my listener config in my previous post, however there are bindings on [::] anyway:

    'lsof -i 6' output:

    Code:
    lshttpd.4 84082 root   13u  IPv6 0xffffff01ef3ab6e0      0t0  TCP *:http-mgmt (LISTEN)
    lshttpd.4 84082 root   14u  IPv6 0xffffff019f198370      0t0  TCP *:http (LISTEN)
    lshttpd.4 84084  www   13u  IPv6 0xffffff01ef3ab6e0      0t0  TCP *:http-mgmt (LISTEN)
    lshttpd.4 84084  www   14u  IPv6 0xffffff019f198370      0t0  TCP *:http (LISTEN)
    lshttpd.4 84085  www   14u  IPv6 0xffffff019f198370      0t0  TCP *:http (LISTEN)
    lshttpd.4 84086  www   14u  IPv6 0xffffff019f198370      0t0  TCP *:http (LISTEN)
    lshttpd.4 84087  www   14u  IPv6 0xffffff019f198370      0t0  TCP *:http (LISTEN)
    
    'lsof -i 4' output:

    Code:
    lshttpd.4 84082     root    8u  IPv4 0xffffff01ef919370      0t0  TCP virasena.mediamonks.net:http-mgmt (LISTEN)
    lshttpd.4 84082     root    9u  IPv4 0xffffff01ef9a3370      0t0  TCP virasena.mediamonks.net:http (LISTEN)
    lshttpd.4 84084      www    8u  IPv4 0xffffff01ef919370      0t0  TCP virasena.mediamonks.net:http-mgmt (LISTEN)
    lshttpd.4 84084      www    9u  IPv4 0xffffff01ef9a3370      0t0  TCP virasena.mediamonks.net:http (LISTEN)
    lshttpd.4 84085      www    9u  IPv4 0xffffff01ef9a3370      0t0  TCP virasena.mediamonks.net:http (LISTEN)
    lshttpd.4 84086      www    9u  IPv4 0xffffff01ef9a3370      0t0  TCP virasena.mediamonks.net:http (LISTEN)
    lshttpd.4 84087      www    9u  IPv4 0xffffff01ef9a3370      0t0  TCP virasena.mediamonks.net:http (LISTEN)
    
    This is new since I upgraded from 4.0.10 to 4.0.13.
  13. mistwang

    mistwang LiteSpeed Staff

    OK, identified the bug and fixed in 4.0.14 release build.
    Please download and try 4.0.14 by changing the release number in the download link. i386-freebsd6 and x86_64-freebsd6 packages are available.
  14. raphidae

    raphidae New Member

    This seems to be fixed in 4.0.14, thanks!

Share This Page