![]() |
![]() |
Subject: | serviced not found in container |
Author: | Jim R |
Posted: | 2016-04-18 11:19 |
I am trying to create a new service with a container based on alpine linux.
When I try to execute a shell on the service, I see the error "Not Found" from /serviced/serviced command.
Can Control Center work with Alpine linux, or am I doing something wrong with the container
Subject: | James, |
Author: | Andrew Kirch |
Posted: | 2016-04-18 14:05 |
James,
Control Center is currently supported and tested on RHEL/CentOS 7.
Andrew Kirch
akirch@gvit.com
Need Zenoss support, consulting or custom development Look no further. Email or PM me!
Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard
Subject: | I am not trying to run |
Author: | Jim R |
Posted: | 2016-04-18 15:19 |
I am not trying to run control center on Alpine, rather the servie that I am trying to create is based on a container the uses alpine.
I have tried ubuntu and still get the same thing when trying to run get a shell on the container:
/serviced/serviced
bash: /serviced/serviced: No such file or directory
The containers fail somehow because serviced can't be executed from within the container aparently, and I am at a loss as to why.
Subject: | James, |
Author: | Andrew Kirch |
Posted: | 2016-04-18 15:44 |
James,
When you're creating that container, are you doing it with docker, or serviced I just spoke with Ian and confirmed that:
If you're still having trouble, please post your service definition, and I'll have Ian take a look.
Ian also provided an example for this Control Center article.
Thanks!
Andrew Kirch
akirch@gvit.com
Need Zenoss support, consulting or custom development Look no further. Email or PM me!
Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard
Subject: | I have had the same issue |
Author: | Jan Garaj |
Posted: | 2016-04-19 00:21 |
I have had the same issue with previous version of CC and with CentOS image and I gave it up. Serviced binary is there and you can execute it manually, however CC has still "not found error" => CC is tested only for Zenoss Docker images. Other Docker images might be a problem. CC is great concept, you don't need to worry about networking, port mapping, monitoring, ... But I recommend Kubernetes for non Zenoss Docker containers in production. However it's much more complex product.
Devops Monitoring Expert advice:
Dockerize/automate/monitor all the things.
DevOps stack:
Docker / Kubernetes / Mesos / Zabbix / Zenoss / Grafana / Puppet / Ansible / Vagrant / Terraform /
Elasticsearch
Subject: | { |
Author: | Jim R |
Posted: | 2016-04-19 11:13 |
{
"ID": "",
"Name": "fluentd",
"Version": "1",
"Description": "FluentD for Control Center",
"Services": [
{
"Name": "fluentd",
"Title": "FluentD",
"Version": "1",
"Command": "fluentd -c /fluentd/etc/fluent.conf -p /fluentd/plugins",
"Description": "FluentD for Control Center",
"Tags": null,
"ImageID": "fluent/fluentd",
"Instances": {
"Min": 1,
"Max": 0,
"Default": 3
},
"ChangeOptions": null,
"Launch": "auto",
"HostPolicy": "",
"Hostname": "",
"Privileged": false,
"ConfigFiles": {
"/fluentd/etc/fluent.conf": {
"Filename": "/fluentd/etc/fluent.conf",
"Owner": "root:root",
"Permissions": "0664",
"Content": "\u003cmatch td.*.*\u003e\n type tdlog\n apikey YOUR_API_KEY\n\n auto_create_table\n buffer_type file\n buffer_path /var/log/td-agent/buffer/td\n \n \u003csecondary\u003e\n type file\n path /var/log/td-agent/failed_records \n\u003c/secondary\u003e\n \n\u003c/match\u003e\n \n \u003cmatch debug.**\u003e\n type stdout\n \u003c/match\u003e\n \n \u003cmatch zenoss.**\u003e\n type stdout\n \u003c/match\u003e\n \u003csource\u003e\n type forward\n \u003c/source\u003e\n \u003csource\u003e\n type http\n port 8888\n \u003c/source\u003e\n \n \u003csource\u003e\n type debug_agent\n bind 127.0.0.1\n port 24230\n \u003c/source\u003e\n"
}
},
"Context": null,
"Endpoints": [
{
"Name": "fluentd",
"Purpose": "export",
"Protocol": "tcp",
"PortNumber": 8888,
"PortTemplate": "",
"VirtualAddress": "",
"Application": "fluentd",
"ApplicationTemplate": "",
"AddressConfig": {
"Port": 8888,
"Protocol": "tcp"
},
"VHosts": [
"fluentd"
]
}
],
"Services": [],
"Tasks": null,
"LogFilters": null,
"Volumes": [],
"LogConfigs": null,
"Snapshot": {
"Pause": "",
"Resume": ""
},
"RAMCommitment": "1G",
"CPUCommitment": 1,
"Runs": null,
"Actions": null,
"HealthChecks": {
"running": {
"Script": "ps -ef | grep fluent",
"Interval": 10,
"Timeout": 0
}
},
"Prereqs": null,
"MonitoringProfile": {
"MetricConfigs": null,
"GraphConfigs": null,
"ThresholdConfigs": null
},
"MemoryLimit": 0,
"CPUShares": 0,
"PIDFile": ""
}
],
"ConfigFiles": null,
"ServicedVersion": {
"Version": "1.0.8",
"Date": "Thu Nov 12 07:22:47 UTC 2015",
"Gitbranch": "HEAD",
"Gitcommit": "7f4e475",
"Giturl": "",
"Buildtag": "jenkins-serviced-1.0.x-build-291",
"Release": "1.0.8-1"
},
"TemplateVersion": {
"branch": "unknown",
"commit": "unknown",
"repo": "unknown",
"tag": "unknown"
}
}
Here is the service definition:
Subject: | No, we test it on all kinds |
Author: | [Not Specified] |
Posted: | 2016-04-19 13:00 |
No, we test it on all kinds of images. Also, the Zenoss images aren't anything special. They're very simple Docker images with nothing serviced-specific involved.
What's the command you're running to try to get a shell I just tested this with a bare Ubuntu image running a simple Python web server and it functioned as expected.
Subject: | If i import the above |
Author: | Jim R |
Posted: | 2016-04-19 13:12 |
If i import the above service, and run serviced service shell fluentd, i get the "not found error"
If I run "docker run -v /opt/serviced/bin:serviced fluent/fluentd /bin/sh", I still get the same error.
Could this be some kind of filesystem weirdness, where the mount is not allowing the executable to actually tun
Subject: | No, the docker run command |
Author: | [Not Specified] |
Posted: | 2016-04-19 13:35 |
No, the docker run command you've specified is invalid. When you run "docker run," there's nothing tellling it to run serviced at all. The only thing that executes serviced in the container is serviced itself, when it starts a service or shell. Your "docker run" isn't doing anything that is related to serviced at all, other than mounting a directory.
So, to be clear, you import the service template, deploy an instance of the service, then try serviced service shell fluentd Please run "serviced service list".
Subject: | I was trying to run the same |
Author: | Jim R |
Posted: | 2016-04-19 14:34 |
I was trying to run the same command that serviced is running when I run serviced service shell, just to try and fuigure out what is happening.
As to your question, yes, I imported the template, deployed the application , and then tried the shell command.
Here is what I see from serviced service list:
$ serviced service list
NAME SERVICEID INST IMAGEID POOL DSTATE LAUNCH DEPID
fluentd 8stcjeoxe3aqz1sg04qp3fybm 3 .../8stcjeo.../fluentd default 1 auto Initial
Subject: | Here is what I see: |
Author: | Jim R |
Posted: | 2016-04-19 15:32 |
Here is what I see:
$ serviced service shell -i fluentd bash
I0419 15:31:04.106883 07360 server.go:344] Connected to the control center at port 10.228.70.94:4979
I0419 15:31:04.109583 07360 server.go:363] Getting image localhost:5000/1gfqg1thctvu2iekf0b9s51bu/emffluent:latest
I0419 15:31:04.190944 07360 server.go:451] Acquiring image from the dfs...
I0419 15:31:04.382368 07360 server.go:456] Acquired! Starting shell
WARNING: Error loading config file:stat /root/.docker/config.json: permission denied
no such file or directory
Error response from daemon: Cannot start container 15b21954d3123247ee06e2bb8c083c7299c2195ee862f66e5b2340fe4fc3b913: [8] System error: no such file or directory
exit status 1
< |
Previous unknown dmp file in /tmp folder |
Next Network Subnet Change |
> |