- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个使用 LaunchTemplate 创建 ec2 实例的 CloudFormation 模板,但我想将 cloudwatch 代理添加到实例中,但我不知道出了什么问题。
我有2个configSet,但是cfn-init卡在“02_download_app”> “Command run_app”,这部分我从/运行一个jar文件。
这是/var/log/cfn-init-cmd.log
的输出,我注意到在命令run_app之后,jar卡住了17:25
,一段时间后 17:42
我连接到实例,杀死 jar 并重新启动,它成功地继续执行脚本,我认为错误是一些编码问题,但我不知道在哪里: jar ?在log4j配置文件中?等等
2020-06-23 17:25:20,679 main ERROR Console contains an invalid element or attribute "Encoding"
configSets:
setup:
- "01_install_java"
- "02_download_app"
- "03_setupCfnHup"
- "04_config-amazon-cloudwatch-agent"
- "05_restart_amazon-cloudwatch-agent"
updateEnvironment:
- "04_config-amazon-cloudwatch-agent"
- "05_restart_amazon-cloudwatch-agent"
我关注了这个template ,这是我的模板的一部分和 cfn-init 部分。
AWSTemplateFormatVersion: 2010-09-09
Description: >-
Cloudformation template.
Metadata:
Stack:
Value: 2
VersionDate:
Value: 30032020
Identifier:
Value: template-app-stack
Input:
Description: EC2 Instance Types, DB Instance Type and Engine
Output:
Description: Outputs ID of all deployed resources
AWS::CloudFormation::Interface:
Parameters:
#....... other omitted .......#
#....... other omitted .......#
Resources:
#....... other omitted .......#
#backend autoscaling#
rBackendFleet:
Type: AWS::AutoScaling::AutoScalingGroup
Condition: cIsProduction
Properties:
AutoScalingGroupName: !Join [ '-', [!Ref pApplicationName, 'asg', !Ref pApplicationEnvironment, 'backend'] ]
VPCZoneIdentifier: !Ref pBackendSubnets
MinSize: 1
MaxSize: 10
MetricsCollection:
- Granularity: 1Minute
DesiredCapacity: 1
HealthCheckGracePeriod: 300
TargetGroupARNs:
- !Ref rPrivateLoadBalancerTargetGroup
LaunchTemplate:
LaunchTemplateId: !Ref rBackendLaunchTemplate
Version: !GetAtt rBackendLaunchTemplate.LatestVersionNumber
rBackendLaunchTemplate:
Type: AWS::EC2::LaunchTemplate
Metadata:
AWS::CloudFormation::Init:
configSets:
setup:
- "01_install_java"
- "02_download_app"
- "03_setupCfnHup"
- "04_config-amazon-cloudwatch-agent"
- "05_restart_amazon-cloudwatch-agent"
updateEnvironment:
- "04_config-amazon-cloudwatch-agent"
- "05_restart_amazon-cloudwatch-agent"
01_install_java:
packages:
apt:
unzip: []
openjdk-8-jre-headless: []
02_download_app:
files:
/tmp/backend.zip:
source: !Sub
- >-
https://${bucketName}.s3-${region}.amazonaws.com/${objectKey}
- bucketName: !Ref pSourceCodeBucketName
objectKey: !Ref pBackendArtifactObjectKey
region: !Ref AWS::Region
mode: "000644"
owner: "root"
group: "root"
authentication: rolebased
commands:
configure_app:
command: "sudo unzip backend.zip"
test: "sudo ls -la"
cwd: "/tmp"
run_app:
command: "sudo java -jar /tmp/app.jar &"
test: "sudo ps -ef | grep java"
cwd: "/"
04_config-amazon-cloudwatch-agent:
files:
/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json:
content: !Sub |
{
"metrics": {
"append_dimensions": {
"AutoScalingGroupName": "${!aws:AutoScalingGroupName}",
"ImageId": "${!aws:ImageId}",
"InstanceId": "${!aws:InstanceId}",
"InstanceType": "${!aws:InstanceType}"
},
"aggregation_dimensions":
[["AutoScalingGroupName"], ["InstanceId", "InstanceType"],[]]
,
"metrics_collected": {
"mem": {
"measurement": [
"mem_used_percent"
]
},
"swap": {
"measurement": [
"swap_used_percent"
]
}
}
},
"logs": {
"logs_collected": {
"files": {
"collect_list": [
{
"file_path": "/profuturo/app/profuturo-rest-comunicaciones/logs/profuturo-rest-comunicaciones.log",
"log_group_name": "/var/log/${pApplicationName}-${pApplicationEnvironment}",
"log_stream_name": "{instance_id}",
"timestamp_format": "%Y-%m-%d %H:%M:%S,%f",
"multi_line_start_pattern": "{timestamp_format}"
}
]
}
}
}
}
05_restart_amazon-cloudwatch-agent:
commands:
01_stop_service:
command: "/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a stop"
02_start_service:
command: "/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json -s"
03_setupCfnHup:
files:
/etc/cfn/cfn-hup.conf:
content: !Sub |
[main]
stack=${AWS::StackName}
region=${AWS::Region}
verbose=true
interval=1
mode: "000400"
owner: "root"
group: "root"
/etc/cfn/hooks.d/amazon-cloudwatch-agent-auto-reloader.conf:
content: !Sub |
[cfn-auto-reloader-hook]
triggers=post.update
path=Resources.rBackendLaunchTemplate.Metadata.AWS::CloudFormation::Init.04_config-amazon-cloudwatch-agent
action=/opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource rBackendLaunchTemplate --configsets updateEnvironment --region ${AWS::Region}
runas=root
mode: "000400"
owner: "root"
group: "root"
/lib/systemd/system/cfn-hup.service:
content: !Sub |
[Unit]
Description=cfn-hup daemon
[Service]
Type=simple
ExecStart=/opt/aws/bin/cfn-hup
Restart=always
[Install]
WantedBy=multi-user.target
mode: "000400"
owner: "root"
group: "root"
commands:
01enable_cfn_hup:
command: "systemctl enable cfn-hup.service"
02start_cfn_hup:
command: "systemctl start cfn-hup.service"
AWS::CloudFormation::Authentication:
rolebased:
type: S3
buckets:
- !Sub ${pSourceCodeBucketName}
roleName:
Ref: pInstanceRole
Properties:
LaunchTemplateName: !Join [ '-', [!Ref pApplicationName, 'lt', !Ref pApplicationEnvironment, 'backend'] ]
LaunchTemplateData:
BlockDeviceMappings:
- Ebs:
VolumeSize: 10
VolumeType: gp2
DeviceName: /dev/sda1
SecurityGroupIds:
- !Ref rBackendSecurityGroup
EbsOptimized: false
IamInstanceProfile:
Arn: !GetAtt rRootInstanceProfile.Arn
ImageId: !Ref pBackendAMI
InstanceType: !Ref pBackendInstanceType
KeyName: !Ref pKeyName
Monitoring:
Enabled: true
UserData:
Fn::Base64: !Sub |
#!/bin/bash -xe
sudo apt-get update -y
sudo apt-get install -y python
sudo apt-get install -y python-setuptools
sudo apt-get install -y python-pip
wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb -O /tmp/amazon-cloudwatch-agent.deb
dpkg -i /tmp/amazon-cloudwatch-agent.deb
sudo mkdir -p /opt/aws/bin
sudo python /usr/lib/python2.7/dist-packages/easy_install.py --script-dir /opt/aws/bin https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
sudo /opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource rBackendLaunchTemplate --configsets setup,updateEnvironment --region ${AWS::Region}
sudo /opt/aws/bin/cfn-signal -e $? -r "Backend setup done." --stack ${AWS::StackName} --resource rBackendLaunchTemplate --region ${AWS::Region}
........
#App Tier Autoscaling#
#....... other omitted .......#
我观看了/var/log/cloud-init-output.log,但没有任何错误线索,说这是一些编码问题,但在哪一步?
+ sudo /opt/aws/bin/cfn-init -v --stack cwp-prod --resource rBackendLaunchTemplate --configsets setup,updateEnvironment --region us-west-2
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 290: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 290: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13224: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 290: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 290: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 290: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 290: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 290: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13233: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 309: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 290: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 114: ordinal not in range(128)
Logged from file util.py, line 503
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 891, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 130: ordinal not in range(128)
Logged from file util.py, line 503
+ sudo /opt/aws/bin/cfn-signal -e 0 -r 'Backend setup done.' --stack cwp-prod --resource rBackendLaunchTemplate --region us-west-2
ValidationError: Stack arn:aws:cloudformation:us-west-2:496852590701:stack/cwp-prod/80743380-b533-11ea-9ea4-02e40fd26800 is in CREATE_COMPLETE state and cannot be signaled
Cloud-init v. 19.3-41-gc4735dd3-0ubuntu1~18.04.1 running 'modules:final' at Tue, 23 Jun 2020 20:31:35 +0000. Up 23.76 seconds.
2020-06-23 21:31:14,217 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [1]
2020-06-23 21:31:14,223 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2020-06-23 21:31:14,226 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
Cloud-init v. 19.3-41-gc4735dd3-0ubuntu1~18.04.1 finished at Tue, 23 Jun 2020 21:31:14 +0000. Datasource DataSourceEc2Local. Up 3602.81 seconds
最佳答案
我猜你指的是这个sudo java -jar/tmp/app.jar &
?我认为你应该在 test
完成后在 Init
中杀死它。
实现此目的的一种方法如下:
run_app:
command: |
sudo java -jar /tmp/app.jar &
PROCESS_ID=$!
test: "sudo ps -ef | grep java"
cwd: "/"
run_app_kill:
command: "sudo kill -9 $PROCESS_ID"
我认为一般情况下也不需要sudo
。由于您没有对步骤进行编号,因此必须确保 run_app_kill
在 run_app
之后运行。
关于amazon-web-services - CloudFormation - 在 EC2 实例上安装和配置 CloudWatch 代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62545259/
我听说最好不要从您系统的 Perl 版本所在的 CPAN 安装模块。我知道如何使用命令行安装模块,我只是想知道是否有办法将 CPAN 与系统核心 Perl 分开。 我应该: 下载源代码并专门为这些模块
我听说最好不要从系统的 Perl 版本所在的 CPAN 安装模块。我知道如何使用命令行安装模块,我只是想知道是否有办法将 CPAN 与系统的核心 Perl 分开。 我应该: 下载源代码并专门为这些模块
单独安装 electron 与通过 electron-builder 安装有什么区别?我正在使用 React 构建一个 Electron 应用程序,并且已经找到了一些教程。它们安装 Electron
两者安装有什么区别?我按照安装页面上的说明在全局范围内安装了 webpack,然后我转到了入门指南,据说在那里可以在本地安装 webpack-cli。 CLI = Command Line Inter
我在 OS X Yosemite 上用 PHP 安装了默认的 Apache 服务器,安装了 pear,用 brew 安装了 Solr (brew install solr),现在我正在尝试使用 PEC
我解压并编译了 Ruby 2.1 并安装了几个支持工具。 但是当我安装了 libssl-dev 时,OpenSSL 不会安装。 我在支持 openssl 时遇到这个错误: make: *** No r
我在 android studio 2.3.1 和 gradle 3.2 中设计了 2 到 3 个应用程序。当我从它运行应用程序到任何设备或模拟器时,一切都工作正常。但是当我从构建文件夹中获取该 ap
我注意到我正在读一本书提到通过 apt-get 安装 numpy 和 opencv apt-get install python-numpy python-opencv 但我可以通过以下方式在 pip
我正在尝试在 Windows 8.1 上安装 ansicon。我提取了文件并达到了我需要调用 ansicon -i 的级别。当我在 cmd 中输入此内容并运行 python 脚本时效果很好,但是当我通
我有 linux MINT 17.3 Kernel 4.4.0-81 所有更新可用。 (由于不同的原因,我无法迁移到更新版本的 ubuntu/mint) 我已经通过 PPA 安装了 FFMPEG(不是
尝试在本地运行我的应用程序时出现错误: 我只在 chrome 浏览器中收到此错误。我尝试过不同的东西,但我不确定为什么它是 Chrome 特定的。 最佳答案 我怀疑这不是 Firebase 问题,而是
这是我第一次开发 AngularJS 应用程序并使用脚手架工具 Yeoman ( http://yeoman.io/ )。我想对我的一些图标使用 fontawesome ( http://fortaw
我知道您通常“应该”$ pip install 如果包没有 brew ,但如果有一个你想安装的 python 包,你可以使用 $ pip install或 $ brew install为了?例如,通过
我正在尝试通过 RVM 安装 Ruby 1.9.3。然而,当谈到安装 RubyGems 时,我得到了这个: curl: (22) The requested URL returned error: 4
我是真正提出问题的新手,但你去吧。 我一直在尝试按照安装指南添加 dnsname: https://github.com/containers/dnsname https://github.com/c
Studio更新至0.4.0 建筑产量为“需要1.8版Gradle”;将设置设置为1.8 bin目录; 建立 “要求1.9级”;将设置设置为1.9 bin; 建立 “要求1.8级” 啊。不知道该怎么做
我刚刚注意到 kernel.org 因维护而停机。是否有使用不同镜子的不同公式?或者我可以向 Homebrew 软件添加不同的来源(如 bundler ?)? 谢谢你的帮助! 最佳答案 快速解决方法:
当我运行时: peardev install phpunit/PHPUnit 我得到以下信息: No releases available for package "pear.phpunit.de/P
服务器操作系统为Fedora 24. 64bit。 我想安装 Git 2.6.6。 所以下载源码并安装。 此服务器离线。所以我不使用“yum”。 ./configure --prefix=/usr/l
我正在尝试在我自己的服务器(操作系统:Linux Ubuntu Server 12.04)上安装 OpenEdX,但我遇到了同样的错误。谁能帮帮我? TASK: [ insights | insta
我是一名优秀的程序员,十分优秀!