'cmd' is not recognized as an internal or external command, | |
19-Feb-2020 23:24:56 | operable program or batch file. |
19-Feb-2020 23:24:56 | Failing task since return code of [C:\Program Files\apache-maven-3.6.3\bin\mvn.cmd clean install -Djava.awt.headless=true -Dsqlapp=D:\BambooAgent\xml-data\build-dir\492896369-492765792 -Dsqlbuild=build_info -Dsqlenv=-Dsqldb= -Dsurefire.suiteXmlFiles=src/test/java/anthem/MSSQL.xml] was 1 while expected 0 |
19-Feb-2020 23:24:56 | Finished task 'MSSQL_deployment' with result: Failed |
19-Feb-2020 23:24:56 | Skipping execution of task 'Testing_Maven_Run' as it is disabled |
19-Feb-2020 23:24:56 | Skipping execution of task 'Testing' as it is disabled |
19-Feb-2020 23:24:56 | Finalising the build... |
19-Feb-2020 23:24:56 | Stopping timer. |
19-Feb-2020 23:24:56 | Build 492896369-492765792-502928082 completed. |
19-Feb-2020 23:24:56 | Finished processing deployment result Deployment of 'release-11' on 'STAGING' |
Welcome to the Community!
What version of Bamboo are you currently running? I ask because the only time I have seen an error like this is after our IT team installs Windows updates that add a user defined path environment variable which overrides the system defined path variable so Bamboo agents aren't capable of finding the cmd command anymore. The defect is listed here https://jira.atlassian.com/browse/BAM-16205, but it has been fixed in version 6.10.2.
If you are indeed running into the same issue I described the workaround is to remove the user defined path environment variable and your builds should work again.
I hope that helps!
-Jimmy
My agent version is 6.9.1. Do I need to uninstall my old version and need to install latest one? I tried your workaround by deleting the local environment variable. Same error. I tried Regedit too no results. Please provide me the steps to upgrade the agent or workaround in detail steps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@solairajan_shanmugam unfortunately, you can upgrade just one agent. You need to update the Bamboo server and the agents will be updated automatically as a part of connecting to the Server after the upgrade.
If you want to go the route of upgrading the server that process is documented here:
https://confluence.atlassian.com/bamboo/bamboo-upgrade-guide-720411366.html
However, if the workaround didn't work for you, I'm not sure that upgrading will necessarily resolve your issue either.
Are you able to test if this runs on any other agents?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried both a way by bamboo remote agent properties log on as local user and serviceid. Both a solution I am facing “'cmd' is not recognized as an internal or external command, operable program or batch file.” Same plan working in different agent. But not in newly enabled server.
Windows server 2016. Please let me know any other information you required.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.