Errors getting changes for Perforce repository

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

Builds does not start and display the following error message in Bamboo:

Project - Plan › PROJ-PLAN-176 : Errors getting changes for PROJ-PLAN-176
(com.atlassian.bamboo.repository.RepositoryException : java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Could not retrieve changelogs from perforce)
(19 Aug 2016, 9:56:53 AM)
View error details Clear error from log 

The following appears in the $BAMBOO_HOME/logs/atlassian-bamboo.log file:

2016-08-18 15:39:55,146 ERROR [3-DelayedChangeDetectionThread:pool-7-thread-1] [ChainExecutionManagerImpl] Errors getting changes for PROJ-PLAN-176
com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Could not retrieve changelogs from perforce
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:373)
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:261)
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:160)
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectAllChangesSinceLastBuild(DefaultChangeDetectionManager.java:126)
    at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.performDelayedChangeDetection(ManualBuildDetectionAction.java:173)
        ...
Caused by: java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Could not retrieve changelogs from perforce
    at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132)
    at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
    at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191)
    at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:476)
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesAfterQuietPeriod(DefaultChangeDetectionManager.java:430)
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:317)
    ... 33 more
Caused by: com.atlassian.bamboo.repository.RepositoryException: Could not retrieve changelogs from perforce
    at com.atlassian.bamboo.repository.perforce.PerforceManager.getChangeNumbersFromRevision(PerforceManager.java:478)
    at com.atlassian.bamboo.repository.perforce.PerforceRepository.collectChangesSinceLastBuild(PerforceRepository.java:155)
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:481)
    at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:477)
    at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
    ... 39 more
Caused by: com.tek42.perforce.PerforceException: Unable to parse output for change numbers.  Output: Unicode server permits only unicode enabled clients.

    at com.tek42.perforce.parse.Changes.getChangeNumbersFrom(Changes.java:157)
    at com.atlassian.bamboo.repository.perforce.PerforceManager.getChangeNumbersFromRevision(PerforceManager.java:466)
    ... 43 more
Caused by: java.lang.NumberFormatException: For input string: "server"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:492)
    at java.lang.Integer.<init>(Integer.java:677)
    at com.tek42.perforce.parse.Changes.getChangeNumbersFrom(Changes.java:152)
    ... 44 more

診断

Diagnostic Steps

Add an additional environment variable in the Perforce repository configuration inside Bamboo of P4CHARSET=utf8 (For a complete list of valid P4CHARSET values, issue the command p4 help charset). This should fix the issue for that particular plan/repository.

原因

For Perforce services operating in Unicode mode, P4CHARSET must either be set to auto or be set to some value (other than none) on user machines. If P4CHARSET is unset, but the service is operating in Unicode mode, Perforce applications return the following error message:

Unicode server permits only unicode enabled clients.

More information about this can also be found inside Perforce's website at the P4CHARSET page.

回避策

The suggestion inside the Diagnostic Steps section will fix the problem for one repository. If updating every repository configuration is not an option, it is possible to update the setenv.sh file and have the setting applied across the entire Bamboo instance.

  1. Stop Bamboo Server.
  2. Open up the $BAMBOO_INSTALL/bin/setenv.sh file.
  3. Add the following to the file:

    export P4CHARSET=utf8
  4. Start Bamboo Server.

You should be able to checkout your Perforce repositories successfully after that.

 

最終更新日 2016 年 8 月 23 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.