Closed thatsk closed 5 years ago
varnishd -C -f /etc/varnish/default.vcl
Running VCC-compiler failed, exited with 2
VCL compilation failed
any instruction to install and configure UI ?
please check the README, your VCL is trying to access an html page that doesn't exist (I guess)
nope its there @gquintard
root@testserver: ~# ls -la /var/www/html/rtstatus.html
-rwxrwxrwx 1 apache apache 5498 Oct 23 11:03 /var/www/html/rtstatus.html
root@testserver: ~# varnishd -C -f /etc/varnish/default.vcl
Running VCC-compiler failed, exited with 2
VCL compilation failed
root@testserver: ~# cat /var/www/html/rtstatus.html
<title>Varnish Status</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js">
location.href = "http://localhost/rtstaus";
</script>
<style type="text/css">
.p { white-space: pre;}
.backend { white-space: pre;}
.col-xs-12 {padding-top: 20%;}
</style>
</head>
<body>
<h1><b>VARNISH STATUS</b></h1>
<div class="container" style="float:left;text-align:left;padding-top:2%;">
<div class="info" >
<script type="text/javascript">
var myVar = setInterval(function(){info()}, 1000);
function info(){
$.getJSON( "/rtstatus.json", function( data ) {
var items = [];
var index = 0;
items.push("<p>"+ data.req_request + " " + data.obj_status + "</p>");
items.push("<p>" + data.timestamp + "</p>");
items.push("<p>"+ "<b>Varnish version:</b> " + data.varnish_version + "," + "</p>");
items.push("<p>"+ "<b>Varnish port:</b> " + data.varnish_port + "," + "</p>");
items.push("<p>"+ "<b>Server identity:</b> " + data.server_id + "," + "</p>");
items.push("<p>" + "<b>Director name:</b>" + " " + data.director.name + "," + "</p>" );
items.push("<p>"+ "<b>VCL name:</b>"+ " " + data.director.vcl_name + "," + "</p>");
items.push("<p>"+ "<b>Hitrate:</b>"+ " " + data.hitrate + "%"+ "</p>");
items.push("<p>"+ "<b>Load:</b>"+ " " + data.load + "req/s"+ "</p>");
$("div.info").html("");
$( "<p/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "div.info" );
})();
};
info();
</script>
</div>
<h1>Backends</h1>
<div class="backend">
<script type="text/javascript">
var myVar = setInterval(function(){backend()}, 1000);
function backend(){
$.getJSON( "/rtstatus.json", function( data ) {
var items = [];
var i;
$.each( data, function( key, val ) {
if(key === "backend"){
var tmp = data.backend;
for(i = 0; i < tmp.length;i++){
items.push( "<p>" + "<b>Name:</b> " + tmp[i].name + " : " + tmp[i].value + "," + "</p>" );
}
}
});
$("div.backend").html("")
$( "<p/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "div.backend" );
})();
};
backend();
</script>
</div>
<script>
function openSpoiler(id){
var a = document.getElementById(id).style;
a.display = a.display=='block'?'none':'block'}
</script>
<a href="javascript:openSpoiler('spoil')">
<b>Show detailed counters</b></a>
<div id="spoil" class="row" style="display: none;">
<div class="col-xs-4">
<h2>Description:</h2>
<p1>qui ci meto i nomi</p1>
<script type="text/javascript">
$.getJSON( "/rtstatus.json", function( data ) {
var items = [];
var cont = 0;
$.each( data, function( key, val ) {
if(cont>9){
if(!val.type){
items.push( "<li>" + val.descr + "</li>" );
}
}
cont++;
});
$("p1").html("")
$( "<ul/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "p1" );
})();
</script>
</div>
<div class="col-xs-3">
<h2>Name:</h2>
<p2>name</p2>
<script type="text/javascript" style="float:left">
$.getJSON( "/rtstatus.json", function( data ) {
var items = [];
var cont = 0;
var i = 1;
$.each( data, function( key, val ) {
if(cont>9){
if(!val.type){
items.push( "<span>" + "<sub>"+ i + ". " + "</sub>" + "[" + key + "]" + "</span><BR>" );
i++;
}
}
cont++;
});
$("p2").html("")
$( "<ul/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "p2" );
})();
</script>
</div>
<div class="col-xs-2">
<h2>Value:</h2>
<p3>value</p3>
<script type="text/javascript">
var myVar = setInterval(function(){value()}, 1000);
function value(){
$.getJSON( "/rtstatus.json", function( data ) {
var items = [];
var cont = 0;
var i = 1;
$.each( data, function( key, val ) {
if(cont>9){
if(!val.type){
items.push( "<span>" + "<sub>"+ i + ". " + "</sub>" + val.value + "</span><BR>");
i++;
}
}
cont++;
});
$("p3").html("")
$( "<ul/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "p3" );
})();
};
value();
</script>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-xs-12">
<footer>
<a href="/rtstatus.json" target="_blank">Complete JSON file</a><br />
<a href="https://github.com/arianna-aondio/libvmod-rtstatus" target="_blank">Github repository</a><br /><br /><br />
<p>©Copyright 2014 Varnish Software AS</p>
</footer>
</div>
</div>
</div>
</body>
</html>
Is there anything other than "compilation failed" when you run the "varnishd -C" command? It's unlike varnish to just exit silently.
What varnish version are you running?
On Thu, Oct 24, 2019, 00:21 Thatsk notifications@github.com wrote:
root@testserver: ~# cat /var/www/html/rtstatus.html
Varnish Status VARNISH STATUS