OLS doesn't start anymore

Discussion in 'OpenLiteSpeed Bug Reports' started by silentneedle, Mar 28, 2017.

  1. silentneedle

    silentneedle New Member

    After adding a bunch of rewrite rules from my .htaccess file ols doesn't seem to start anymore after a restart. The following error is shown in messages:

    There's no error in the error.log.
     
  2. silentneedle

    silentneedle New Member

    @lsfoo Maybe you can help. When using the same rewrite rules on my old 1.2.10 ols installation, there is no problem, but with the most recent one it just keeps crashing when starting.
     
  3. silentneedle

    silentneedle New Member

    It looks like my rewrite is too long for ols, as soon as I add more than 130 lines of rewrite rules ols crashes on start. @lsfoo Could this get fixed somehow?
     
    Last edited: Mar 30, 2017
  4. lsfoo

    lsfoo Administrator

    Hi @silentneedle

    Apologies for the late reply, we were away the past week. We will look into this!

    Cheers,
    Kevin
     
    silentneedle likes this.
  5. silentneedle

    silentneedle New Member

    Thanks @lsfoo. Do you have any ETA for a fix? I'm currently in the setup of a 20 node cluster and need to decide if I use ols or apache now. I would prefer ols, but the rewrite rules are mandatory.
     
  6. lsfoo

    lsfoo Administrator

    Are you handy with patching C code and compiling binaries from source?

    If so, I can look into this soon and provide a patch of what you will need to modify to make this work. Otherwise, our primary OLS developer is away for the next week, so a new release will be at least that long away.
     
  7. silentneedle

    silentneedle New Member

    Unfortunately not, but I think I can wait until your developer is back.
     
  8. lsfoo

    lsfoo Administrator

    Did you do any special configurations during installation?

    If not, and you are willing to give compiling from source a shot, a small change may be enough to fix the problem for you.

    Let me know,
    Kevin
     
  9. silentneedle

    silentneedle New Member

    The servers are setup by puppet, but if it's a small change I could give it a try. What do I need to change? :)
     
  10. lsfoo

    lsfoo Administrator

    The source code can be downloaded here: http://open.litespeedtech.com/packages/openlitespeed-1.4.25.tgz

    In a terminal:
    1. Extract the tarball
    2. cd into the new directory (openlitespeed-1.4.25)
    NOTE: you could skip 3 and 3a first if you want to make sure that compiling works before editing anything.
    3. The file to edit is openlitespeed-1.4.25/src/main/plainconf.cpp
    3a. Roughly at line 1182, there is the line

    const int MAX_LINE_LENGTH = 8192;

    change 8192 to something bigger, e.g. 16384 and save.
    4. In the terminal again, run ./configure
    5. Once configure is done, run make
    6. If compilation succeeds, just mv the openlitespeed-1.4.25/src/openlitespeed binary to the bin directory wherever your installation is (default will be in /usr/local/lsws/bin/)

    I will be out of work in 15 minutes, but I can reply to any questions tomorrow morning if you run into any issues!
     
  11. silentneedle

    silentneedle New Member

    Thank you, I had to increase it to 32768. ols starts now, but it seems there is still a bug, I receive the following error in the console:

    [(null)] rewrite: Rewrite rule missing substitution string. while parsing: RewriteRule ^abc/

    Is there something like a compiled vhost.conf which ols is using at runtime? For me it looks like the rewrite rule in question is cut off. I double checked the rule, there are no syntax errors.
     
  12. lsfoo

    lsfoo Administrator

    Could you send me your ruleset via private conversation? I'll try it out locally to see what's up.

    OLS does not have runtime conf loading unfortunately. I assume you're referring to something like .htaccess?
     

Share This Page