OLS doesn't start anymore

#1
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:

CentOS-73-64-minimal kernel: traps: litespeed[31939] general protection ip:7f23d559e118 sp:7fff39a80f30 error:0 in libgcc_s-4.8.5-20150702.so.1[7f23d558f000+15000]
There's no error in the error.log.
 
#2
@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
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:
#5
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.
 

lsfoo

Moderator
#6
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.
 

lsfoo

Moderator
#8
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
 
#10
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
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
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?
 
Top