Giter VIP home page Giter VIP logo

Comments (10)

dnsmichi avatar dnsmichi commented on May 26, 2024

Graphite is installed via pip provider inside the puppet-graphite module. It should provide a systemd unit file and as such you can control its status with systemctl status carbon-cache for example.

from icinga-vagrant.

Dumbaz avatar Dumbaz commented on May 26, 2024

That is correct but carbon-cache is not correctly installed after a vagrant up

[root@icinga2 ~]# systemctl enable carbon-cache
carbon-cache.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig carbon-cache on
[root@icinga2 ~]# systemctl start carbon-cache
Job for carbon-cache.service failed because the control process exited with error code. See "systemctl status carbon-cache.service" and "journalctl -xe" for details.
[root@icinga2 ~]# systemctl status carbon-cache.service
● carbon-cache.service - LSB: Start/Stop carbon-cache
   Loaded: loaded (/etc/rc.d/init.d/carbon-cache; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-04-26 15:54:03 UTC; 9s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 17380 ExecStart=/etc/rc.d/init.d/carbon-cache start (code=exited, status=203/EXEC)

Apr 26 15:54:03 icinga2 systemd[1]: Starting LSB: Start/Stop carbon-cache...
Apr 26 15:54:03 icinga2 systemd[1]: carbon-cache.service: control process e...03
Apr 26 15:54:03 icinga2 systemd[1]: Failed to start LSB: Start/Stop carbon-...e.
Apr 26 15:54:03 icinga2 systemd[1]: Unit carbon-cache.service entered faile...e.
Apr 26 15:54:03 icinga2 systemd[1]: carbon-cache.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

All of this is fixed after installing it via yum

[root@icinga2 ~]# yum install python-carbon
[...]
Installed:
  python-carbon.noarch 0:0.9.15-6.el7

Dependency Installed:
  pyserial.noarch 0:2.6-5.el7
  python-twisted-core.x86_64 0:12.2.0-4.el7
  python-whisper.noarch 0:0.9.15-1.el7

Complete!
[root@icinga2 ~]# systemctl enable carbon-cache
Created symlink from /etc/systemd/system/multi-user.target.wants/carbon-cache.service to /usr/lib/systemd/system/carbon-cache.service.
[root@icinga2 ~]# systemctl start carbon-cache
[root@icinga2 ~]#
[root@icinga2 ~]# systemctl status carbon-cache.service
● carbon-cache.service - Graphite Carbon Cache
   Loaded: loaded (/usr/lib/systemd/system/carbon-cache.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-04-26 15:54:51 UTC; 3s ago
  Process: 18024 ExecStart=/usr/bin/carbon-cache --config=/etc/carbon/carbon.conf --pidfile=/var/run/carbon-cache.pid --logdir=/var/log/carbon/ start (code=exited, status=0/SUCCESS)
 Main PID: 18031 (carbon-cache)
   CGroup: /system.slice/carbon-cache.service
           └─18031 /usr/bin/python2 -s /usr/bin/carbon-cache --config=/etc/ca...

Apr 26 15:54:51 icinga2 systemd[1]: Starting Graphite Carbon Cache...

If this is out of scope because you do not control the puppet module feel free to close the issue.

from icinga-vagrant.

dnsmichi avatar dnsmichi commented on May 26, 2024

The Puppet module is just an easy way to install things. Choosing pip was for the reason of non-existing or broken packages for 0.9.x.

I'd like to know why carbon-cache failed to start. Installing a package from a different source fixing the issue isn't something I would do as a workaround, but fix the real issue.

from icinga-vagrant.

dnsmichi avatar dnsmichi commented on May 26, 2024

I just did a full vagrant up, and carbon-cache is running. It might be the case that you've shutdown the VM, or have put your desktop to sleep. Sometimes services do not come up after that, but a manual systemctl restart carbon-cache will for example solve the issue.

michi@mbmif ~/coding/icinga/icinga-vagrant/icinga2x (master *+=) $ vagrant ssh
sudo -i
Last login: Wed Apr 26 16:02:42 2017
 _____     _                     ___
|_   _|   (_)                   |__ \
  | |  ___ _ _ __   __ _  __ _     ) |
  | | / __| | '_ \ / _` |/ _` |   / /
 _| || (__| | | | | (_| | (_| |  / /_
|_____\___|_|_| |_|\__, |\__,_| |____|
                    __/ |
                   |___/
sudo -i
[vagrant@icinga2 ~]$ sudo -i
[root@icinga2 ~]# systemctl status carbon-cache
● carbon-cache.service - LSB: Start/Stop carbon-cache
   Loaded: loaded (/etc/rc.d/init.d/carbon-cache; bad; vendor preset: disabled)
   Active: active (running) since Wed 2017-04-26 16:12:37 UTC; 15h ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/carbon-cache.service
           └─12959 python -W ignore /opt/graphite/bin/carbon-cache.py --instance=a start

from icinga-vagrant.

Dumbaz avatar Dumbaz commented on May 26, 2024

I went trough the logs of the provisioning, and found the following lines related to carbon-cache

==> icinga2: Notice: /Stage[main]/Graphite::Config/File[/opt/graphite/storage/log/carbon-cache]/ensure: created
==> icinga2: Notice: /Stage[main]/Graphite::Config/File[/etc/init.d/carbon-cache]/ensure: defined content as '{md5}e75116fd7e84b1d146e66545c6b0a254'
==> icinga2: Error: Could not start Service[carbon-cache]: Execution of '/bin/systemctl start carbon-cache' returned 1: Job for carbon-cache.service failed because the control process exited with error code. See "systemctl status carbon-cache.service" and "journalctl -xe" for details.
==> icinga2: Error: /Stage[main]/Graphite::Config/Service[carbon-cache]/ensure: change from stopped to running failed: Could not start Service[carbon-cache]: Execution of '/bin/systemctl start carbon-cache' returned 1: Job for carbon-cache. service failed because the control process exited with error code. See "systemctl status carbon-cache.service" and "journalctl -xe" for details.
==> icinga2: Notice: /Stage[main]/Graphite::Config/Service[carbon-cache]: Triggered 'refresh' from 3 events

There are a couple of skips because of failed dependencies, all are in relation to carbon-cache.
Pip has been installed, ==> icinga2: Notice: /Stage[main]/Main/Package[python2-pip]/ensure: created

I confirmed pip is in working condition, so it´s not a proxy problem either.

[root@icinga2 ~]# pip install flask
Successfully installed Jinja2-2.9.6 MarkupSafe-1.0 Werkzeug-0.12.1 click-6.7 flask-0.12.1 itsdangerous-0.24
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I have not found the cause for it yet, but will look further into it if I have the time today.

from icinga-vagrant.

dnsmichi avatar dnsmichi commented on May 26, 2024

Hmmm, can you vagrant ssh into the box at this time, and check systemctl status carbon-cache? Also the syslog entries which cause this.

from icinga-vagrant.

xtra-be avatar xtra-be commented on May 26, 2024

we also ran into the issue
it's caused because the file https://github.com/Icinga/icinga-vagrant/blob/master/modules/graphite/templates/etc/init.d/RedHat/carbon-cache.erb
is in dos format
changing this to unix fixes this issue
but the files in https://github.com/Icinga/icinga-vagrant/tree/master/icinga2x/files/usr/local/bin are also in dos format an cause issues later on

from icinga-vagrant.

dnsmichi avatar dnsmichi commented on May 26, 2024

So your git clone modifies crlf on Windows, which results in broken files inside the Linux guest then.

I've recently updated the docs for Windows git clones, please ensure that git clone does not modify the cloned files at all.

https://github.com/icinga/icinga-vagrant#windows

from icinga-vagrant.

Dumbaz avatar Dumbaz commented on May 26, 2024

You´re right. Closed.

from icinga-vagrant.

dnsmichi avatar dnsmichi commented on May 26, 2024

Thanks for your feedback :)

from icinga-vagrant.

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.