7-zip stopped working after doing a teamcity server update

Compression and backup using 7-zip was successfully running before taking a teamcity server update. Afterwards I am getting  Parameter "env.username" is undefined. whereas it is defined. Also 7-Zip is installed on the path but it keeps complaining about it does not exist. Following is copy from build log.

    Parameter "env.username" is undefined.
    Step 1/4: To copy and compress website before publish (Command Line) (running for 46s)
    Step 1/4] Starting: \\test02\BackupStorage\BackupAndCompressScript.bat
    [Step 1/4] in directory: Z:\publish\mysite
    [Step 1/4] 7-Zip is not installed in the location:
    [Step 1/4] Please update the directory where 7-Zip is installed.

and after this it hangs up. I have no idea whats going wrong. Please guide.

4 comments
Comment actions Permalink

Hi Debbie

Please add set command to a first line of your bat-script and run the build again. Then check in build log, how PATH and USERNAME variables are set?

0
Comment actions Permalink

Yes did what you said. Please see the following log:

[08:33:42]Repository sources transferred
[08:33:42]Updating sources: server side checkout

[08:33:42]Parameter "env.username" is undefined.
[08:33:42]Step 1/4: To copy and compress website before publish (Command Line)
[08:33:42][Step 1/4] Starting: \\CCTest\BackupStorage\MyCompressBatchScript.bat CCTest testsite
[08:33:42][Step 1/4] in directory: Z:\publish\testsite
[08:33:42][Step 1/4]
[08:33:42][Step 1/4] Z:\publish\testsite>SET
[08:33:42][Step 1/4] ALLUSERSPROFILE=C:\ProgramData
[08:33:42][Step 1/4] APPDATA=C:\Users\testuser\AppData\Roaming
[08:33:42][Step 1/4] BUILD_NUMBER=140
[08:33:42][Step 1/4] BUILD_VCS_NUMBER=33493
[08:33:42][Step 1/4] BUILD_VCS_NUMBER_repos=33493
[08:33:42][Step 1/4] CommonProgramFiles=C:\Program Files (x86)\Common Files
[08:33:42][Step 1/4] CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
[08:33:42][Step 1/4] CommonProgramW6432=C:\Program Files\Common Files
[08:33:42][Step 1/4] COMPUTERNAME=machine02
[08:33:42][Step 1/4] ComSpec=C:\Windows\system32\cmd.exe
[08:33:42][Step 1/4] Configuration=Deploy
[08:33:42][Step 1/4] FP_NO_HOST_CHECK=NO
[08:33:42][Step 1/4] IISPath=dev.testsite
[08:33:42][Step 1/4] JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23
[08:33:42][Step 1/4] JDK_16=C:\Program Files\Java\jdk1.6.0_23
[08:33:42][Step 1/4] LOCALAPPDATA=C:\Users\testuser\AppData\Local
[08:33:42][Step 1/4] MSBuildEmitSolution=1
[08:33:42][Step 1/4] NUMBER_OF_PROCESSORS=4
[08:33:42][Step 1/4] OS=Windows_NT
[08:33:42][Step 1/4] password=password1234
[08:33:42][Step 1/4] Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\SlikSvn\bin\;C:\Program Files\System Center Operations Manager 2007\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.6.0_23\bin\;Z:\Selenium\selenium-remote-control-1.0.3\selenium-server;C:\Program Files (x86)\NUnit 2.4.8\bin;C:\Program Files (x86)\NUnit 2.5.8\bin\net-2.0\framework;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\IIS\Microsoft Web Deploy\msdeploy.exe
[08:33:42][Step 1/4] PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
[08:33:42][Step 1/4] PROCESSOR_ARCHITECTURE=AMD64
[08:33:42][Step 1/4] PROCESSOR_ARCHITEW6432=AMD64
[08:33:42][Step 1/4] PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 44 Stepping 2, GenuineIntel
[08:33:42][Step 1/4] PROCESSOR_LEVEL=6
[08:33:42][Step 1/4] PROCESSOR_REVISION=2c02
[08:33:42][Step 1/4] ProgramData=C:\ProgramData
[08:33:42][Step 1/4] ProgramFiles=C:\Program Files (x86)
[08:33:42][Step 1/4] ProgramFiles(x86)=C:\Program Files (x86)
[08:33:42][Step 1/4] ProgramW6432=C:\Program Files
[08:33:42][Step 1/4] PROMPT=$P$G
[08:33:42][Step 1/4] PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
[08:33:42][Step 1/4] PUBLIC=C:\Users\Public
[08:33:42][Step 1/4] SystemDrive=C:
[08:33:42][Step 1/4] SystemRoot=C:\Windows
[08:33:42][Step 1/4] TargetServer=CCTest
[08:33:42][Step 1/4] TargetSite=testsite
[08:33:42][Step 1/4] TEAMCITY_BUILDCONF_NAME=Package and Deploy
[08:33:42][Step 1/4] TEAMCITY_BUILD_PROPERTIES_FILE=Z:\TeamCity\buildAgent\temp\buildTmp\teamcity.build3964345258484881623.properties
[08:33:42][Step 1/4] TEAMCITY_CAPTURE_ENV=c:\TeamCity\jre\bin\java.exe -jar C:\TeamCity\buildAgent\plugins\environment-fetcher\bin\env-fetcher.jar
[08:33:42][Step 1/4] TEAMCITY_JRE=C:\TeamCity\jre
[08:33:42][Step 1/4] TEAMCITY_PROCESS_FLOW_ID=59821139615200
[08:33:42][Step 1/4] TEAMCITY_PROCESS_PARENT_FLOW_ID=
[08:33:42][Step 1/4] TEAMCITY_PROJECT_NAME=testsite
[08:33:42][Step 1/4] TEAMCITY_VERSION=7.0 (build 21241)
[08:33:42][Step 1/4] TEMP=Z:\TeamCity\buildAgent\temp\buildTmp
[08:33:42][Step 1/4] TMP=Z:\TeamCity\buildAgent\temp\buildTmp
[08:33:42][Step 1/4] TMPDIR=Z:\TeamCity\buildAgent\temp\buildTmp
[08:33:42][Step 1/4] USERDNSDOMAIN=COMCENTER.LOCAL
[08:33:42][Step 1/4] USERDOMAIN=COMCENTER
[08:33:42][Step 1/4] USERNAME=COMCENTER\testuser
[08:33:42][Step 1/4] USERPROFILE=C:\Users\testuser
[08:33:42][Step 1/4] windir=C:\Windows
[08:33:42][Step 1/4] windows_tracing_flags=3
[08:33:42][Step 1/4] windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
[08:33:42][Step 1/4] WRAPPER_ARCH=x86
[08:33:42][Step 1/4] WRAPPER_BITS=32
[08:33:42][Step 1/4] WRAPPER_FILE_SEPARATOR=\
[08:33:42][Step 1/4] WRAPPER_OS=windows
[08:33:42][Step 1/4] WRAPPER_PATH_SEPARATOR=;
[08:33:42][Step 1/4] test02
[08:33:42][Step 1/4] testsite
[08:33:42][Step 1/4] 7-Zip is not installed in the location:
[08:33:42][Step 1/4] Please update the directory where 7-Zip is installed.
[08:33:42][Step 1/4] Process exited with code 1

Please guide.

0
Comment actions Permalink

Just noticed that teamcity is now expecting to find the 7-zip on agent  machine(machine02) but previously it was finding it on the CCTest  machine(destination machine where batch file exists) as batch file is  executing from there and also I have installed the 7-zip on teamcity  server. Looks like path configuration is changed in new Teamcity 7.0. As  now installing 7-zip on agent machine fixed the problem.

0
Comment actions Permalink

Have you solved username issue?

0

Please sign in to leave a comment.