×ðÁú¿­Ê±¹ÙÍøµÇ¼

ÔõÑùÔÚgitlabЧÀÍÆ÷¶ËÉó²éÈÕÖ¾

ÔÚgitlabÖÐÉó²éÈÕÖ¾ÊÇgitlabÖÎÀíÔ±¾ÙÐÐϵͳÖÎÀíºÍά»¤µÄÐëÒª²Ù×÷¡£gitlabÌṩÁ˸»ºñµÄ²Ù×÷ÈÕÖ¾£¬¿ÉÒÔÈÃÖÎÀíÔ±ÇáËÉÏàʶϵͳµÄÔËÐÐ״̬ºÍ²Ù×÷ÇéÐΣ¬ÊµÊ±·¢Ã÷ÎÊÌâ²¢¾ÙÐд¦Àí¡£ÏÂÃæÊÇÔÚgitlabЧÀÍÆ÷¶ËÉó²éÈÕÖ¾µÄÒªÁì¡£

Ò»¡¢µÇ¼GitLabЧÀÍÆ÷

ÔÚЧÀÍÆ÷ÉϵǼGitLabÖÎÀíÔ±Õ˺Å¡£

¶þ¡¢½øÈëGitLab×°ÖÃĿ¼

½øÈëGitLab×°ÖÃĿ¼£¬Í¨³£Î»ÓÚ/opt/gitlabĿ¼Ï¡£

Èý¡¢Ê¹ÓÃcatÏÂÁîÉó²éÈÕÖ¾

ÔÚÖÕ¶ËÊäÈëÒÔÏÂÏÂÁî¿ÉÒÔÉó²éGitLabµÄÖ÷ÒªÈÕÖ¾£º

sudo cat /var/log/gitlab/gitlab-rails/production.log

¸ÃÏÂÁî»á½«production.logÖеÄËùÓÐÄÚÈÝÊä³öµ½Öնˡ£ÆäÖУ¬/var/log/gitlab/gitlab-rails/Ŀ¼Ï´洢ÁËGitLab RailsÓ¦ÓóÌÐòµÄÖ÷ÒªÈÕÖ¾Îļþ£¬¿ÉÒÔʹÓÃlsÏÂÁîÉó²éĿ¼ÏµÄËùÓÐÈÕÖ¾Îļþ¡£Ê¹ÓÃtailÏÂÁî¿ÉÒÔʵʱÉó²éÈÕÖ¾ÄÚÈÝ£¬È磺

tail -f /var/log/gitlab/gitlab-rails/production.log

ËÄ¡¢Éó²éGitLabÒì³£ÈÕÖ¾

GitLabÒì³£ÈÕÖ¾¿ÉÒÔ×ÊÖúÖÎÀíÔ±·¢Ã÷ϵͳÎÊÌ⣬¶¨Î»ÎÊÌâÔµ¹ÊÔ­ÓÉ¡£ÔÚGitLabµÄ×°ÖÃĿ¼Ï¿ÉÒÔÉó²éÒì³£ÈÕÖ¾£º

sudo cat /var/log/gitlab/gitlab-rails/production_json.log

¸ÃÈÕÖ¾Îļþ¼Í¼ÁËGitLab RailsÓ¦ÓóÌÐòµÄJSONÒì³£ÐÅÏ¢¡£¿ÉÒÔʹÓÃcatÏÂÁîä¯ÀÀÕû¸öÎļþ£¬Ò²¿ÉÒÔͨ¹ýgrepÏÂÁî¿ìËÙ²éÕÒÌض¨Òì³£µÄÐÅÏ¢£¬ÀýÈ磺

sudo cat /var/log/gitlab/gitlab-rails/production_json.log | grep “error message”

Îå¡¢Éó²éÆäËûÈÕÖ¾

³ýÁËGitLab RailsÓ¦ÓóÌÐòµÄÖ÷ÒªÈÕÖ¾ºÍÒì³£ÈÕÖ¾Í⣬GitLabϵͳ»¹»á¼Í¼´øÓÐϵͳ×Ô¼ºÔËÐÐÏà¹ØÐÅÏ¢µÄÆäËüÈÕÖ¾¡£³£¼ûµÄÆäËûÈÕÖ¾Îļþ°üÀ¨£º

1.gitlab-shellÈÕÖ¾

gitlab-shell°üÀ¨ÁËÓÃÓÚ´¦ÀíGitÏÂÁîÇëÇóµÄ»ù´¡Ó¦ÓóÌÐò£¬ÆäÈÕÖ¾ÎļþλÓÚ/var/log/gitlab/gitlab-shell/Ŀ¼Ï¡£

sudo cat /var/log/gitlab/gitlab-shell/gitlab-shell.log

2.unicornÈÕÖ¾

unicornÊÇGitLab RailsÓ¦ÓóÌÐòµÄЧÀÍÆ÷£¬ÆäÈÕÖ¾ÎļþλÓÚ/var/log/gitlab/unicorn/Ŀ¼Ï¡£

sudo cat /var/log/gitlab/unicorn/unicorn_stdout.log

ÒÔÉÏÊÇÔÚGitLabЧÀÍÆ÷¶ËÉó²éÈÕÖ¾µÄÒªÁ졣ͨ¹ýÉó²éÈÕÖ¾£¬ÖÎÀíÔ±¿ÉÒÔÏàʶGitLabϵͳµÄÔËÐÐ״̬ºÍ²Ù×÷ÇéÐΣ¬ÊµÊ±·¢Ã÷²¢½â¾öÎÊÌâ¡£

ÒÔÉϾÍÊÇÔõÑùÔÚgitlabЧÀÍÆ÷¶ËÉó²éÈÕÖ¾µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