Jenkins启动失败

1rhkuytd  于 2023-08-03  发布在  Jenkins
关注(0)|答案(1)|浏览(318)

我已经安装了java11,然后我试图启动jenkins,但总是失败

-- Unit jenkins.service has begun starting up.
                  Running from: /usr/share/java/jenkins.war
                  java.lang.NoClassDefFoundError: Could not initialize class sun.util.calendar.ZoneInfoFile
                  at java.base/sun.util.calendar.ZoneInfo.getTimeZone(ZoneInfo.java:588)
                  at java.base/java.util.TimeZone.getTimeZone(TimeZone.java:577)
                  at java.base/java.util.TimeZone.setDefaultZone(TimeZone.java:682)
                  at java.base/java.util.TimeZone.getDefaultRef(TimeZone.java:653)
                  at java.base/java.util.TimeZone.getDefault(TimeZone.java:642)
                  at java.base/java.util.Calendar.defaultTimeZone(Calendar.java:1679)
                  at java.base/java.util.Calendar.getInstance(Calendar.java:1660)
                  at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:676)
                  at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:620)
                  at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:599)
                  at io.jenkins.lib.support_log_formatter.SupportLogFormatter.lambda$static$0(SupportLogFormatter.java:47)
                  at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305)
                  at java.base/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195)
                  at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:172)
                  at io.jenkins.lib.support_log_formatter.SupportLogFormatter.formatTime(SupportLogFormatter.java:53)
                  at io.jenkins.lib.support_log_formatter.SupportLogFormatter.format(SupportLogFormatter.java:63)
                  at java.logging/java.util.logging.StreamHandler.publish(StreamHandler.java:199)
                  at java.logging/java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:95)

start jenkins success

字符串

jhiyze9q

jhiyze9q1#

很可能你缺少时区依赖性。检查文件$JAVA_HOME/jre/lib/tzdb.dat是否指向空文件或不存在文件。如果是,请安装tzdata-java包。yum install tzdata-java应该可以。

相关问题