0

i have just installed jenkins , but when ever i want to type localhost:8080 , it sorts of not starting as usual i searched on internet find my type of error in jenkins.wrapper and dont know whats the meaning of it , this my log from jenkins.wrapper file and it says it cant find jenkins.pid

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\Jenkins\jenkins.pid'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension.OnProcessStarted(Process process)
2022-07-03 19:17:44,247 DEBUG - Starting WinSW in the service mode
2022-07-03 19:17:44,263 INFO  - Starting C:\Program Files\Java\jdk-18.0.1.1\bin\java.exe -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "C:\Program Files\Jenkins\jenkins.war" --httpPort=8080 --webroot="C:\ProgramData\Jenkins\war"
2022-07-03 19:17:44,263 INFO  - Extension loaded: killOnStartup
2022-07-03 19:17:44,279 WARN  - The requested PID file 'C:\ProgramData\Jenkins\jenkins.pid' does not exist. The runaway process won't be checked
2022-07-03 19:17:44,279 INFO  - Started process 20796
2022-07-03 19:17:44,294 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to winsw.SizeBasedRollingLogAppender
2022-07-03 19:17:44,294 INFO  - Recording PID of the started process:20796. PID file destination is C:\ProgramData\Jenkins\jenkins.pid
2022-07-03 19:17:44,294 ERROR - Cannot update the PID file C:\ProgramData\Jenkins\jenkins.pid
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\Jenkins\jenkins.pid'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension.OnProcessStarted(Process process)
2022-07-03 19:17:49,032 DEBUG - Starting WinSW in the service mode
2022-07-03 19:17:49,047 INFO  - Starting C:\Program Files\Java\jdk-18.0.1.1\bin\java.exe -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "C:\Program Files\Jenkins\jenkins.war" --httpPort=8080 --webroot="C:\ProgramData\Jenkins\war"
2022-07-03 19:17:49,063 INFO  - Extension loaded: killOnStartup
2022-07-03 19:17:49,063 WARN  - The requested PID file 'C:\ProgramData\Jenkins\jenkins.pid' does not exist. The runaway process won't be checked
2022-07-03 19:17:49,063 INFO  - Started process 11092
2022-07-03 19:17:49,079 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to winsw.SizeBasedRollingLogAppender
2022-07-03 19:17:49,079 INFO  - Recording PID of the started process:11092. PID file destination is C:\ProgramData\Jenkins\jenkins.pid
2022-07-03 19:17:49,079 ERROR - Cannot update the PID file C:\ProgramData\Jenkins\jenkins.pid
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\Jenkins\jenkins.pid'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension.OnProcessStarted(Process process)
2022-07-03 19:46:48,503 DEBUG - Starting WinSW in the service mode
2022-07-03 19:46:52,378 DEBUG - Completed. Exit code is 0
Qasim_Khan
  • 25
  • 6
  • does the directory C:\ProgramData\Jenkins exist? – tgdavies Jul 04 '22 at 06:39
  • no its does not exits , but it is in program files/jenkins – Qasim_Khan Jul 04 '22 at 06:46
  • A simple solution would be to create the directory. – tgdavies Jul 04 '22 at 06:47
  • ok so if i create a directory , then from where it will get jenkins.pid , that is something i cant create – Qasim_Khan Jul 04 '22 at 06:50
  • Jenkins will create the jenkins.pid file when it starts up. – tgdavies Jul 04 '22 at 06:51
  • hi , i just found out this in jenkins error file which just updated itself now and its say Jenkins requires Java versions [17, 8, 11] but you are running with Java 18 from C:\Program Files\Java\jdk-18.0.1.1 java.lang.UnsupportedClassVersionError: 62.0 Jul 04, 2022 11:51:56 AM Main verifyJavaVersion SEVERE: Running with Java class version 62 which is not in the list of supported versions: [52, 55, 61]. Run with the --enable-future-java flag to enable such behavior. See https://jenkins.io/redirect/java-support/ java.lang.UnsupportedClassVersionError: 62.0 – Qasim_Khan Jul 04 '22 at 06:54
  • So have you looked at that URL from the error message? It redirects to https://www.jenkins.io/doc/administration/requirements/java/ – Queeg Jul 04 '22 at 06:58
  • so i have to download java 17 and change its path , what if i install java 17 and then follow this solution will it work https://stackoverflow.com/questions/69066139/jenkins-requires-java-versions-8-11-but-you-are-running-with-java-16-from-c – Qasim_Khan Jul 04 '22 at 07:03

0 Answers0