java.io.FileNotFoundException: /Users/builder/workspace/smartdl_test/smdl/abc.txt (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at org.apache.http.entity.FileEntity.writeTo(FileEntity.java:94) at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156) at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:160) at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:221) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140) at com.toast.cloud.smartdl.builduploader.request.objectstorage.ObjectStorageRequestImpl.uploadObject(ObjectStorageRequestImpl.java:141) at com.toast.cloud.smartdl.builduploader.request.objectstorage.ObjectStorageRequestImpl.uploadObject(ObjectStorageRequestImpl.java:76) at com.toast.cloud.smartdl.builduploader.BuildUploaderPublisher.perform(BuildUploaderPublisher.java:196) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Hi !I'm developing jenkins plugin using pipeline.There is part of code.private int uploadObject(String containerName, String path, FilePath uploadFilePath){if(false == uploadFilePath.exsit()) { // result is true!!....exception;}InputStreamEntity inputStreamEntity = new InputStreamEntity(uploadFilePath.read(),-1);....HttpUriRequest request =RequestBuilder.create(method).setUri(uri).setHeader(header).setEntity(inputStreamEntity).build();
.....}
Result Log Messagejava.lang.IllegalArgumentException: /Users/builder/workspace/test/project_test/abc.txt does not exist
If the plugin run on master node, it's working with out any problem.But when I test it on slave, can't find the file..When I check if the file or directory is exist or not, it is existed.How can i use or read the file on slave? Could you help me please?