Release Automation

 View Only
  • 1.  Copy file or folder with backup error

    Posted Nov 22, 2016 03:48 PM

    Hi, I've send a distribution to a server and I got this:

     

    The target path on input is correct, don't know why "/opt/RA" is added.



  • 2.  Re: Copy file or folder with backup error

    Posted Nov 22, 2016 04:31 PM

    One more question: Is there any way to preserve timestamps?

     

    Thanks.



  • 3.  Re: Copy file or folder with backup error

    Broadcom Employee
    Posted Nov 23, 2016 02:51 AM

    Hi julio

     

    I did do some test and for me it works as expected ,  does the target directory exist ? or does it needs to be created

    If so does the user running the action have the rights to do this ?

     

    Regards

    Dirk



  • 4.  Re: Copy file or folder with backup error

    Posted Nov 24, 2016 03:19 PM

    Hi Dirk, the agent is running under x001285 and we use sudo impersonation to x306016 (This is working fine). User x306016 belongs to relauto group. I

     

    [root@plnx0168 opt]# ls -ld /opt/RA

    drwxrwxr-x 18 x001285 relauto 4096 Nov 24 15:37 /opt/RA

     

    [root@plnx0168 opt]# ls -ld /cris/app/prod/pasajes

    drwxr-x--- 6 x306016 cris 4096 Jun 19  2014 /cris/app/prod/pasajes

     

    [root@plnx0168 opt]# ls -ld /cris/app/prod/pasajes/IN

    drwxrwxr-x 2 x306016 cris 20480 Oct 14 21:19 /cris/app/prod/pasajes/IN

     

    [root@plnx0168 PasajesRA]# ls -l /opt/PasajesRA/

    total 8

    drwxrwxr-x 3 x001285 relauto 4096 Nov 22 17:57 Backup

    drwxrwxr-x 3 x001285 relauto 4096 Nov 22 17:57 Temporal

     

    The action seems to be right:

     

     

    Nimi log indicate:

     

    2016-11-24 14:29:51,318 [job-98311-jobServer-98327-7:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000)[#2]] DEBUG (com.nolio.nimi.appmsg.durability.DurableCommunicationApi:191) - Not releasing sender with message because there is already message being sent plnx0168.telecom.com.ar_147930710996240:payload=[ID:704123672e295400_7f7@plnx0168.telecom.com.ar, from:plnx0168.telecom.com.ar, to:executionLog__98311_plnx0168_telecom_com_ar@es_plrelautoapp5- StepExecutionEventDto [result=Step Result: false - (#2) Problem while copying: cp: cannot create directory `"/opt/RA/ /cris/app/prod/pasajes/"': No such file or directory
     (Exit value: 1), hostIp=plnx0168.telecom.com.ar, jobId=98311, envServerId=98327, timestamp=Thu Nov 24 14:29:51 ART 2016, state=FAILED_PAUSED, stepId=P22950000.F36575000.E36592000.E36585000,

     

    We didn't set  "/opt/RA/`  in "/opt/RA/ /cris/app/prod/pasajes/"' (check the input)

     

    Any idea?



  • 5.  Re: Copy file or folder with backup error

    Posted Nov 24, 2016 04:01 PM

    Nolio_action_exe log:

     

    2016-11-24 14:15:39,415 [job-98309-jobServer-98320-5:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):StepResultEvaluator] INFO  (com.nolio.platform.shared.datamodel.Action:334) - ------------------------Finished action [Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):StepResultEvaluator] result [true, Result evaluator passed. Step result: PASSED]------------------------
    2016-11-24 14:15:39,415 [job-98309-jobServer-98320-5:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):StepResultEvaluator] DEBUG (com.nolio.platform.shared.datamodel.Action:409) - Next Action Execution State ResolveOutParameters
    2016-11-24 14:15:39,416 [job-98309-jobServer-98320-5:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):StepResultEvaluator] DEBUG (com.nolio.platform.shared.datamodel.Action:409) - Next Action Execution State Finished
    2016-11-24 14:15:39,417 [job-98309-jobServer-98320-5:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000)[#2]] DEBUG (com.nolio.platform.shared.datamodel.Action:409) - Next Action Execution State null
    2016-11-24 14:15:39,417 [job-98309-jobServer-98320-2:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.datamodel.Action:409) - Next Action Execution State ResolveInParameters
    2016-11-24 14:15:39,418 [job-98309-jobServer-98320-2:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.parameter.InParameterPlaceHolder:170) - PlaceHolder for field [targetPath] got value [ /cris/app/prod/pasajes]
    2016-11-24 14:15:39,419 [job-98309-jobServer-98320-2:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.parameter.InParameterPlaceHolder:170) - PlaceHolder for field [sourcePath] got value [/opt/PasajesRA/Temporal/CRISNEW-CO/BD]
    2016-11-24 14:15:39,419 [job-98309-jobServer-98320-2:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.datamodel.Action:284) - Requesting value for parameter [[root/nolio/Architectures/Default Architecture/13949000/myInstanceId]/Common actions/PackageToDeploy]
    2016-11-24 14:15:39,434 [Communication Msg Processor-689] DEBUG (com.nolio.platform.shared.parameter.RemoteParameterResolutionService:41) - For parameter [[root/nolio/Architectures/Default Architecture/13949000/myInstanceId]/Common actions/PackageToDeploy] got result [CRI-PAU-20161110162120-U]
    2016-11-24 14:15:39,434 [Communication Msg Processor-689] DEBUG (com.nolio.platform.shared.datamodel.Action:463) - Submitting Action Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup for flow execution.
    2016-11-24 14:15:39,449 [job-98309-jobServer-98320-10:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.parameter.InParameterPlaceHolder:170) - PlaceHolder for field [backupPath] got value [/opt/PasajesRA/Backup/CRI-PAU-20161110162120-U/CRISNEW-CO/BD]
    2016-11-24 14:15:39,449 [job-98309-jobServer-98320-10:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.datamodel.Action:409) - Next Action Execution State Execute
    2016-11-24 14:15:39,449 [job-98309-jobServer-98320-10:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] INFO  (com.nolio.platform.shared.datamodel.Action:332) - ------------------------About to execute action [Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup]------------------------
    2016-11-24 14:15:39,455 [job-98309-jobServer-98320-10:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] ERROR (com.nolio.platform.shared.datamodel.Action:65) - Exception caught
    org.apache.commons.exec.ExecuteException: cp: cannot create directory `"/opt/RA/ /cris/app/prod/pasajes"': No such file or directory
     (Exit value: 1)
           at com.nolio.platform.shared.utils.cmdexecutor.SimpleCommandLineExecutor.exec(SimpleCommandLineExecutor.java:56)
           at com.nolio.platform.shared.utils.file2.inner.CpWrapper.exec(CpWrapper.java:81)
           at com.nolio.platform.shared.utils.file2.inner.CpWrapper.copyDirectory(CpWrapper.java:73)
           at com.nolio.platform.shared.utils.file2.FileUtils2UnixImpl.copyDirectory(FileUtils2UnixImpl.java:82)
           at com.nolio.platform.shared.executables.actions.CopyFileOrFolder.execute(CopyFileOrFolder.java:60)
           at com.nolio.platform.shared.executables.actions.CopyAndBackup.execute(CopyAndBackup.java:78)
           at com.nolio.platform.shared.datamodel.ActionExecutionState.localExecution(ActionExecutionState.java:333)
           at com.nolio.platform.shared.datamodel.ActionExecutionState.access$500(ActionExecutionState.java:39)
           at com.nolio.platform.shared.datamodel.ActionExecutionState$2.execAction(ActionExecutionState.java:112)
           at com.nolio.platform.shared.datamodel.ActionExecutionState.exec(ActionExecutionState.java:343)
           at com.nolio.platform.shared.datamodel.Action.run(Action.java:227)
           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:1142)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           at com.nolio.platform.shared.flowcontrol.LocalFlowController$JobBoundThreadFactory$1.run(LocalFlowController.java:788)
           at java.lang.Thread.run(Thread.java:745)



  • 6.  Re: Copy file or folder with backup error

    Posted Nov 24, 2016 04:10 PM

    More info:

     

    2016-11-24 17:57:57,640 [job-98312-jobServer-98329-6:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.parameter.InParameterPlaceHolder:170) - PlaceHolder for field [targetPath] got value [ /cris/app/prod/pasajes/IN]
    2016-11-24 17:57:57,641 [job-98312-jobServer-98329-6:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.parameter.InParameterPlaceHolder:170) - PlaceHolder for field [sourcePath] got value [/opt/PasajesRA/Temporal/CRISNEW-CO/BD/IN]
    2016-11-24 17:57:57,659 [job-98312-jobServer-98329-6:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.parameter.InParameterPlaceHolder:170) - PlaceHolder for field [backupPath] got value [/opt/PasajesRA/Backup/CRI-PAU-20161110162120-U/CRISNEW-CO/BD/IN]
    2016-11-24 17:57:57,659 [job-98312-jobServer-98329-6:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] DEBUG (com.nolio.platform.shared.datamodel.Action:409) - Next Action Execution State Execute
    2016-11-24 17:57:57,659 [job-98312-jobServer-98329-6:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] INFO (com.nolio.platform.shared.datamodel.Action:332) - ------------------------About to execute action [Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup]------------------------
    2016-11-24 17:57:57,670 [job-98312-jobServer-98329-6:Copy file or folder with backup(P22950000.F36575000.E36592000.E36585000):Copy file or folder with backup] ERROR (com.nolio.platform.shared.datamodel.Action:65) - Exception caught
    org.apache.commons.exec.ExecuteException: cp: cannot create directory `"/opt/RA/ /cris/app/prod/pasajes/IN"': No such file or directory
    (Exit value: 1)



  • 7.  Re: Copy file or folder with backup error

    Broadcom Employee
    Posted Nov 24, 2016 05:01 AM

    Hi Julio,

     Did above answer by Dirk helped you. If yes please mark the answer.

     

    In case if you are still facing some issue please provide some additional information may be a snippet from agent log.

     

    Thanks,

    Saurabh



  • 8.  Re: Copy file or folder with backup error

    Broadcom Employee
    Posted Nov 25, 2016 10:37 AM

    Hi

     

    So this a copy from a remote agent , let me try this out i also do not understand where it gets

    the

    `"/opt/RA/ /cris/app/prod/pasajes/"

     

    I see you created a support case for it ,  i will take it and get back to you on it.

     

    Regards dirk



  • 9.  Re: Copy file or folder with backup error

    Posted Dec 01, 2016 04:01 PM

    DirkBleyenberg I found the error. There was an space inside the target directory.

     

     

    So, for some reason it is filled with Agent Install Directory followed by "DestPath" value.



  • 10.  Re: Copy file or folder with backup error
    Best Answer

    Posted Nov 30, 2016 09:55 AM

    The customer didn't setup  the impersonation user for this action. Once he did it the strange error disappeared . Another permission issue appeared that could be solve by setting umask properly.