Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon elastic beanstalk `utime';:权限被拒绝@utime\u internal-log/logstasher.log(Errno::EACCES)-logstasher_Amazon Elastic Beanstalk_Logdna - Fatal编程技术网

Amazon elastic beanstalk `utime';:权限被拒绝@utime\u internal-log/logstasher.log(Errno::EACCES)-logstasher

Amazon elastic beanstalk `utime';:权限被拒绝@utime\u internal-log/logstasher.log(Errno::EACCES)-logstasher,amazon-elastic-beanstalk,logdna,Amazon Elastic Beanstalk,Logdna,我有我的logdna aws eb配置文件,我添加了一个通过logdna代理传输的文件,但我不断收到一个错误“utime”:权限被拒绝@utime\u internal-log/logstasher.log(Errno::EACCES) 在我的文件夹中,我看到logstasher.log文件位于用户webapp下,因此我不确定这是否是问题所在,但如何消除错误 commands: 01_install_logdna: command: "/home/ec2-user/logd

我有我的logdna aws eb配置文件,我添加了一个通过logdna代理传输的文件,但我不断收到一个错误
“utime”:权限被拒绝@utime\u internal-log/logstasher.log(Errno::EACCES)

在我的文件夹中,我看到logstasher.log文件位于用户webapp下,因此我不确定这是否是问题所在,但如何消除错误

commands:
  01_install_logdna:
    command: "/home/ec2-user/logdna.sh"
    test: '[[ $(/opt/elasticbeanstalk/bin/get-config environment -k RACK_ENV) = "develop" ]]'
  02_restart_logdna:
    command: "service logdna-agent restart"
    test: '[[ $(/opt/elasticbeanstalk/bin/get-config environment -k RACK_ENV) = "develop" ]]'

files:
  "/home/ec2-user/logdna.sh" :
    mode: "000777"
    owner: root
    group: root
    content: |
      #!/bin/sh
      RACK_ENV=$(/opt/elasticbeanstalk/bin/get-config environment -k RACK_ENV)
      echo "$RACK_ENV"
      if [ "$RACK_ENV" == "develop" ]
      then
        rpm --import https://repo.logdna.com/logdna.gpg
        cat >/etc/yum.repos.d/logdna.repo << 'EOL2'
      [logdna]
      name=LogDNA packages
      baseurl=https://repo.logdna.com/el6/
      enabled=1
      gpgcheck=1
      gpgkey=https://repo.logdna.com/logdna.gpg
      EOL2
        LOGDNA_INGESTION_KEY=$(/opt/elasticbeanstalk/bin/get-config environment -k LOGDNA_INGESTION_KEY)
        yum -y install logdna-agent
        logdna-agent -k $LOGDNA_INGESTION_KEY # this is your unique Ingestion Key
        # /var/log is monitored/added by default (recursively), optionally add more dirs here
        sudo chmod 777 /var/app/current/log/logstasher.log
        logdna-agent -d /var/app/current/log/logstasher.log
        logdna-agent -d /var/app/containerfiles/logs/sidekiq.log
        # logdna-agent --hostname allows you to pass your AWS env metadata to LogDNA (remove # to uncomment the line below)
        # logdna-agent --hostname `{"Ref": "AWSEBEnvironmentName" }`
        # logdna -t option allows you to tag the host with tags (remove # to uncomment the line below)
        #logdna-agent -t `{"Ref": "AWSEBEnvironmentName" }`
        chkconfig logdna-agent on
        service logdna-agent start
      fi
命令:
01\u安装\u日志DNA:
命令:“/home/ec2 user/logdna.sh”
测试:'[$(/opt/elasticbeanstalk/bin/get-config-environment-k-RACK_-ENV)=“开发”]'
02\u重新启动\u日志DNA:
命令:“服务logdna代理重新启动”
测试:'[$(/opt/elasticbeanstalk/bin/get-config-environment-k-RACK_-ENV)=“开发”]'
文件夹:
“/home/ec2 user/logdna.sh”:
模式:“000777”
所有者:root
组:根
内容:|
#!/垃圾箱/垃圾箱
RACK_ENV=$(/opt/elasticbeanstalk/bin/get-config-environment-k RACK_ENV)
回显“$RACK_ENV”
如果[“$RACK_ENV”==“开发”]
然后
rpm—导入https://repo.logdna.com/logdna.gpg
cat>/etc/yum.repos.d/logdna.repo