| <!doctype html> |
| <html lang="zh-CN" dir="ltr" class="docs-wrapper docs-doc-page docs-version-1.4.0 plugin-docs plugin-id-default docs-doc-id-tuning-and-troubleshooting/overview"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="generator" content="Docusaurus v2.2.0"> |
| <title data-rh="true">总览 | Apache Linkis</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://linkis.apache.org/zh-CN/docs/1.4.0/tuning-and-troubleshooting/overview"><meta data-rh="true" name="docusaurus_locale" content="zh-CN"><meta data-rh="true" name="docsearch:language" content="zh-CN"><meta data-rh="true" name="docusaurus_version" content="1.4.0"><meta data-rh="true" name="docusaurus_tag" content="docs-default-1.4.0"><meta data-rh="true" name="docsearch:version" content="1.4.0"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-1.4.0"><meta data-rh="true" property="og:title" content="总览 | Apache Linkis"><meta data-rh="true" name="description" content="调优排障"><meta data-rh="true" property="og:description" content="调优排障"><link data-rh="true" rel="icon" href="/zh-CN/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://linkis.apache.org/zh-CN/docs/1.4.0/tuning-and-troubleshooting/overview"><link data-rh="true" rel="alternate" href="https://linkis.apache.org/docs/1.4.0/tuning-and-troubleshooting/overview" hreflang="en"><link data-rh="true" rel="alternate" href="https://linkis.apache.org/zh-CN/docs/1.4.0/tuning-and-troubleshooting/overview" hreflang="zh-CN"><link data-rh="true" rel="alternate" href="https://linkis.apache.org/docs/1.4.0/tuning-and-troubleshooting/overview" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://AE29KQB3IA-dsn.algolia.net" crossorigin="anonymous"><link rel="alternate" type="application/rss+xml" href="/zh-CN/blog/rss.xml" title="Apache Linkis RSS Feed"> |
| <link rel="alternate" type="application/atom+xml" href="/zh-CN/blog/atom.xml" title="Apache Linkis Atom Feed"> |
| <link rel="alternate" type="application/json" href="/zh-CN/blog/feed.json" title="Apache Linkis JSON Feed"> |
| |
| |
| |
| <link rel="search" type="application/opensearchdescription+xml" title="Apache Linkis" href="/zh-CN/opensearch.xml"><link rel="stylesheet" href="/zh-CN/assets/css/styles.3e8e01b6.css"> |
| <link rel="preload" href="/zh-CN/assets/js/runtime~main.40411d4a.js" as="script"> |
| <link rel="preload" href="/zh-CN/assets/js/main.b85ef3f0.js" as="script"> |
| </head> |
| <body class="navigation-with-keyboard"> |
| <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> |
| <div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#docusaurus_skipToContent_fallback">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/zh-CN/"><div class="navbar__logo"><img src="/zh-CN/img/logo.png" alt="Apache Linkis Logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/zh-CN/img/logo.png" alt="Apache Linkis Logo" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">Apache Linkis</b></a><a class="navbar__item navbar__link" href="/zh-CN/download/main">下载</a><a class="navbar__item navbar__link" href="/zh-CN/community/how-to-subscribe">社区</a><a class="navbar__item navbar__link" href="/zh-CN/blog">博客</a><a class="navbar__item navbar__link" href="/zh-CN/team">团队</a><a class="navbar__item navbar__link" href="/zh-CN/user">用户</a><a href="https://docs.qq.com/doc/DUkdTTGhVSlZ0VXVt" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">FAQ</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Apache</a><ul class="dropdown__menu"><li><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" class="dropdown__link">基金会</a></li><li><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="dropdown__link">证书</a></li><li><a href="https://www.apache.org/events/current-event" target="_blank" rel="noopener noreferrer" class="dropdown__link">事件</a></li><li><a href="https://www.apache.org/security/" target="_blank" rel="noopener noreferrer" class="dropdown__link">安全</a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">赞助</a></li><li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Privacy</a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">致谢</a></li></ul></div></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">文档</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/zh-CN/docs/latest/about/introduction">1.6.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.5.0/about/introduction">1.5.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.4.0/about/introduction">1.4.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.7.0/about/introduction">Next(1.7.0)</a></li><li><a class="dropdown__link" href="/zh-CN/versions">All Version</a></li></ul></div><a href="https://github.com/apache/linkis" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-github-link" aria-label="GitHub"></a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_nlXk"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg>简体中文</a><ul class="dropdown__menu"><li><a href="/docs/1.4.0/tuning-and-troubleshooting/overview" target="_self" rel="noopener noreferrer" class="dropdown__link" lang="en">English</a></li><li><a href="/zh-CN/docs/1.4.0/tuning-and-troubleshooting/overview" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang="zh-CN">简体中文</a></li></ul></div><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">搜索</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebar_njMd"><nav class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/about/introduction">关于 Linkis</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/feature/overview">版本特性</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/quick/live-demo">快速体验</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/deployment/deploy-quick">部署指南</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/user-guide/how-to-use">使用指南</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/engine-usage/overview">引擎使用</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/auth/ldap">安全认证</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/api/overview">API</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/architecture/overview">架构设计</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/development/directory-structure">开发指南</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/zh-CN/docs/1.4.0/tuning-and-troubleshooting/overview">调优排障</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/zh-CN/docs/1.4.0/tuning-and-troubleshooting/overview">总览</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/tuning-and-troubleshooting/configuration">参数列表</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/tuning-and-troubleshooting/tuning">调优手册</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.4.0/tuning-and-troubleshooting/error-guide/error-code">错误码</a></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/upgrade/upgrade-from-0.X-to-1.0-guide">升级指南</a></div></li></ul></nav></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="theme-doc-version-banner alert alert--warning margin-bottom--md" role="alert"><div>This is documentation for <!-- -->Apache Linkis<!-- --> <b>1.4.0</b>, 非最新版本。</div><div class="margin-top--md">有关最新文档,请参阅最新稳定版本<b><a href="/zh-CN/docs/latest/tuning-and-troubleshooting/overview">latest version</a></b> (<!-- -->1.6.0<!-- -->).</div></div><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="页面路径"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/zh-CN/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_OVgt"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">调优排障</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">总览</span><meta itemprop="position" content="2"></li></ul></nav><span class="theme-doc-version-badge badge badge--secondary">版本:1.4.0</span><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>总览</h1></header><h2 class="anchor anchorWithStickyNavbar_LWe7" id="调优排障">调优排障<a class="hash-link" href="#调优排障" title="Direct link to heading"></a></h2><blockquote><p>建议的排查基本优先级可以按照:<strong>社区issue专栏搜索关键词—<!-- -->><!-- -->在社区查阅《Q\&A问题总结》文档—<!-- -->><!-- -->定位系统日志—<!-- -->><!-- -->社区用户群咨询交流—<!-- -->><!-- -->定位源码远程debug</strong></p></blockquote><h2 class="anchor anchorWithStickyNavbar_LWe7" id="1-社区issue搜索关键词">1. 社区Issue搜索关键词<a class="hash-link" href="#1-社区issue搜索关键词" title="Direct link to heading"></a></h2><p>在<a href="https://github.com/apache/linkis/issues" target="_blank" rel="noopener noreferrer">issue专栏</a>, filter过滤器中搜索关键词。如: |
| filter:<code>is:issue spark3</code> |
| <img loading="lazy" src="/zh-CN/assets/images/issue-searching-keywords-d83de993d1052bd9700a15e29a64fdf6.png" width="1684" height="554" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="2-常见qa问题集">2. 常见Q&A问题集<a class="hash-link" href="#2-常见qa问题集" title="Direct link to heading"></a></h2><p>将issue中常见的问题以及解决方案整理成文档,放在了官网页面《 <a href="/zh-CN/faq/main">常见问题</a> 》</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="3-如何定位错误">3. 如何定位错误<a class="hash-link" href="#3-如何定位错误" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="31-编译阶段异常排查">3.1 编译阶段异常排查<a class="hash-link" href="#31-编译阶段异常排查" title="Direct link to heading"></a></h3><blockquote><p>如果是自行编译</p></blockquote><p>通常会出现的问题:</p><ul><li>编译前,未执行<code>mvn -N install</code>, 导致linkis自身依赖没法获取</li><li>升级部分依赖组件后,导致函数报错 如使用spark3 </li></ul><p>定位异常的手段: |
| 可以在mvn 运行命令后面加上 -e 参数 如<code>mvn clean install -e</code></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="32-安装阶段异常排查">3.2 安装阶段异常排查<a class="hash-link" href="#32-安装阶段异常排查" title="Direct link to heading"></a></h3><p>如果出现报错,又不清楚具体是执行什么命令报错,可以加 -x 参数<code>sh -x bin/install.sh</code>,将shell脚本执行过程日志打印出来,方便定位问题</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="33-启动微服务阶段异常排查">3.3 启动微服务阶段异常排查<a class="hash-link" href="#33-启动微服务阶段异常排查" title="Direct link to heading"></a></h3><p>所有微服务的日志文件统一放入了logs目录,日志目录层级如下:</p><div class="language-html codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-html codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">├── logs 日志目录</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-engineconnmanager-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-engineconnmanager.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-engineconnmanager.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-engineplugin-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-engineplugin.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-engineplugin.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-entrance-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-entrance.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-entrance.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-linkismanager-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-linkismanager.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cg-linkismanager.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-cli</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ │ ├── linkis-client.hadoop.log.20220409162400037523664</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ │ ├── linkis-client.hadoop.log.20220409162524417944443</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-mg-eureka-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-mg-eureka.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-mg-eureka.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-mg-gateway-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-mg-gateway.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-mg-gateway.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-cs-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-cs.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-cs.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-data-source-manager-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-data-source-manager.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-data-source-manager.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-metadatamanager-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-metadatamanager.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-metadatamanager.out</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-publicservice-gc.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ ├── linkis-ps-publicservice.log</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">│ └── linkis-ps-publicservice.out</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>包含计算治理、公共增强、微服务管理三大微服务模块。每个微服务下包含<code>linkis-xxx-gc.log</code>、<code>linkis-xxx.log</code>、`<code>linkis-xxx.out</code>三个日志。 |
| 分别对应服务的GC日志、服务日志、服务的System.out日志。</p><p>通常情况下,启动某个微服务出错时,可以在log目录查看对应服务 查看详细日志排查问题</p><p>但因为服务之间是存在相互调用,linkis的微服务比较多,若对系统不熟悉,有时候无法定位到具体哪个模块出现了异常,可以通过全局日志搜索方式,拉取关键异常信息,进行排查 </p><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token function" style="color:rgb(80, 250, 123)">tail</span><span class="token plain"> -f log/* </span><span class="token operator">|</span><span class="token function" style="color:rgb(80, 250, 123)">grep</span><span class="token plain"> -5n exception</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">或则tail -f log/* </span><span class="token operator">|</span><span class="token function" style="color:rgb(80, 250, 123)">grep</span><span class="token plain"> -5n ERROR</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token function" style="color:rgb(80, 250, 123)">less</span><span class="token plain"> log/* </span><span class="token operator">|</span><span class="token function" style="color:rgb(80, 250, 123)">grep</span><span class="token plain"> -5n exception</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">或则less log/* </span><span class="token operator">|</span><span class="token function" style="color:rgb(80, 250, 123)">grep</span><span class="token plain"> -5n ERROR</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="34-运行阶段">3.4 运行阶段<a class="hash-link" href="#34-运行阶段" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="341-接口异常排查">3.4.1 接口异常排查<a class="hash-link" href="#341-接口异常排查" title="Direct link to heading"></a></h4><p>如果某个接口请求报错,可以根据接口的返回加过中定位出现问题的微服务, |
| 一般情况下可以<strong>根据URL规范进行定位,</strong>Linkis接口中的URL都遵循着一定的设计规范, |
| 即<strong>/api/rest_j/v1/{applicationName}/.+的格式</strong>,通过applicationName可以定位应用名,部分应用本身是一个微服务, |
| 这时候应用名和微服务名相同,部分应用归属于某个微服务,此时应该通过应用名查找归属的微服务, |
| 去对应的微服务下查看log日志,下面给出微服务和应用名的对应关系。</p><table><thead><tr><th><strong>请求路径中的ApplicationName</strong></th><th><strong>服务的提供方</strong></th></tr></thead><tbody><tr><td>/api/rest_j/v1/linkisManager/*</td><td>linkis-cg-linkismanager</td></tr><tr><td>/api/rest_j/v1/entrance/*</td><td>linkis-cg-entrance</td></tr><tr><td>/api/rest_j/v1/bml/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/configuration/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/jobhistory/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/filesystem/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/variable/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/microservice/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/errorcode/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/udf/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/datasource/*</td><td>linkis-ps-publicservice</td></tr><tr><td>/api/rest_j/v1/metadatamanager/*</td><td>linkis-ps-metadatamanager</td></tr><tr><td>/api/rest_j/v1/data-source-manager/*</td><td>linkis-ps-data-source-manager</td></tr><tr><td>/api/rest_j/v1/engineplugin/*</td><td>linkis-engineconn-plugin</td></tr><tr><td>/api/rest_j/v1/contextservice/*(暂未使用到)</td><td>linkis-ps-cs</td></tr></tbody></table><p>对于请求异常的定位,可以根据上表的对应关系,去对应的服务日志中进行查看</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="342-执行引擎任务的异常排查">3.4.2 执行引擎任务的异常排查<a class="hash-link" href="#342-执行引擎任务的异常排查" title="Direct link to heading"></a></h4><p><strong> step1:找到EngineConn的启动部署目录 </strong> </p><ul><li>方式1:如果执行日志中有显示,可以在管理台上查看到 如下图:<br><img loading="lazy" alt="engine-log" src="/zh-CN/assets/images/engine-log-ea301d1f5c9da11de32fdb8408b14b56.png" width="1889" height="731" class="img_ev3q"></li><li>方式2:如果方式1中没有找到,可以通过找到<code>conf/linkis-cg-engineconnmanager.properties</code>配置的<code>wds.linkis.engineconn.root.dir</code>的参数,该值就是引擎启动部署的目录,子目录按执行引擎的用户进行了隔离</li></ul><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token comment" style="color:rgb(98, 114, 164)"># 如果不清楚taskid,可以按时间排序后进行选择 ll -rt /appcom/tmp/${执行的用户}/${日期}/${引擎}/ </span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(189, 147, 249)">cd</span><span class="token plain"> /appcom/tmp/</span><span class="token variable" style="color:rgb(189, 147, 249);font-style:italic">${执行的用户}</span><span class="token plain">/</span><span class="token variable" style="color:rgb(189, 147, 249);font-style:italic">${日期}</span><span class="token plain">/</span><span class="token variable" style="color:rgb(189, 147, 249);font-style:italic">${引擎}</span><span class="token plain">/</span><span class="token variable" style="color:rgb(189, 147, 249);font-style:italic">${taskId}</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">例如一个Spark 引擎的启动目录如下:</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">/appcom/tmp/hadoop/20210824/spark/6a09d5fb-81dd-41af-a58b-9cb5d5d81b5a</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>目录大体如下 </p><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">conf -</span><span class="token operator">></span><span class="token plain"> /appcom/tmp/engineConnPublickDir/6a09d5fb-81dd-41af-a58b-9cb5d5d81b5a/v000002/conf </span><span class="token comment" style="color:rgb(98, 114, 164)">#引擎的配置文件 </span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">engineConnExec.sh </span><span class="token comment" style="color:rgb(98, 114, 164)">#生成的引擎的启动脚本 </span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">lib -</span><span class="token operator">></span><span class="token plain"> /appcom/tmp/engineConnPublickDir/45bf0e6b-0fa5-47da-9532-c2a9f3ec764d/v000003/lib </span><span class="token comment" style="color:rgb(98, 114, 164)">#引擎依赖的包 </span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">logs </span><span class="token comment" style="color:rgb(98, 114, 164)">#引擎启动执行的相关日志 </span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><strong> step2:查看引擎的日志 </strong></p><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token function" style="color:rgb(80, 250, 123)">less</span><span class="token plain"> logs/stdout </span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token function" style="color:rgb(80, 250, 123)">less</span><span class="token plain"> logs/stderr</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><strong> step3:尝试手动执行脚本(如果需要) </strong><br> |
| <!-- -->可以通过尝试手动执行脚本,进行调试</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">sh -x engineConnExec.sh </span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="4-问题反馈">4. 问题反馈<a class="hash-link" href="#4-问题反馈" title="Direct link to heading"></a></h3><p>对于按上述排查方式排查后,仍然没解决的问题,可以通过<a href="/zh-CN/community/how-to-ask-for-help">需求帮助</a>指引方式进行反馈和需求帮助 </p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="5-定位源码远程debug">5. 定位源码远程debug<a class="hash-link" href="#5-定位源码远程debug" title="Direct link to heading"></a></h3><p>通常情况下,对源码远程debug是定位问题最有效的方式,但相对查阅文档来说,需要用户对源码结构有一定的了解, |
| 这里建议您在远程debug前查阅《 <a href="/zh-CN/docs/1.4.0/development/directory-structure">Linkis源码层级结构详解</a> 》,对项目的源码结构进行初步的了解, |
| 有一定程度上的熟悉之后,可以参考《 <a href="/zh-CN/docs/1.4.0/development/debug">如何DebugLinkis</a> 》一文 调试对应微服务下的代码。</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/apache/linkis-website/edit/dev/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.4.0/tuning-and-troubleshooting/overview.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>编辑</a></div><div class="col lastUpdated_vwxv"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/zh-CN/docs/1.4.0/development/table/udf-table"><div class="pagination-nav__sublabel">上一篇</div><div class="pagination-nav__label">UDF 表结构</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/zh-CN/docs/1.4.0/tuning-and-troubleshooting/configuration"><div class="pagination-nav__sublabel">下一篇</div><div class="pagination-nav__label">参数列表</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#调优排障" class="table-of-contents__link toc-highlight">调优排障</a></li><li><a href="#1-社区issue搜索关键词" class="table-of-contents__link toc-highlight">1. 社区Issue搜索关键词</a></li><li><a href="#2-常见qa问题集" class="table-of-contents__link toc-highlight">2. 常见Q&A问题集</a></li><li><a href="#3-如何定位错误" class="table-of-contents__link toc-highlight">3. 如何定位错误</a><ul><li><a href="#31-编译阶段异常排查" class="table-of-contents__link toc-highlight">3.1 编译阶段异常排查</a></li><li><a href="#32-安装阶段异常排查" class="table-of-contents__link toc-highlight">3.2 安装阶段异常排查</a></li><li><a href="#33-启动微服务阶段异常排查" class="table-of-contents__link toc-highlight">3.3 启动微服务阶段异常排查</a></li><li><a href="#34-运行阶段" class="table-of-contents__link toc-highlight">3.4 运行阶段</a></li><li><a href="#4-问题反馈" class="table-of-contents__link toc-highlight">4. 问题反馈</a></li><li><a href="#5-定位源码远程debug" class="table-of-contents__link toc-highlight">5. 定位源码远程debug</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Linkis</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/zh-CN/docs/latest/about/introduction">文档</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-CN/faq/main">FAQ</a></li><li class="footer__item"><a href="https://github.com/apache/linkis/releases" target="_blank" rel="noopener noreferrer" class="footer__link-item">版本</a></li></ul></div><div class="col footer__col"><div class="footer__title">社区</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/apache/linkis" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li><li class="footer__item"><a href="https://github.com/apache/linkis/issues" target="_blank" rel="noopener noreferrer" class="footer__link-item">Issue Tracker</a></li><li class="footer__item"><a href="https://github.com/apache/linkis/pulls" target="_blank" rel="noopener noreferrer" class="footer__link-item">Pull Requests</a></li></ul></div><div class="col footer__col"><div class="footer__title">订阅邮件组</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/zh-CN/community/how-to-subscribe">如何订阅</a></li><li class="footer__item"><a href="mailto:dev-subscribe@linkis.apache.org" target="_blank" rel="noopener noreferrer" class="footer__link-item">订阅邮件</a></li><li class="footer__item"><a href="https://lists.apache.org/list.html?dev@linkis.apache.org" target="_blank" rel="noopener noreferrer" class="footer__link-item">邮件归档</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright"><div style="text-align: left;"> |
| <div> |
| <p style="font-family: Avenir-Medium;font-size: 14px;color: #999;line-height: 20px;">Apache Linkis is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</p> |
| </div> |
| <div style="border-top: 1px solid #ccc;min-height: 60px;line-height: 20px;text-align: center;font-family: Avenir-Medium;font-size: 14px;color: #999;display: flex;align-items: center;"><span>Copyright © 2019-2020 The Apache Software Foundation. Apache Linkis, Linkis, and its feather logo are trademarks of The Apache Software Foundation.</span></div> |
| </div></div></div></div></footer></div> |
| <script src="/zh-CN/assets/js/runtime~main.40411d4a.js"></script> |
| <script src="/zh-CN/assets/js/main.b85ef3f0.js"></script> |
| </body> |
| </html> |