Perl validation fails on startup with 'Filename too long' or 'CreateProcess error=267'
When starting Bitbucket Server on Windows, the following error message are visible:
Error validating Perl: 'An error occurred while executing an external process: CreateProcess error=267, The directory name is invalid's
Error validating Perl: 'An error occurred while executing an external process: [..]: Filename too long'
The Workaround section of the knowledge base article Bitbucket Server is unable to create the merge diff for pull requests discusses solutions to resolve the problem.