kevinschoon / mesos-cli Goto Github PK
View Code? Open in Web Editor NEWAlternative Apache Mesos CLI
License: MIT License
Alternative Apache Mesos CLI
License: MIT License
Hill Kevin,
When I execute the mesos-cli task --shell 'echo $(date); sleep 2' | mesos-cli run --restart -
,but I get this mistake:
root@sunwuhao:~# mesos-cli task --shell 'echo $(date); sleep 2' | mesos-cli run -
2017-03-29T18:47:46.207+0800 INFO CALL {"type": "SUBSCRIBE", "framework": "&FrameworkInfo{User:root,Name:mesos-cli,ID:&FrameworkID{Value:,},FailoverTimeout:nil,Checkpoint:nil,Role:nil,Hostname:nil,Principal:nil,WebuiUrl:nil,Capabilities:[],Labels:nil,}"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x9d1e68]
goroutine 7 [running]:
github.com/vektorlab/mesos-cli/runner.LogEvent(0xc4203b00f0, 0xc4202f4060)
/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/runner/helpers.go:24 +0x668
github.com/vektorlab/mesos-cli/runner.handler.func1.1(0xc4203b00f0, 0x0, 0x0)
/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/runner/runner.go:127 +0x58
github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/scheduler/events.HandlerFunc.HandleEvent(0xc4202d4b20, 0xc4203b00f0, 0xc4203b00f0, 0x0)
/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/scheduler/events/events.go:39 +0x30
github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller.eventLoop(0xdd7b60, 0xc42023b040, 0xc42022f000, 0xdd40a0, 0xc4202d4a40, 0xdd40e0, 0xc4202d4b20, 0xc4202d7560, 0xc4203a4080, 0x0, ...)
/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller/controller.go:111 +0x129
github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller.processSubscription(0xdd7b60, 0xc42023b040, 0xc42022f000, 0xdd40a0, 0xc4202d4a40, 0xdd40e0, 0xc4202d4b20, 0xc4202d7560, 0xdd5e20, 0xc4203aa080, ...)
/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller/controller.go:96 +0xb7
github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller.(*controllerImpl).Run(0xc4202b90b8, 0xdd7b60, 0xc42023b040, 0xc42022f000, 0xdd40a0, 0xc4202d4a40, 0xdd40e0, 0xc4202d4b20, 0xc4202d7560, 0x0, ...)
/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/vendor/github.com/mesos/mesos-go/extras/scheduler/controller/controller.go:85 +0x25c
github.com/vektorlab/mesos-cli/runner.Run.func1(0xc4202b90d0, 0xc4202b90c0, 0xdd2760, 0xc4202b90b8, 0xdd7b60, 0xc42023b040, 0xc42022f000, 0xdd40a0, 0xc4202d4a40, 0xdd40e0, ...)
/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/runner/runner.go:157 +0x99
created by github.com/vektorlab/mesos-cli/runner.Run
/home/kevin/repos/go/src/github.com/vektorlab/mesos-cli/runner/runner.go:170 +0x506
mesos tasks
works alright.
mesos top
crashes.
Pasting the output, including stacktrace below.
──────────┬─────┬──────┬──────────┐
│containers│tasks│agents│frameworks│
└ ┴─────┴──────┴──────────┘
ID | CPU_USR | CPU_SYS | MEM_RSS | MEM_AVLpanic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa15ee3]
goroutine 16 [running]:
github.com/mesanine/mesos-cli/top.getContainers(0xc4200e4b80, 0xe1dcc0, 0xc42000e240, 0xb2eeb9, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/mesanine/mesos-cli/top/top.go:37 +0x573
github.com/mesanine/mesos-cli/top.Run.func1(0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/mesanine/mesos-cli/top/top.go:123 +0xa2
github.com/mesanine/mesos-cli/vendor/github.com/vektorlab/toplib.collect(0xc420054b40, 0xc420107530)
/go/src/github.com/mesanine/mesos-cli/vendor/github.com/vektorlab/toplib/top.go:92 +0x65
created by github.com/mesanine/mesos-cli/vendor/github.com/vektorlab/toplib.Run
/go/src/github.com/mesanine/mesos-cli/vendor/github.com/vektorlab/toplib/top.go:110 +0xd7
The docker registry doesn't look like it's publicly available:
Using default tag: latest
Pulling repository quay.io/vektorcloud/mesos-cli
Error: Status 403 trying to pull repository vektorcloud/mesos-cli: "{\"error\": \"Permission Denied\"}"
When following a file that does not update very frequently, the offset is continually increased even when it exceeds the total file size and no data is returned. Seems like there's just a missing check to see if the offset should actually be incremented.
Here is the request stream while following a file:
POST /api/v1 HTTP/1.1
Host: mesos004.mydomain.com:5051
User-Agent: Go-http-client/1.1
Content-Length: 305
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip
{"type":"READ_FILE","read_file":{"path":"/tmp/mesos/slaves/5c20127b-be6b-4682-90a1-409c52467e38-S4/frameworks/f0c21eef-5260-477f-b07e-9beb4f91d30d-0000/executors/myapp-server_v3.3.6.57c5af05-2456-11e7-b7fd-005056a22c7d/runs/ddb83975-7302-4ddc-be65-f85d2c36a093/stdout","offset":82001127706,"length":50000}}
HTTP/1.1 200 OK
Date: Tue, 02 May 2017 19:45:08 GMT
Content-Type: application/json
Content-Length: 60
{"read_file":{"data":"","size":54350073},"type":"READ_FILE"}POST /api/v1 HTTP/1.1
Host: mesos004.mydomain.com:5051
User-Agent: Go-http-client/1.1
Content-Length: 305
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip
{"type":"READ_FILE","read_file":{"path":"/tmp/mesos/slaves/5c20127b-be6b-4682-90a1-409c52467e38-S4/frameworks/f0c21eef-5260-477f-b07e-9beb4f91d30d-0000/executors/myapp-server_v3.3.6.57c5af05-2456-11e7-b7fd-005056a22c7d/runs/ddb83975-7302-4ddc-be65-f85d2c36a093/stdout","offset":82055477779,"length":50000}}
HTTP/1.1 200 OK
Date: Tue, 02 May 2017 19:45:08 GMT
Content-Type: application/json
Content-Length: 60
{"read_file":{"data":"","size":54350266},"type":"READ_FILE"}POST /api/v1 HTTP/1.1
Host: mesos004.mydomain.com:5051
User-Agent: Go-http-client/1.1
Content-Length: 305
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip
{"type":"READ_FILE","read_file":{"path":"/tmp/mesos/slaves/5c20127b-be6b-4682-90a1-409c52467e38-S4/frameworks/f0c21eef-5260-477f-b07e-9beb4f91d30d-0000/executors/myapp-server_v3.3.6.57c5af05-2456-11e7-b7fd-005056a22c7d/runs/ddb83975-7302-4ddc-be65-f85d2c36a093/stdout","offset":82109828045,"length":50000}}
HTTP/1.1 200 OK
Date: Tue, 02 May 2017 19:45:08 GMT
Content-Type: application/json
Content-Length: 60
{"read_file":{"data":"","size":54350266},"type":"READ_FILE"}POST /api/v1 HTTP/1.1
Host: mesos004.mydomain.com:5051
User-Agent: Go-http-client/1.1
Content-Length: 305
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip
{"type":"READ_FILE","read_file":{"path":"/tmp/mesos/slaves/5c20127b-be6b-4682-90a1-409c52467e38-S4/frameworks/f0c21eef-5260-477f-b07e-9beb4f91d30d-0000/executors/myapp-server_v3.3.6.57c5af05-2456-11e7-b7fd-005056a22c7d/runs/ddb83975-7302-4ddc-be65-f85d2c36a093/stdout","offset":82164178311,"length":50000}}
HTTP/1.1 200 OK
Date: Tue, 02 May 2017 19:45:09 GMT
Content-Type: application/json
Content-Length: 60
{"read_file":{"data":"","size":54350266},"type":"READ_FILE"}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.