Some files exit in server dir but not show in jenkins web ui

Hi ,Excuse me
i use workspace to put my logs.some files exit in server dir but not show in jenkins web ui ,when i rename or modify log file in my server, refresh webpage,file will show in jenkins web ui. please help

Hi, and welcome to this community, @newbiecodering. :wave:

It seems like you’re encountering an issue where Jenkins does not immediately reflect changes made to files in the workspace directory through the web UI.
I think this behavior can occur due to Jenkins not actively monitoring file system changes in real-time for updates in the workspace. :thinking:
When you modify or rename a file, Jenkins might not recognize these changes until a new build triggers a workspace scan or you manually refresh the page.

1 Like

Do you have an example of a filename that is not shown in the UI?
Using the workspace browser to access logs is not the right approach. The workspace might already be in use by the next build of the job when you access it. If you want to be able to access these logs after the build is finished you should attach them as artifacts to the build.

1 Like

(post deleted by author)

Thank you for your reply.
My company uses this method as artifacts , which is difficult to change in the short term
my filename like “export-level.log” or “export_level.log” ,seems no matter
it has been archived using the build ID, and only the last 100 instances have been retained,seems not be affected by the next build
In my company’s project, the script executed by Jenkins file outputs logs to the workspace. After multiple builds, it was found that there were corresponding log files on the node machine where the job was executed. However, in the Jenkins web UI workspace, some log files were missing. In my understanding, Jenkins Web UI’s workspace actually reads the file directory of the node machine’s workspace. What went wrong in between?

Thank you very much for your reply
i think you are right that Jenkins not actively monitoring file system changes in real-time for updates in the workspace.Is this Jenkins’ features and is there any way to solve it?

You should also be aware that accessing the workspace will only show the workspace from the agent of the last build (or the latest currently running build). So in case you have more than one agent to execute the builds you will not see a file that is specific for build #100 that was run on agent_one when your last build is #101 which was run on agent_two