title: Jenkins symlinks/permalinks broken after restart
body: <p><code>Jenkins</code> version 2.114 is running builds but they seem to disappear from the Dashboard after a restart. I have Jenkins setup on <code>Linux</code> and all the log is present under
  <code>${JENKINS_HOME}/jobs/${ITEM_FULL_NAME}/builds</code> </p>
  
  <p>I have tried Reload Configuration from Disk with following set in <code>/etc/sysconfig/jenkins</code></p>
  
  <pre><code>JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"
  </code></pre>
  
  <p>Below is build and workspace directory settings:</p>
  
  <pre><code>Workspace Root Directory :${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}
  Build Record Root Directory: ${ITEM_ROOTDIR}/builds
  </code></pre>
  
  <p>Below you can see the build number 117 and 118, but still, the lastFailedBuild, lastStableBuild , lastSuccessfulBuild are set to -1, which doesn't exist</p>
  
  <pre><code>drwxr-xr-x 4 jenkins jenkins 4096 Apr  2 20:17 117
  drwxr-xr-x 4 jenkins jenkins 4096 Apr  3 20:17 118
  lrwxrwxrwx 1 jenkins jenkins    2 Apr  3 11:09 lastFailedBuild -&gt; -1
  lrwxrwxrwx 1 jenkins jenkins    2 Apr  4 10:44 lastStableBuild -&gt; -1
  lrwxrwxrwx 1 jenkins jenkins    2 Apr  4 03:21 lastSuccessfulBuild -&gt; -1
  lrwxrwxrwx 1 jenkins jenkins    2 Apr  3 10:58 lastUnstableBuild -&gt; -1
  lrwxrwxrwx 1 jenkins jenkins    2 Apr  3 10:58 lastUnsuccessfulBuild -&gt; -1
  </code></pre>
  
  <p>I have also set the </p>
  
  <pre><code>Discard Old Builds Slicer - Days to keep artifacts as 30
  Discard Old Builds Slicer - Max # of builds to keep as 40
  </code></pre>
  
  <p>I ran the jenkins-job-checker[ <a href="https://github.com/docwhat/jenkins-job-checker" rel="nofollow noreferrer">https://github.com/docwhat/jenkins-job-checker</a> ] on one of the jobs and found the following :</p>
  
  <pre><code> Problem: NOTLINK: The number link builds/1 is not a symlink!
   Problem: NOTLINK: The number link builds/2 is not a symlink!
   Problem: NOTLINK: The number link builds/3 is not a symlink!
   Proposal: Archive non-link builds/1
   Proposal: Archive non-link builds/2
   Proposal: Archive non-link builds/3
  </code></pre>
  
  <p>Really appreaciate some help</p>