Giter Site home page Giter Site logo

Laminard terminates about laminar HOT 16 CLOSED

ohwgiles avatar ohwgiles commented on August 18, 2024
Laminard terminates

from laminar.

Comments (16)

seifertm avatar seifertm commented on August 18, 2024

This looks like an exception from Capn Proto. Version 0.6.1 in Portage is too old, because it does not contain support for abstract unix sockets. You need the git version. Which version are you using?

Since you are using Gentoo, I would like to point to to the ebuild(s) I created for Capn Proto and laminar:
https://gist.github.com/seifertm/908fd41e9cad0d4f8a747703aa29bc11
https://gist.github.com/seifertm/75f79b95b36dfbf623ac0887c1b84cf9

from laminar.

palica avatar palica commented on August 18, 2024

yes, 0.6.1. I will try your ebuilds and will let you know. Thank you

from laminar.

palica avatar palica commented on August 18, 2024

Your ebuilds worked. Thank you. I am getting garbled output from the port. Did I miss something?

from laminar.

ohwgiles avatar ohwgiles commented on August 18, 2024

Could you please describe in more detail exactly what you ran and what you mean by "garbled output from the port"? The gentoo port or one of laminar's communication ports? Were you able to reach the web UI?

from laminar.

palica avatar palica commented on August 18, 2024

I am sorry for not being clear. So to clarify, I am able to install from the supplied ebuilds and also to start laminard, but when trying to reach the interface I get this:

laminar-ci ~ # wget http://localhost:8080
--2017-10-24 22:43:35--  http://localhost:8080/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2442 (2.4K)
Saving to: 'index.html'

index.html                                           100%[=====================================================================================================================>]   2.38K  --.-KB/s   
 in 0s      

2017-10-24 22:43:35 (299 MB/s) - 'index.html' saved [2442/2442]

laminar-ci ~ # cat index.html 
nmo(MM6H8oWVL(Q!]ޥ]C$ΐÙ)uAQ3<
恊1\X11.p߆k<47VբӀdPHī;{z>+^3Ṋ%+4R2j)df
                                      \ EUwʽt
