Skip to content

SantaBarbaraDataSystems

— IT happens.

  • /SBDS.com/etc/
  • /SBDS.com/root/

Month: March 2017

delete

Posted on March 9, 2017 - March 14, 2017 by elijah

Find and delete a bunch of files:

find /var/log/ -name '*.gz' -exec rm {} +

Note: Concluding with ‘+’ rather than ‘\;’ should be faster by not running rm on every instance from find.

Confirm before delete:

find /var/log/ -name '*.gz' -exec rm -i {} +

Include directories:

find /var/log/ -name '*.gz' -exec rm -r {} +

Truncate instead:

find /var/log/ -name '*log' -type f -exec truncate -s 0 {} +

Delete empty directories:

find /path/to/dir -empty -type d -delete

 

Posted in Centos7, useful commands

cabon-cache TLS error after update

Posted on March 6, 2017 - March 7, 2017 by elijah

After running updates, carbon-cache throws the folling error on a service restart.

systemctl status carbon-cache
● carbon-cache.service - Graphite Carbon Cache
 Loaded: loaded (/usr/lib/systemd/system/carbon-cache.service; enabled; vendor preset: disabled)
 Active: failed (Result: exit-code) since Mon 2017-03-06 11:04:37 PST; 6s ago
 Process: 31672 ExecStart=/usr/bin/carbon-cache --config=/etc/carbon/carbon.conf --pidfile=/var/run/carbon-cache.pid --logdir=/var/log/carbon/ start (code=exited, status=1/FAILURE)
 Main PID: 16619 (code=exited, status=0/SUCCESS)

Mar 06 11:04:37 acme.com carbon-cache[31672]: from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
Mar 06 11:04:37 acme.com carbon-cache[31672]: File "/usr/lib64/python2.7/site-packages/twisted/protocols/tls.py", line 63, in <module>
Mar 06 11:04:37 acme.com carbon-cache[31672]: from twisted.internet._sslverify import _setAcceptableProtocols
Mar 06 11:04:37 acme.com carbon-cache[31672]: File "/usr/lib64/python2.7/site-packages/twisted/internet/_sslverify.py", line 38, in <module>
Mar 06 11:04:37 adme.com carbon-cache[31672]: TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
Mar 06 11:04:37 acme.com carbon-cache[31672]: AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'
Mar 06 11:04:37 acme.com systemd[1]: carbon-cache.service: control process exited, code=exited status=1
Mar 06 11:04:37 acme.com systemd[1]: Failed to start Graphite Carbon Cache.
Mar 06 11:04:37 acme.com systemd[1]: Unit carbon-cache.service entered failed state.
Mar 06 11:04:37 acme.com systemd[1]: carbon-cache.service failed.

This seems to relate to changes to TLS version support in pyOpenSSL/OpenSSL. I’m not using TLS for carbon-cache, I don’t think, so disabling the reference in Twisted framework’s respective file should be fine. Comment out the lines referenced in the above error, like so:

sed -i 's/TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,/#TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,/g' /usr/lib64/python2.7/site-packages/twisted/internet/_sslverify.py
sed -i 's/TLSVersion.TLSv1_2: SSL.OP_NO_TLSv1_2,/#TLSVersion.TLSv1_2: SSL.OP_NO_TLSv1_2,/g' /usr/lib64/python2.7/site-packages/twisted/internet/_sslverify.py

 

Posted in errors

Recent Posts

  • delete
  • cabon-cache TLS error after update
  • setup Firewalld
  • Apache security settings
  • curl for public IP address

Categories

  • Apache
  • Centos7
  • errors
  • Firewalld
  • installs
  • Mutt
  • networking
  • Python
  • server configs
  • useful commands

Recent Comments

    Archives

    • March 2017
    • January 2017
    • December 2016
    • October 2016
    • August 2016

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Proudly powered by WordPress | Theme: micro, developed by DevriX.