2017-02-16 6 views
0

gitlabのwebhookを使ってJenkinsとCIを作成しようとしていますが、gitlabで問題に直面しています。私はgitlabするコードを押すと、お使いのログ読んでからproduction.loggitlabにコードがプッシュされたときにジェンキンを起動できません

Started GET "/root/first1.git/info/refs?service=git-receive-pack" for 10.X.x.x. at 2017-02-16 13: 
41:40 -0500 
Processing by Projects::GitHttpController#info_refs as */* 
    Parameters: {"service"=>"git-receive-pack", "namespace_id"=>"root", "project_id"=>"first1.git"} 
Filter chain halted as :authenticate_user rendered or redirected 
Completed 401 Unauthorized in 20ms (Views: 0.5ms | ActiveRecord: 2.0ms) 
Started GET "/root/first1.git/info/refs?service=git-receive-pack" for 10.X.x.x at 2017-02-16 13: 
41:41 -0500 
Processing by Projects::GitHttpController#info_refs as */* 
    Parameters: {"service"=>"git-receive-pack", "namespace_id"=>"root", "project_id"=>"first1.git"} 
Filter chain halted as :authenticate_user rendered or redirected 
Completed 401 Unauthorized in 17ms (Views: 0.4ms | ActiveRecord: 1.9ms) 
Started GET "/root/first1.git/info/refs?service=git-receive-pack" for 10.x.x.x at 2017-02-16 13: 
41:41 -0500 
Processing by Projects::GitHttpController#info_refs as */* 
    Parameters: {"service"=>"git-receive-pack", "namespace_id"=>"root", "project_id"=>"first1.git"} 
Completed 200 OK in 106ms (Views: 0.2ms | ActiveRecord: 4.3ms) 
Started POST "/root/first1.git/git-receive-pack" for 10.x.x.x at 2017-02-16 13:41:42 -0500 
Processing by Projects::GitHttpController#git_receive_pack as application/x-git-receive-pack-result 
    Parameters: {"namespace_id"=>"root", "project_id"=>"first1.git"} 
Completed 200 OK in 106ms (Views: 0.3ms | ActiveRecord: 4.2ms) 
Started POST "/api/v3/internal/allowed" for 127.x.x.x at 2017-02-16 13:41:42 -0500 
Started GET "/api/v3/internal/broadcast_message" for 127.x.x.x at 2017-02-16 13:41:42 -0500 
Started GET "/api/v3/internal/merge_request_urls?project=/var/opt/gitlab/git-data/repositories/root/ 
first1.git&changes=1de706faf4e91b9f9264e114e12bdfdf16ff6d99%208b239d8f63c5db38a8d725baa62d5930371eea 
fb%20refs/heads/master%0A" for 127.x.x.x. at 2017-02-16 13:41:42 -0500 
WebHook Error => Failed to open TCP connection to 192.X.x.x.:8080 (getaddrinfo: Name or service 
not known) 
Updating statistics for project 3 
Scheduling removal of build artifacts 
+0

マイナーコードの書式設定 - ログを読みやすくします。 – eugen

+0

ジェンキンスパイプラインをまったく使用していますか? GitLabからJenkinsでビルドをトリガーしようとしていますか? –

+0

あなたはこのプラグインをインストールしました:https://wiki.jenkins-ci.org/display/JENKINS/GitLab+Plugin – lax1089

答えて

0

から以下のように私のログにエラーを観察:

ウェブフックエラーを= 192.XxxへのTCP接続を開くことができませんでした> :8080(getaddrinfo:名前またはサービスが不明)

IPアドレスで名前解決エラーのように見えるものは少し奇妙に見えますが、一般的にはネットワークの問題があるようですあなたのGitLabサーバーがconfに到達するigured IPアドレスとポート。

おそらくファイアウォールがGitLabサーバーからのアウトバウンド接続を妨げているか、Webhook URLのJenkinsサーバーのIPアドレスが間違っています。

+0

を@PeterReid私はgitlabとJenkinsの両方のサーバーからtelnetを実行しようとしました。しかし最後に私はサーバーを再構成し、http200の応答を与えることでうまく動作し始めました。私たちはシェフを使ってこれをインストールしているので、私はキッチンを破壊し、その後キッチンを収束させました。これは私がこのエラーを修正するのに役立ちました。 – pandey

0

Git pluginを使用しています - 私が知っているとおり、Gitlabプラグインについてはあまりにも確かではありません。 GitLab上

あなたのウェブフックのURLをに設定する必要があります。

http://jenkins.example.com/git/notifyCommit?url=https://gitlab.example.com/project/repository 

あなたのgitリポジトリのURLをhttps://gitlab.example.com/project/repositoryを交換してください。 URLを取得するには、gitlabのrepoにアクセスし、ブラウザのURLバーからURLをコピーするだけです。

これにより、選択したイベントが発生したときにJenkinsでビルドが開始されます。

関連する問題