Ab`j_V\?nPJtvz7+,-`%ڃiA|@ϊ+dՖ,[*azӧdb\?,2ñfd,HņʡW: VIʌE"M
     Zps^FXf
            Ӕj~~z
4:b-zoXWӢXgm4Y?gJ#-     JqAn%$eS8wkfRM#
                                       `)$lc+y+ Z,4sV?v�^8p
]s0[    /qR\e1x˂&|AF
e31fS                {`:07oARyH^?%-["N`Bt ooGcBd{
    s'F\*?{;~Ax
               S|O

Almost the same happens when trying to reach with firefox over a proxy, I get a prompt saying compressed content and download option. Opening the "archive" gives similar non-readable content.

Using caddy as proxy. I might try it with nginx. It has to probably do something with the websocks I would guess.

from laminar.

ohwgiles avatar ohwgiles commented on August 18, 2024

I doubt it has to do with the websockets since they are launched only from javascript and with wget you are fetching just the basic html.

Since wget reports 200 OK, only the HTTP body seems affected. Laminar's static files (including its index HTML page) are all served unconditionally with gzip compression. Perhaps this is what you're seeing. Is laminard listening directly on port 8080 in your command or is it already via your proxy? Can you dump the HTTP headers (curl -v localhost:8080) and check the Content-Encoding header?

from laminar.

palica avatar palica commented on August 18, 2024

on the localhost it is directly listening on port 8080 and yes you are right it is served using gzip.

curl -v localhost:8080
* Rebuilt URL to: localhost:8080/
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Encoding: gzip
< Content-Length: 2442
< Content-Transfer-Encoding: binary
< Server: WebSocket++/0.7.0
< 
nmo(MM6H8oWVL(Q!]ޥ]C$ΐÙ)uAQ3<
恊1\X11.p߆k<47VբӀdPHī;{z>+^3Ṋ%+4R2j)df
                                      \ EUwʽt
Ab`j_V\?nPJtvz7+,-`%ڃiA|@ϊ+dՖ,[*azӧdb\?,2ñfd,HņʡW: VIʌE"M
     Zps^FXf
            Ӕj~~z
4:b-zoXWӢXgm4Y?gJ#-     JqAn%$eS8wkfRM#
                                       `)$lc+y+ Z,4sV?v�^8p
]s0[    /qR\e1x˂&|AF
e31fS                {`:07oARyH^?%-["N`Bt ooGcBd{
    s'F\*?{;~Ax
               S|O

so laminard works as expected.

this is when trying it over proxy with curl

* Rebuilt URL to: 192.168.1.112:8080/
*   Trying 192.168.1.112...
* TCP_NODELAY set
* Connected to 192.168.1.112 (192.168.1.112) port 8080 (#0)
> GET / HTTP/1.1
> Host: 192.168.1.112:8080
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Transfer-Encoding: binary
< Server: Caddy
< Server: WebSocket++/0.7.0
< Date: Tue, 31 Oct 2017 07:19:36 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< 
<!doctype html>
<html>
<head>
 <base href="/">
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <meta name="apple-mobile-web-app-capable" content="yes" />
 <link rel="apple-touch-icon-precomposed" href="/favicon-152.png">
 <title>Laminar</title>
 <script src="/js/vue.min.js"></script>
 <script src="/js/vue-router.min.js"></script>
 <script src="/js/ansi_up.js"></script>
 <script src="/js/Chart.min.js"></script>
 <script src="/js/Chart.HorizontalBar.js"></script>
 <link href="/css/bootstrap.min.css" rel="stylesheet">
 <script src="/js/app.js" defer></script>
 <style>
  body, html { height: 100%; }
  .navbar { margin-bottom: 0; }
  .navbar-brand { margin: 0 -15px; padding: 7px 15px }
  .navbar-brand>img { display: inline; }
  a.navbar-btn { color: #9d9d9d; }
  a.navbar-btn.active { color: #fff; }
  a.navbar-btn:hover { color: #fff; text-decoration: none; }
  a.navbar-btn:focus { color: #fff; }
  dt,dd { line-height: 2; }
  canvas {
   width: 100% !important;
   max-width: 800px;
   height: auto !important;
  }
  .progress {
   height: 10px;
   margin-top: 5px;
   margin-bottom: 0;
  }
  table#joblist tr:first-child td { border-top: 0; }
 </style>
</head>
<body>
 <template id="home"><div>
  <ol class="breadcrumb"><li class="active">Home</li></ol>
  <div class="container-fluid"><div class="row">
   <div class="col-sm-5 col-md-4 col-lg-3 dash">
    <table class="table table-bordered">
     <tr v-for="job in jobsQueued">
      <td><router-link :to="'/jobs/'+job.name">{{job.name}}</router-link> <i>queued</i></td>
     </tr>
     <tr v-for="job in jobsRunning">
      <td><img class="spin small" src="/progress.gif"> <router-link :to="'/jobs/'+job.name">{{job.name}}</router-link> <router-link :to="'/jobs/'+job.name+'/'+job.number">#{{job.number}}</router-link> <div class="progress">
       <div class="progress-bar progress-bar-striped" :class="'progress-bar-'+(job.overtime?'warning':'info')" :class="job.etc?'':'active'" :style="'width:'+(!job.etc?'100':job.progress)+'%'"></div>
       </div>
      </td>
     </tr>
     <tr v-for="job in jobsRecent">
      <td><span v-html="runIcon(job.result)"></span> <router-link :to="'/jobs/'+job.name">{{job.name}}</router-link> <router-link :to="'/jobs/'+job.name+'/'+job.number">#{{job.number}}</router-link><br><small>Took {{job.duration}}s at {{formatDate(job.started)}}</small></td>
     </tr>
    </table>
   </div>
   <div class="col-sm-7 col-md-8 col-lg-9"><div class="row">
    <div class="col-md-6">
     <div class="panel panel-default">
      <div class="panel-heading">Total builds per day this week</div>
      <div class="panel-body">
       <canvas id="chartBpd"></canvas>
      </div>
     </div>
    </div>
    <div class="col-md-6">
     <div class="panel panel-default">
      <div class="panel-heading">Builds per job in the last 24 hours</div>
      <div class="panel-body" id="chartStatus">
       <canvas id="chartBpj"></canvas>
      </div>
     </div>
    </div>
    <div class="col-md-6">
     <div class="panel panel-default">
      <div class="panel-heading">Average build time per job this week</div>
      <div class="panel-body">
       <canvas id="chartTpj"></canvas>
      </div>
     </div>
    </div>
    <div class="col-md-6">
     <div class="panel panel-default">
      <div class="panel-heading">Current executor utilization</div>
      <div class="panel-body">
       <canvas id="chartUtil"></canvas>
      </div>
     </div>
    </div>
   </div></div>
  </div></div> 
 </div></template>
 
 <template id="jobs"><div>
  <ol class="breadcrumb"><li><router-link to="/">Home</router-link></li><li class="active">Jobs</li></ol>
  <div class="container-fluid"><div class="row">
   <div class="col-xs-12">
    <div class="pull-right">
     <input class="form-control" id="jobFilter" v-model="search" placeholder="Filter...">
    </div>
    <ul class="nav nav-tabs">
     <li :class="{'active':tag==null}"><a href v-on:click.prevent="tag = null">All Jobs</a></li>
     <li v-for="t in tags" :class="{'active':t==tag}"><a href v-on:click.prevent="tag = t">{{t}}</a></li>
    </ul>
    <table class="table table-striped" id="joblist">
     <tr   v-for="job in filteredJobs">
      <td><router-link :to="'/jobs/'+job.name">{{job.name}}</router-link></td>
      <td class="text-center"><span v-html="runIcon(job.result)"></span> <router-link :to="'/jobs/'+job.name+'/'+job.number">#{{job.number}}</router-link></td>
      <td class="text-center">{{formatDate(job.started)}}</td>
     </tr>
    </table>
   </div>
  </div></div>
 </div></template>
 
 <template id="job"><div>
  <ol class="breadcrumb"><li><router-link to="/">Home</router-link></li><li><router-link to="/jobs">Jobs</router-link></li><li class="active">{{$route.params.name}}</li></ol></ol>
  <div class="container-fluid">
   <div class="row">
    <div class="col-sm-5 col-md-6 col-lg-7">
    <h3>{{$route.params.name}}</h3>
    <dl class="dl-horizontal">
     <dt>Last Successful Run</dt>
     <dd><router-link v-if="lastSuccess" :to="'/jobs/'+$route.params.name+'/'+lastSuccess.number">#{{lastSuccess.number}}</router-link> {{lastSuccess?' - at '+formatDate(lastSuccess.started):'never'}}</dd>
     <dt>Last Failed Run</dt>
     <dd><router-link v-if="lastFailed" :to="'/jobs/'+$route.params.name+'/'+lastFailed.number">#{{lastFailed.number}}</router-link> {{lastFailed?' - at '+formatDate(lastFailed.started):'never'}}</dd>
    </dl>
    </div>
    <div class="col-sm-7 col-md-6 col-lg-5">
    <div class="panel panel-default">
      <div class="panel-heading">Build time</div>
      <div class="panel-body">
      <canvas id="chartBt"></canvas>
      </div>
    </div>
    </div>
   </div>
   <div class="row"><div class="col-xs-12">
    <table class="table table-striped"><thead>
     <tr><th>Run</th><th class="text-center">Started</th><th class="text-center">Duration</th><th class="text-center hidden-xs">Reason</th></tr></thead>
     <tr v-show="nQueued">
      <td colspan="4"><i>{{nQueued}} run(s) queued</i></td>
     </tr>
     <tr v-for="job in jobsRunning" track-by="$index">
      <td><img class="spin small" src="/progress.gif"> <router-link :to="'/jobs/'+$route.params.name+'/'+job.number">#{{job.number}}</router-link></td>
      <td class="text-center">{{formatDate(job.started)}}</td>
      <td class="text-center">--</td>
      <td class="text-center hidden-xs">{{job.reason}}</td>
     </tr>
     <tr v-for="job in jobsRecent" track-by="$index">
      <td><span v-html="runIcon(job.result)"></span> <router-link :to="'/jobs/'+$route.params.name+'/'+job.number">#{{job.number}}</router-link></td>
      <td class="text-center">{{formatDate(job.started)}}</td>
      <td class="text-center">{{job.duration + " seconds"}}</td>
      <td class="text-center hidden-xs">{{job.reason}}</td>
     </tr>
    </table>
   </div></div>
  </div>
 </div></template>
 
 <template id="run"><div>
  <ol class="breadcrumb"><li><router-link to="/">Home</router-link></li><li><router-link to="/jobs">Jobs</router-link></li><li><router-link :to="'/jobs/'+$route.params.name">{{$route.params.name}}</router-link></li><li class="active">#{{$route.params.number}}</li></ol></ol>
  <div class="container-fluid">
   <div class="row">
    <div class="col-sm-5 col-md-6 col-lg-7">
     <h3 style="float:left"><img class="spin" src="/progress.gif" v-show="job.result === 'running'"><span v-html="runIcon(job.result)"></span> {{$route.params.name}} #{{$route.params.number}}</h3>
     <nav class="pull-left">
      <ul class="pagination" style="margin:15px 20px">
       <li v-show="$route.params.number > 1"><router-link :to="'/jobs/'+$route.params.name+'/'+($route.params.number-1)">&laquo;</router-link></li>
       <li v-show="latestNum > $route.params.number"><router-link :to="'/jobs/'+$route.params.name+'/'+(parseInt($route.params.number)+1)">&raquo;</router-link></li>
      </ul>
     </nav>
     <div style="clear:both;"></div>
     <dl class="dl-horizontal">
      <dt>Reason</dt><dd>{{job.reason}}</dd>
      <dt>Queued for</dt><dd>{{job.queued}}s</dd>
      <dt>Started</dt><dd>{{formatDate(job.started)}}</dd>
      <dt v-show="runComplete(job)">Completed</dt><dd v-show="job.completed">{{formatDate(job.completed)}}</dd>
      <dt v-show="runComplete(job)">Duration</dt><dd v-show="runComplete(job)">{{job.duration}}s</dd>
     </dl>
    </div>
    <div class="col-sm-7 col-md-6 col-lg-5">
     <div class="progress" v-show="job.result == 'running'">
      <div class="progress-bar  progress-bar-striped" :class="'progress-bar-'+(job.overtime?'warning':'info')" :class="job.etc?'':'active'" :style="{width:!job.etc?100:job.progress + '%'}"></div>
     </div>
     <div class="panel panel-default" v-show="job.artifacts.length">
      <div class="panel-heading">Artifacts</div>
      <div class="panel-body">
       <ul class="list-unstyled" style="margin-bottom: 0">
        <li v-for="art in job.artifacts"><a :href="art.url" target="_self">{{art.filename}}</a></li>
       </ul>
      </div>
     </div>
    </div>
   </div>
   <div class="row"><div class="col-xs-12">
    <button type="button" class="btn btn-default btn-xs pull-right" :class="{'active':autoscroll}" v-on:click="autoscroll = !autoscroll" style="margin-top:10px">Autoscroll</button>
    <h4>Console output</h4>
    <pre v-html="log"></pre>
   </div></div>
  </div>
 </div></template>

 <div id="app">
  <nav class="navbar navbar-inverse">
   <div class="container-fluid">
    <div>
     <router-link to="/" class="navbar-brand"><img src="/icon.png">{{title}}</router-link>
     <router-link to="/jobs" class="btn navbar-btn pull-right">Jobs</router-link>
    </div>
   </div>
  </nav>
  <router-view></router-view>
 </div>
</body>
</html>

* Connection #0 to host 192.168.1.112 left intact

but this is still what I am getting with firefox

Firefox source

Firefox trying to save gz content

Is it something with my browser then?

from laminar.

ohwgiles avatar ohwgiles commented on August 18, 2024

It looks like at least with curl, your proxy is handling the decompression. So the next place I would look is your browser. Can you post the request and response headers from its Inspect/Developer mode? (I'm not that familiar with Firefox)

from laminar.

palica avatar palica commented on August 18, 2024

Will this help?

Firefox

from laminar.

palica avatar palica commented on August 18, 2024

Or this?

Firefox

from laminar.

ohwgiles avatar ohwgiles commented on August 18, 2024

Yes that helps. It looks like something is inserting Content-Type: application/x-gzip in the response headers, which is probably what causes Firefox to present it as a download rather than decompressing it and displaying the html. What I don't understand is why it happens from Firefox but not from curl.

Anyway it's probably my fault for being lazy. I don't actually explicitly set the Content-Type header anywhere, which would be the smart thing to do. I'll prepare a fix and let's see if it helps

from laminar.

palica avatar palica commented on August 18, 2024

Perfect, will wait for fix and test for you. Thank you very much.

from laminar.

ohwgiles avatar ohwgiles commented on August 18, 2024

Fix pushed to master

from laminar.

palica avatar palica commented on August 18, 2024

Works, big thank you.

Screenshot

from laminar.

palica avatar palica commented on August 18, 2024

And it works :)

Screenshot

from laminar.

palica avatar palica commented on August 18, 2024

Loving it! Thank you.

from laminar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.