maintainDB Non-Functional

Answered

I have TeamCity setup on an Amazon EC2 instance (Linux, 64-bit) and am trying to move from the internal database to an RDS MySQL instance. I have been trying to run the maintainDB.cmd file over SSH as detailed in the documentation, however whenever I attempted to run it, I received either a 'command not found' or 'permission denied' error. I've tried different user accounts, and using sudo, but nothing seemed to work. I found one article that seemed to indicate that maybe the maintainDB.cmd file was not marked with 'permission to execute', so I ran <code>chmod u+x maintainDB.cmd</code>. This only resulted in the following error:

<code>
maintainDB.cmd: line 1: @echo: command not found
maintainDB.cmd: line 2: ::: command not found
maintainDB.cmd: line 3: ::: command not found
maintainDB.cmd: line 4: ::: command not found
maintainDB.cmd: line 5: ::: command not found
maintainDB.cmd: line 6: $'::\r': command not found
maintainDB.cmd: line 7: syntax error near unexpected token `('
'aintainDB.cmd: line 7: `:: TEAMCITY_MAINTAINDB_MEM_OPTS memory options (JVM options)
</code>

I'm fairly new at the back-end of TC, I've used the front end for quite some time, but haven't had to dig this deep into the internals before. I can't find anything that seems to indicate that this error should even happen, let alone how to fix it. Any help would be appreciated.

1 comment

Hello Kris,

If TeamCity server is running on Linux machine, then you should use maintainDB.sh script. Please try it and let me know if it works.

0

Please sign in to leave a comment.