Project

General

Profile

Actions

Bug #2199

closed

Varnish3 fails on start with sysctl-ish errors

Added by Adam Thompson over 13 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
02/13/2012
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
2.0.1
Affected Plus Version:
Affected Architecture:

Description

Running pfSense 2.0.1-RELEASE nanobsd-VGA off a USB stick.
Installed Varnish3.
Performed initial configuration, enabled varnish.
Varnish does not start, this shows up in the log:

php: /pkg_edit.php: The command '/usr/local/etc/rc.d/varnish.sh' returned exit code '2', the output was 'kern.ipc.nmbclusters: 65536 sysctl: kern.ipc.nmbclusters: Invalid argument kern.ipc.somaxconn: 16384 -> 16384 kern.maxfiles: 131072 -> 131072 kern.maxfilesperproc: 104856 -> 104856 kern.threads.max_threads_per_proc: 4096 -> 4096 Error: (-smalloc) size "MB": Invalid number'

Actions #1

Updated by Adam Thompson over 13 years ago

Same error on Varnish 2.1.5 (pkg v1.0), so it's not specific to v3.
Same error on my production firewall (i386 2.0.1-RELEASE), so it's not specific to nanobsd.
I don't have an amd64 firewall to test with right now, so I can't tell if the package is completely broken or just on i386.

Actions #2

Updated by Marcello Silva Coutinho over 13 years ago

Adam Thompson wrote:

Same error on Varnish 2.1.5 (pkg v1.0), so it's not specific to v3.
Same error on my production firewall (i386 2.0.1-RELEASE), so it's not specific to nanobsd.
I don't have an amd64 firewall to test with right now, so I can't tell if the package is completely broken or just on i386.

Error: (-smalloc) size "MB": Invalid number'

This is the only fatal error. You did not specified the amount of memory to use.

I'll supress other warning on next release and do a better field check on apply.

Actions #3

Updated by Valentin Georgiev almost 12 years ago

php: /status_services.php: The command '/usr/local/etc/rc.d/varnish.sh stop' returned exit code '2', the output was 'kern.ipc.nmbclusters: 65536 sysctl: kern.ipc.nmbclusters: Invalid argument kern.ipc.somaxconn: 16384 => 16384 kern.maxfiles: 131072 => 131072 kern.maxfilesperproc: 104856 => 104856 kern.threads.max_threads_per_proc: 4096 => 4096 Message from VCC-compiler: Expected an action, 'if', '{' or '}' ('input' Line 56 Pos 17) else { ----------------####----- Running VCC-compiler failed, exit 1 VCL compilation failed'>

Then:
Daemon options
Enable Varnish [X] (Is checked)

No fix over a year?!
Version:
2.1-RC1 (i386) built on Wed Aug 21 15:22:33 EDT 2013

Actions #4

Updated by Warren Baker almost 12 years ago

Valentin Georgiev wrote:

php: /status_services.php: The command '/usr/local/etc/rc.d/varnish.sh stop' returned exit code '2', the output was 'kern.ipc.nmbclusters: 65536 sysctl: kern.ipc.nmbclusters: Invalid argument kern.ipc.somaxconn: 16384 => 16384 kern.maxfiles: 131072 => 131072 kern.maxfilesperproc: 104856 => 104856 kern.threads.max_threads_per_proc: 4096 => 4096 Message from VCC-compiler: Expected an action, 'if', '{' or '}' ('input' Line 56 Pos 17) else { ----------------####----- Running VCC-compiler failed, exit 1 VCL compilation failed'>

Did you only configure 1 backend and no Backend mapping?

Actions #5

Updated by Valentin Georgiev almost 12 years ago

2 servers, but no matters how much backends have there.
Problem is in pfsense Varnish config generator, see http://forum.pfsense.org/index.php?topic=64894.0
Same error ive have. But for now i get it works with

#set X-forward
unset req.http.X-Forwarded-For;
else {
set req.backend = testBACKEND;
}

Replaced by:

    if (req.restarts == 0) {
        if (req.http.x-forwarded-for) {
            set req.http.X-Forwarded-For =
                req.http.X-Forwarded-For + ", " + client.ip;
        } else {
            set req.http.X-Forwarded-For = client.ip;
        }
    }
        set req.backend = Web01BACKEND;
    #respect client wish to refresh the page

anyway; if save it from webif errors are on 1st place. for that need to be fixed from developers.

Actions #6

Updated by Valentin Georgiev almost 12 years ago

PS; I try to add now the two backends but only the 1st one is in .vcl config file

  1. backend Web02 not in use.

it says me about second one... well i guess someone just doesn't have time or nerves to finish it ^^
problems in that package are big!

Actions #7

Updated by Warren Baker almost 12 years ago

  • Status changed from New to Feedback

I pushed a few commits for this - please let me know how it goes.

Actions #8

Updated by Valentin Georgiev almost 12 years ago

Yes, now its better. Saving and running normally.
Works only the first backend, "# backend Web02 not in use." is showing on "/var/etc/default.vcl" | "View Configuration", but in pfsense (pkg.php?xml=varnish_backends.xml) have two backends added no matters same ips/ports;
But like before i forgot to say about: "LB Directors" page. There cannot add new item because some error again.

.:. 01 unread notice .:.

in right top, were stays hostname;
when i click it:

Acknowledge All Notices     [X]
08-27-13 16:27:26    [ pfSense is restoring the configuration /cf/conf/backup/config-1377609652.xml]

if u want i can send you the config but i think there is nothing to investigate.
I hope that helps.

Actions #9

Updated by Warren Baker almost 12 years ago

Yeah i noticed that. Those are two separate bugs. If you can please log two new bugs related to those issues then we can close this one out as the original problem was another problem :)

Actions #10

Updated by Valentin Georgiev almost 12 years ago

I think about the problem from before is gone => Close

Actions #11

Updated by Valentin Georgiev almost 12 years ago

Well i found one your mistake were u forgot.
Foward client IP :
(append X-Forwarded-For):
set req.http.X-Forwarded-For = req.http.X-Forwarded-For , client.ip; < Error
set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; < Works

Actions #12

Updated by Warren Baker almost 12 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

Thanks config syntax fixed from an over-zealous search and replace.

Actions

Also available in: Atom PDF