運行圖像時出錯:C:\Users\10649404\Desktop\spring-boot-websocket-chat-demo>docker run -p 5000:8080 ok 2019-04-29 07:10:58.660 INFO org.glowroot - Glowroot 版本:0.10.12,內(nèi)置2018-06-22 00:08:17 +0000 2019-04-29 07:10:58.673 信息 org.glowroot-Java 版本:1.8.0_201這是我沒有得到的 jar 文件。它說失蹤lib/glowroot-embedded-collector.jar,即使它存在于該位置。2019-04-29 07:10:58.682 ERROR org.glowroot - missing lib/glowroot-embedded-collector.jar2019-04-29 07:10:58.688 ERROR org.glowroot - Glowroot not started: org.glowroot.agent.embedded.init.EmbeddedGlowrootAgentInitFactoryjava.lang.ClassNotFoundException: org.glowroot.agent.embedded.init.EmbeddedGlowrootAgentInitFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.glowroot.agent.MainEntryPoint.createGlowrootAgentInit(MainEntryPoint.java:311) at org.glowroot.agent.MainEntryPoint.start(MainEntryPoint.java:273) at org.glowroot.agent.MainEntryPoint.premain(MainEntryPoint.java:173) 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:498) at org.glowroot.agent.AgentPremain.premain(AgentPremain.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1 回答

慕妹3242003
TA貢獻(xiàn)1824條經(jīng)驗 獲得超6個贊
在您的 Dockerfile 中,您有:
ADD /opt/glowroot/lib/glowroot-embedded-collector.jar glowroot-embedded-collector.jar
這會復(fù)制根目錄中的 jar 文件,以便在以下位置獲得它:/glowroot-embedded-collector.jar
當(dāng)您說 lib/glowroot-embedded-collector.jar 可用時,您是指在主機(jī)上還是在容器內(nèi)?因為根據(jù)您的 Dockerfile,我認(rèn)為它不能出現(xiàn)在容器中。
也許嘗試以這種方式更改 ADD 語句:
ADD /opt/glowroot/lib/glowroot-embedded-collector.jar lib/glowroot-embedded-collector.jar
添加回答
舉報
0/150
提交
取消