Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to upload file to z/os from a Jenkins node machine path ; writeFileToMember function failing with java.io.FileNotFoundException error #93

Open
ztekslate opened this issue Oct 22, 2024 · 1 comment
Labels
priority-high Should be resolved in 1-2 sprints severity-high A bug for which there may be workaround but limits the usage of the Zowe for major use cases
Milestone

Comments

@ztekslate
Copy link

Function used

zosmf("zosmfzos1") {
writeFileToMember dsn:"${zos_userid}.${ptf}.${comasmpgm}", member:"SUMMARY", file:"summary.txt"

}

Node Machine Workspace file path

  • pwd
    /c/Jenkins/workspace/MF-DevOps_MF-99999
  • ls -l
    total 25
    -rw-r--r-- 1 +jenkinsagent 197121 9640 Oct 22 06:53 Jenkinsfile
    -rw-r--r-- 1 +jenkinsagent 197121 46 Oct 22 06:54 buildList.txt
    drwxr-xr-x 1 +jenkinsagent 197121 0 Oct 22 06:53 com
    -rw-r--r-- 1 +jenkinsagent 197121 8 Oct 22 06:54 comasmmaclist.txt
    -rw-r--r-- 1 +jenkinsagent 197121 8 Oct 22 06:54 comasmpgmlist.txt
    drwxr-xr-x 1 +jenkinsagent 197121 0 Oct 22 06:53 config
    -rw-r--r-- 1 +jenkinsagent 197121 41 Oct 22 06:54 hash.txt
    drwxr-xr-x 1+jenkinsagent 197121 0 Oct 22 06:53 mfx
    drwxr-xr-x 1 +jenkinsagent 197121 0 Oct 22 06:53 prc
    -rw-r--r-- 1 +jenkinsagent 197121 0 Oct 22 06:54 prcasmmaclist.txt
    -rw-r--r-- 1 +jenkinsagent 197121 0 Oct 22 06:54 prcasmpgmlist.txt
    drwxr-xr-x 1 +jenkinsagent 197121 0 Oct 22 06:53 ptf
    -rw-r--r-- 1 +jenkinsagent 197121 654 Oct 22 06:54 summary.txt
    drwxr-xr-x 1 +jenkinsagent 197121 0 Oct 22 06:53 zoslibs

Error:

java.io.FileNotFoundException: C:\Jenkins\workspace\MF-DevOps_MF-99999\summary.txt (The system cannot find the path specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
at java.base/java.io.FileInputStream.(FileInputStream.java:152)
at PluginClassLoader for zdevops//kotlin.io.FilesKt__FileReadWriteKt.forEachLine(FileReadWrite.kt:190)
at PluginClassLoader for zdevops//kotlin.io.FilesKt__FileReadWriteKt.readLines(FileReadWrite.kt:219)
at PluginClassLoader for zdevops//kotlin.io.FilesKt__FileReadWriteKt.readLines$default(FileReadWrite.kt:217)
at PluginClassLoader for zdevops//org.zowe.zdevops.declarative.jobs.WriteFIleToMemberDeclarative.perform(WriteFIleToMemberDeclarative.kt:52)
at PluginClassLoader for zdevops//org.zowe.zdevops.declarative.AbstractZosmfAction.perform(AbstractZosmfAction.kt:42)
at PluginClassLoader for workflow-basic-steps//org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at PluginClassLoader for workflow-basic-steps//org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)

@ztekslate
Copy link
Author

I ran some more tests, unfortunately the plugin function is not recognizing path in any of the systems ( jenkins server , Local workspace , jenkins node . below is the error message when I tried D drive path ( there is no D drive on jenkins server or on my local machine ) .. this path is from node machine.. with D drive path instead of giving "The system cannot find the path specified" , now the error is "The device is not ready"
java.io.FileNotFoundException: D:\Jenkins\Build\TZ99999\summary.txt (The device is not ready)

@KUGDev KUGDev added severity-high A bug for which there may be workaround but limits the usage of the Zowe for major use cases priority-high Should be resolved in 1-2 sprints labels Oct 22, 2024
@KUGDev KUGDev added the bug Something isn't working label Oct 30, 2024
@KUGDev KUGDev moved this from New to Backlog in Zowe IntelliJ Squad Dec 3, 2024
@KUGDev KUGDev removed the bug Something isn't working label Jan 31, 2025
@KUGDev KUGDev added this to the 1.1.2 milestone Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-high Should be resolved in 1-2 sprints severity-high A bug for which there may be workaround but limits the usage of the Zowe for major use cases
Projects
Status: Backlog
Development

No branches or pull requests

2 participants