2015-01-29 6 views
0

Openshift 응용 프로그램 (wildfly cartridge)에 new-relic jar를 설치하려하지만 permission denied과 함께 실패합니다. 여기에 로그가 있습니다Openshift : New Relic Jar 파일을 설치하는 동안 사용 권한이 거부되었습니다.

\> java -jar newrelic.jar install 
Jan 29, 2015 15:01:14 -0500 [64858 1] com.newrelic INFO: Agent is using Logback 
***** ((o)) New Relic Java Agent Installer 
***** Installing version 3.13.0 ... 
Problem writing file to disk 
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf.20150129_150114 (Permission denied) 
    at java.io.FileOutputStream.open(Native Method) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:206) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:95) 
    at java.io.FileWriter.<init>(FileWriter.java:63) 
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273) 
    at com.newrelic.agent.util.EditableFile.backup(EditableFile.java:251) 
    at com.newrelic.agent.install.SelfInstaller.backup(SelfInstaller.java:125) 
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:51) 
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:35) 
    at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138) 
    at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81) 
    at com.newrelic.agent.Agent.main(Agent.java:261) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:483) 
    at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84) 
Problem writing file to disk 
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf (Permission denied) 
    at java.io.FileOutputStream.open(Native Method) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:206) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:95) 
    at java.io.FileWriter.<init>(FileWriter.java:63) 
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273) 
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:263) 
    at com.newrelic.agent.util.EditableFile.append(EditableFile.java:240) 
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:55) 
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:35) 
    at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138) 
    at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81) 
    at com.newrelic.agent.Agent.main(Agent.java:261) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:483) 
    at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84) 
Added agent switch to start script /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf 
Problem writing file to disk 
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf.20150129_150114 (Permission denied) 
    at java.io.FileOutputStream.open(Native Method) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:206) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:95) 
    at java.io.FileWriter.<init>(FileWriter.java:63) 
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273) 
    at com.newrelic.agent.util.EditableFile.backup(EditableFile.java:251) 
    at com.newrelic.agent.install.SelfInstaller.backup(SelfInstaller.java:125) 
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:51) 
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:37) 
    at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138) 
    at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81) 
    at com.newrelic.agent.Agent.main(Agent.java:261) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:483) 
    at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84) 
Problem writing file to disk 
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf (Permission denied) 
    at java.io.FileOutputStream.open(Native Method) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:206) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:95) 
    at java.io.FileWriter.<init>(FileWriter.java:63) 
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273) 
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:263) 
    at com.newrelic.agent.util.EditableFile.append(EditableFile.java:240) 
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:55) 
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:37) 
    at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138) 
    at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81) 
    at com.newrelic.agent.Agent.main(Agent.java:261) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:483) 
    at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84) 
Added agent switch to start script /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf 
No need to create New Relic configuration file because: 
.:. A config file already exists: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/newrelic/newrelic.yml 
***** Install successful 
***** Next steps: 
You're almost done! To see performance data for your app: 
.:. Restart your app server 
.:. Exercise your app 
.:. Log into http://rpm.newrelic.com 
Within two minutes, your app should show up, ready to monitor and troubleshoot. 
If app data doesn't appear, check newrelic/logs/newrelic_agent.log for errors. 

어떻게 설치할 수 있습니까? 허가를 어디서 얻을 수 있습니까?

답변

0

NewRelic이 ~/wildfly/bin/standalone.conf에서 발견 한 WildFly 구성 파일의 백업을 만들려고하는 것처럼 보입니다. ~/wildfly/bin 당신이 그것의 권한 및 항목에서 볼 수 은 제이보스 카트리지에 의해 잠겨 있기 때문에 불행히도 인해 실패 카트리지의 managed_files.yml :

\> ls -ld wildfly/bin/ 
drwxr-xr-x. 6 root 544c2c3be0b8cdf8da000253 4096 Dec 23 20:01 wildfly/bin/ 

\> cat wildfly/metadata/managed_files.yml 
--- 
[...] 
locked_files: 
- bin/ 
- bin/* 
[...] 

내가 복잡성의 순서로, 세 가지 옵션을 참조하십시오.

  1. newrelic.jar이 구성 파일의 백업을 수행하지 않는 플래그를 허용하는지 확인하십시오.

  2. newrelic.jar이 자동으로 standalone.conf을 수정하려고 시도 했으므로 권한이있는 곳에서 WildFly가있는 로컬 환경에서이 단계를 실행 해보십시오. 그런 다음 OpenShift git에 새로운 standalone.conf을 체크인하십시오.

  3. 만들어라 WildFly cart repomanaged_files.ymllocked_files 키에서 bin/bin/* 항목을 제거합니다. 그러나 장바구니의 bin/setup 스크립트에서 수동으로 생성해야합니다. 일반적으로 잠금 기능이이를 수행합니다. 자세한 내용은 Locking cartridges을 참조하십시오.