Author:
erics , December 3rd, 2020
Problem While running the aws cli command from a Perl async command inside apid, I go the following error:
IOError : [ Errno 10 ] No child processes
Solution The issue turned out to be a bug in Python2.7, so I upgraded to Python3.4, then uninstalled and re-installed the aws cli software so that it used the proper Python34 version. Procedure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sudo - i
cd
## Upgrade Python
yum install python34
alternatives -- config python
## "Uninstall" old aws cli
mv / opt / aws / opt / aws . fcs
cd / usr / bin /
mv aws aws . fcs
mv aws_completer aws_completer . fcs
## Install new aws cli
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" - o "awscliv2.zip"
unzip awscliv2 . zip
. / aws / install - i / opt / aws - b / usr / bin
/ usr / bin / aws -- version
https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html […]
Categories: How-To's , Technology Tags: alternatives , API , apid , AWS , aws cli , AWS Linux , Broken , cli , Cloudformation , Command , Curl , Error , Exec , Execute , howto , IOError , Linux , No child processes , perl , Python , Python27 , Python34 , tips , Yum
| No comments
Author:
erics , May 6th, 2020
I ran letsencrypt-auto renew and got the following error:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
root @ prod06b : / etc / httpd / conf . d # /root/letsencrypt/letsencrypt-auto renew
Error : couldn 't get currently installed version for / opt / eff . org / certbot / venv / bin / letsencrypt :
Traceback ( most recent call last ) :
File "/opt/eff.org/certbot/venv/bin/letsencrypt" , line 7 , in < module >
from certbot . main import main
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py" , line 2 , in < module >
from certbot . _internal import main as internal_main
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/_internal/main.py" , line 10 , in < module >
import josepy as jose
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/__init__.py" , line 41 , in < module >
from josepy . interfaces import JSONDeSerializable
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/interfaces.py" , line 7 , in < module >
from josepy import errors , util
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/util.py" , line 7 , in < module >
import OpenSSL
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/__init__.py" , line 8 , in < module >
from OpenSSL import crypto , SSL
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/crypto.py" , line 12 , in < module >
from cryptography import x509
ImportError : No module named cryptography
The solution in this article gave me the answer:
sudo rm - rf / opt / eff . org / *
sudo pip install - U certbot
sudo certbot renew -- debug
Turns out Python was old at version 2.7, so did the following also:
sudo yum - y install python36
sudo alternatives -- config python
sudo pip install -- upgrade pip
Also had to change the cron job script to call certbot directly instead of letsencrypt-auto : vi /root/letsencrypt-cron.sh
#!/bin/sh
#
# letsencrypt-cron.sh
#
#OLD: if ! /root/letsencrypt/letsencrypt-auto renew > /var/log/letsencrypt/renew.log 2>&1 ; then
#NEW:
if ! / usr / bin / certbot renew > / var / log / letsencrypt / renew . log 2 > & 1 ; then
echo Automated renewal failed :
cat / var / log / letsencrypt / renew . log
exit 1
fi
apachectl graceful
Categories: How-To's , Technology Tags: AWS , AWS Linux , cert , Certbot , howto , Install , Linux , pip , Python , Renew , ssl , tips , upgrade , Yum
| No comments
Author:
erics , March 29th, 2016
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" - o "awscliv2.zip"
unzip awscliv2 . zip
sudo . / aws / install
AWS CLI v1
cd
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" - o "awscli-bundle.zip"
unzip awscli - bundle . zip
yum install python26
/ usr / bin / python26 awscli - bundle / install - i / opt / aws / awscli - b / usr / bin / aws
aws configure
aws s3 ls
aws ec2 describe - instances -- output text
ls -l ~/.aws
total 8
- rw -- -- -- - 1 root root 43 Mar 24 18 : 05 config
- rw -- -- -- - 1 root root 116 Mar 24 18 : 05 credentials
cat ~/.aws/config
[ default ]
output = json
region = us - east - 1
cat ~/.aws/credentials
[ default ]
aws_access_key_id = NNNNNNNNNNNNNNNNNNNN
aws_secret_access_key = NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Categories: How-To's , Technology Tags: AWS , cli , configure , Credentials , Creds , howto , Install , Python , python26 , tips , Yum
| No comments
Author:
erics , December 8th, 2015
I upgraded to Python 2.7 and yum promptly broke. The quick fix is to edit the yum executable script and change the top line that invokes Python: sudo vim which yum CHANGE FROM: #!/usr/bin/python TO: #!/usr/bin/python26 UPDATED August 2nd, 2016: On one system, I had to use the following Python 2.4 fix instead, even though […]
Categories: How-To's , Technology Tags: 2.7 , Broken , Fix , howto , Python , tips , upgrade , Yum
| No comments
Author:
erics , August 31st, 2015
Requires Python! Scalp Home https://code.google.com/p/apache-scalp/ Download Scalp: https://code.google.com/p/apache-scalp/downloads/detail?name=scalp-0.4.py Backup Link: http://www.wyzaerd.com/scalp/scalp-0.4.py Original (Broken) XML Rules File: https://dev.itratos.de/projects/php-ids/repository/raw/trunk/lib/IDS/default_filter.xml Fixed XML Rules File: http://www.wyzaerd.com/scalp/default_filter.xml To Fix the XML file: Replace: (?:all|distinct|[(!@]*)? with (?:all|distinct|[(!@]+)? and: (?i:(\%SYSTEMROOT\%)) with (?:(\%[sS][yY][sS][tT][eE][mM][rR][oO][oO][tT]\%)) Examples:
. / scalp - 0.4.py - f . / default_filter . xml - o . / scalp - output - l / var / log / httpd_log -- html
. / scalp - 0.4.py - f . / default_filter . xml - o . - l / var / www / cust1 / logs / access . log . 1440892800
Current options: exhaustive: Won’t stop at the first pattern matched, but will test all the patterns tough: Will […]
Categories: How-To's , Technology Tags: Analyze , apache , Attack , Detection , hack , Hackers , howto , IDS , Intrusion , Intrusion Detection , Log , Logs , Python , Scalp , tips
| No comments
Author:
erics , August 15th, 2013
yum install python
python / usr / bin / easy_install pip
pip install boto
Categories: How-To's , Technology Tags: Amazon , AWS , Boto , EC2 , howto , Install , Linux , pip , Python , S3 , tips , Yum
| No comments
Author:
erics , January 23rd, 2011
Managed to help a client find and fix the fatal flaw in their application and created a cloud-based infrastructure for them capable of handling heavy load in under one week. Boy, am I tired! Many thanks to the wife for understanding and supporting the workload.
Categories: Technology , Wyzaerd Tags: AWS , Cloud , dJango , Python , Varnish , WSGI
| No comments