OpenResty XRay Frequently Asked Questions

🔗 What is OpenResty XRay?

🔗 What is OpenResty XRay?

OpenResty XRay is a dynamic tracing product that can analyze various cloud and server applications in real-time. It treats running processes and containers as read-only databases and extracts necessary information to resolve performance issues, anomalies, errors, and security vulnerabilities. OpenResty XRay has a knowledge base, an inference engine, and hundreds of advanced analyzers that can diagnose and narrow down the root causes of deep issues without changing or affecting the target application.

🔗 Who should use OpenResty XRay?

DevOps can use OpenResty XRay to quickly discover any issues or identify the root causes, then forward the discovered issues and generate automatic reports to developers.

Development teams can also use OpenResty XRay to check for any regression issues during daily development or before the release of new software products.

🔗 Can OpenResty XRay analyze applications not running on OpenResty?

Of course! OpenResty XRay is a universal platform that can analyze any software. Well, at least the software you control (such as having access to DWARF debug symbols, source code, etc.).

However, OpenResty XRay currently works best with the OpenResty and Nginx technology stacks. Let us know which open-source software you would like OpenResty XRay to support next!

🔗 Does OpenResty XRay require any changes to my application?

No! OpenResty XRay uses advanced dynamic tracing technology and does not require cooperation from the target application. It is 100% non-intrusive.

  1. We do not require plugins or modules to be added to your application.
  2. We do not need to patch your application's code.
  3. We do not require special compilation or startup options (when compiling C/C++ programs, you do need the -g option to send DWARF data, but this is very standard practice).
  4. We do not inject any code into your application processes.

Using OpenResty XRay analyzers will not harm your application processes or even cause them to crash, as we do not add anything to your processes.

🔗 Is there a personal version available for individual use?

Yes, there is! As long as the personal version is not used for any company, government, or other commercial purposes. However, we usually do not provide SLA for the personal version.

🔗 Installation and Deployment

🔗 How do I deploy and install OpenResty XRay for my application?

You need to install and run the OpenResty XRay agent program on the server with your application or container. The agent program is a standalone daemon that can inspect all applications on the same server. It also acts as a client for the OpenResty XRay web console.

There are several ways to install the OpenResty XRay agent.

  1. Install the RPM or Deb package repository we provide for the respective Linux distribution.
  2. Install a large .tar.gz package containing all the RPM or Deb packages we provide for your Linux distribution.
  3. Install our official Docker or Kubernetes (K8s) container images.

A common mistake is installing the agent in your own container. This will always fail because your container will almost always lack the permissions or filesystem access needed for the agent to inspect other processes and containers.

🔗 Which operating systems do we support?

Ubuntu 24.04 noble, Ubuntu 22.04 Jammy, Ubuntu 20.04 Focal, Ubuntu 18.04 Bionic, Debian 12 Bookworm, Debian 11 Bullseye, Debian 10 Buster, Debian 9 Stretch, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 7, Rocky Linux 9, Rocky Linux 8, AlmaLinux 9, AlmaLinux 8, Cent OS 8, Cent OS 7, Cent OS 6, Fedora 36, Fedora 35, Fedora 34, Fedora 33, Fedora 32, Amazon Linux 2023, Amazon Linux 2, Amazon Linux 1, Alibaba Cloud Linux 3, Alibaba Cloud Linux 2, Tencent Linux 3, Tencent Linux 2, OpenSUSE 15, Kylin 10, Kylin 7, CBL-Mariner 2

Our official Docker or K8s container images can run on any modern Linux distribution that supports containers, as long as the Linux distribution used within the target application containers is on the supported list.

If you want to run the OpenResty XRay agent service natively, we support most mainstream Linux distributions. Please check the latest distribution support list for details.

If you have a new Linux distribution that needs native support, please contact us: info@openresty.com!

In the future, we may also support non-Linux operating systems such as Android, macOS, *BSD, and Microsoft Windows.

🔗 Do I need a very new Linux kernel?

No! We support older kernels, such as the 3.10 kernel of CentOS 7. But we do not support older kernels like the 2.6 kernel of CentOS 6.

🔗 Can I use my own Linux kernel?

Yes! But you need to contact our team so that we can index your kernel in the software package database and thoroughly test its compatibility with our product. We do not yet support automatic indexing of custom or unknown kernels. We may consider adding this support in the future.

🔗 Is self-compiled kernel supported?

Yes, you need to upload the relevant kernel packages. The specific kernel packages required can be referenced on the upload page of the OpenResty XRay Console.

🔗 What applications and programming languages does OpenResty XRay support?

Supported programming languages and runtimes: Python, Java, Rust, Perl, PHP, Erlang, Ruby, Go, LuaJIT, C/C++ Supported servers and proxies: OpenResty, Envoy, Kong, CockroachDB, Nginx,

🔗 Can the OpenResty XRay agent analyze applications running on AWS EKS?

Yes.

🔗 Can I use OpenResty XRay on local virtual machines like VMWare/VirtualBox/KVM/etc.?

Yes! All such full-system virtualization technologies should work out of the box with OpenResty XRay. If not, please report it to us.

Please note that installing our agent inside your own Docker or K8s containers is not supported. But you can always use our official Docker and K8s container images to install the agent.

🔗 Can I run OpenResty XRay on public cloud virtual machines?

Yes! For example, Microsoft Azure, Google Cloud (GCP), Amazon Cloud (AWS), or Digital Ocean. Virtualized cloud servers are fine. Physical machines are not required.

🔗 Does the agent need a C compiler toolchain installed?

No. Unlike those open-source dynamic tracing frameworks like SystemTap or eBPF/BCC, OpenResty XRay does not require any C or C++ compiler toolchain to be installed on the target machine. No gcc, no clang, nothing. Also, it does not require any Linux kernel headers to be installed.

🔗 How is the OpenResty XRay agent deployed on K8s?

The OpenResty XRay Agent is usually deployed in a DaemonSet manner in Kubernetes environments.

🔗 Agent Usage and Management

🔗 How much overhead does the agent have?

We strive to minimize the performance impact of the agent program on your servers marked as "production". The agent uses an event-driven sampling method, so it does not constantly try to collect data, only when there is a real need. When not sampling, the additional overhead generated by all your processes is strictly 0. This is due to the truly non-intrusive nature of dynamic tracing. Even when sampling, the overhead of most of our analyzers should be less than 5% of your application. Even for those tools that are originally more expensive, the system will try to automatically adjust the frequency and process range of these analyzers to minimize the impact.

If you do not mark your servers as "production" in the web console, the system will consider them as development or test environments. Therefore, it will no longer be cautious about resource usage, and all analyzers will run at full speed so that you can get results as soon as possible.

🔗 Do I need to restart my processes after installing the agent?

No! One of the advantages of dynamic tracing technology is post-analysis. You do not need to restart your application or any existing processes for the newly installed OpenResty XRay agent to analyze. We can do this because we do not require any new plugins, new startup options, or code injection into your application. It is pollution-free and non-intrusive.

We understand that you may have some processes that have entered some rare states, and restarting them would make the problem disappear. This is why post-analysis and debugging are so critical.

🔗 How can I stop the agent?

To stop the OpenResty XRay agent service, simply run the following shell command.

sudo systemctl stop orxray-agent

But this is only temporary. If the system restarts or reboots, the agent service will start again. To stop it permanently, you can also run this command after running the previous command.

sudo systemctl disable orxray-agent

For containerized agent services, you can stop the agent container instance with Docker or Kubernetes.

🔗 How do I restart the agent?

To restart your agent, simply run the command.

sudo systemctl restart orxray-agent

Wait a few minutes, and the new agent instance will take effect.

🔗 My agent is not working, what should I do?

Sometimes, due to network or hard disk issues, the agent cannot work properly. In this case, check the error log files in the directory.

/usr/local/orxray-agent/logs/

If you need help with the errors in the error log files, please feel free to contact us.

🔗 How to run OpenResty XRay to analyze memory, CPU, etc.?

To run OpenResty XRay to analyze memory, CPU, etc., you can use its guided analysis features. For detailed operation steps and related cases, please refer to the series of articles on XRay online analysis of memory and high CPU issues on the official OpenResty blog.

🔗 Can the agent analyze private software?

Yes, if you have written private software. For example, if you do not have permission from other vendors, you should not analyze their proprietary software. However, if you have written the software or have access to the source code and have permission to compile it, then it is fine. You can even use our Y language (lang) to write advanced analyzers for your program. Make sure you compile private software with DWARF data (or "debug symbols"). For example, C/C++ programs should be compiled with the g or g3 option when using gcc or g++. Compiling with DWARF symbols has no impact on the runtime performance of the program, and most mainstream Linux distributions do this by default in their standard packages.

However, DWARF data is not always required. Some basic analyzers in OpenResty XRay do not require "debug symbols" to work. We once helped a customer accurately locate a memory leak in a third-party proprietary library at the C/C++ function level. But make sure you comply with third-party licensing requirements.

🔗 Data Security

🔗 What data does the agent collect?

The OpenResty XRay agent program only collects basic data used to analyze performance issues, troubleshoot stability and behavioral issues, and scan for security vulnerabilities. We never collect any potentially sensitive data from your business-level code. We also implement safeguards to prevent accidentally collecting sensitive data from data sources so that it does not leak outside your application processes.

🔗 How do you handle the data collected by the agent?

We are very careful to protect our customers' data and privacy. This is our top priority. When transmitting all data to our web console, we always use industry-standard encryption methods (such as TLS). Our web console's data storage and management also comply with all SOC 2 guidelines. Only the raw data of the last 2 weeks is stored in our web console (higher-level report data is stored for a longer period). If some customers have shorter data lifecycle requirements, we can also accommodate them.

🔗 Will you sell or share our data?

No, never. We will not sell your data to any third party. We may only share some audited and obfuscated data with some of our external contractors. And all our contractors must sign a non-disclosure agreement (NDA) with us.

🔗 Can I avoid uploading any data to your console?

Yes! We offer a self-hosted version of OpenResty XRay for companies with strict data handling policies. It is more expensive than the cloud version. For the On-Premise version, users deploy the web console in their own environment; therefore, no data is uploaded to OpenResty Inc.'s servers.

🔗 Debug Symbols and Analysis Capabilities

🔗 Do I need to install debug symbol packages on all my servers?

No. OpenResty XRay indexes all the debug symbols it finds in a remote database called package database. Whenever the agent finds a binary executable, it automatically queries the corresponding debug symbols in the package database.

We run crawlers to continuously obtain debug symbols (or DWARF data) for public software packages on the internet. We also automatically index users' own DWARF data and debug symbols. Each OpenResty XRay tenant has its own independent software package database to protect privacy. If you compile the software yourself, make sure you have an offline (or online) machine with all the software binaries and debug symbols installed and let the OpenResty XRay agent run there (at least for a while). Once the DWARF data and binary programs are indexed into the user's software package database, the user can get rid of the debug symbols on all their machines.

🔗 OpenResty XRay says my program lacks debug symbols, what should I do?

If the program is self-compiled, try to find the debug symbol package related to your main software package (such as *-debuginfo packages on RPM-based distributions, *-dbgsym.ddeb or *-dbgsym.deb files on Deb-based distributions). Install the debuginfo package on a machine with the agent installed and running, and wait for the agent to index the debug symbols.

Suppose your program was compiled without debug symbols, or you cannot find the corresponding debuginfo package. In that case, you can try recompiling your program with debug symbols enabled (for C/C++ programs, pass the -g or -g3 option in the compiler command line). Also, ensure your packaging scripts generate a debuginfo package (such as *-debuginfo*.rpm or *-dbgsym.deb) instead of discarding the debug symbols.

We understand that finding debug symbols can sometimes be a hassle. We are developing an AI system that can automatically reconstruct DWARF data for similar but not identical binary programs from existing DWARF data. Once this is ready, OpenResty XRay will be able to thoroughly analyze a large number of open-source software binaries that lack debug symbols.

It is worth mentioning that some basic analyzers in OpenResty XRay do not require "debug symbols" to work. In fact, we once helped a customer accurately locate a memory leak in a third-party proprietary library at the C/C++ function level.

🔗 Can I write my own analyzers?

Yes! You can use our Y language (or Ylang) to write your own analyzers. Ylang is a large subset of the C programming language with our own dynamic tracing extensions. We also provide the Ylua language, which is a subset of the Lua language with extensions, and YSQL, a SQL dialect.

🔗 Other Questions

🔗 Do these kernel messages have any impact?

🔗 vsyscall read attempt denied

After starting live recording, the kernel may throw messages like the one below. This message is harmless and can be ignored.

[29389.731303] redis-server[298169] vsyscall read attempt denied -- look up the vsyscall kernel parameter if you need a workaround ip:7f000013d241 cs:33 sp:2aaacbcf6f08 ax:0 si:7f00003db659 di:ffffffffff600000

🔗 How many accounts does 1 License support?

1 License supports 2 account logins.

🔗 How to configure HTTP proxy for OpenResty XRay?

If your OpenResty XRay Agent is deployed in an environment that requires accessing the public network through an HTTP proxy, you can configure and use the HTTP proxy by following the steps in this document.

🔗 OpenResty XRay 是什么

🔗 OpenResty XRay 是什么

OpenResty XRay 是䞀䞪劚态远螪产品它可以实时分析各种云和服务噚应甚皋序。它将运行䞭的进皋和容噚视䞺只读数据库并提取必芁的信息来解决性胜问题、匂垞、错误和安党挏掞。OpenResty XRay 拥有知识库、掚理匕擎和数癟䞪高级分析噚可以圚䞍改变或圱响目标应甚皋序的情况䞋诊断和猩小深层问题的根源。

🔗 谁应该䜿甚 OpenResty XRay

DevOps 可以利甚 OpenResty XRay 快速发现任意问题或扟出问题根源然后将发现的问题和生成的自劚报告蜬发给匀发人员。

匀发团队也可以利甚 OpenResty XRay 来检查日垞匀发䞭或新的蜯件产品发垃前的任䜕回園问题。

🔗 OpenResty XRay 可以分析䞍圚 OpenResty 䞊运行的应甚皋序吗

圓然OpenResty XRay 是䞀䞪通甚平台可以分析任䜕蜯件。奜吧至少是悚控制的蜯件比劂悚可以访问 DWARF 的调试笊号源代码等。

䞍过OpenResty XRay 目前分析 OpenResty 和 Nginx 技术栈的效果最奜。告诉我们悚垌望 OpenResty XRay 尜快支持的匀源蜯件

🔗 OpenResty XRay 需芁以任䜕方匏改变我的应甚皋序吗

䞍OpenResty XRay 䜿甚先进的劚态远螪技术䞍需芁目标应甚皋序的协䜜。它是 100% 非䟵入的。

  1. 我们䞍芁求圚悚的应甚皋序䞭添加插件或暡块。
  2. 我们䞍需芁对悚的应甚皋序的代码打䞊补䞁。
  3. 我们䞍需芁特殊的猖译或启劚选项奜吧圚猖译 C/C++ 皋序时悚确实需芁 -g 选项来发送 DWARF 数据䜆这是非垞标准的做法。
  4. 我们䞍向悚的应甚皋序进皋泚入任䜕代码。

䜿甚 OpenResty XRay 分析噚䞍䌚以任䜕方匏损害悚的应甚皋序进皋甚至䜿其厩溃因䞺我们䞍䌚向悚的进皋添加任䜕䞜西。

🔗 是吊有提䟛䞪人䜿甚的䞪人版

是的有提䟛只芁䞪人版䞍甚于任䜕公叞、政府或其他商䞚甚途。䞍过我们通垞䞍䞺䞪人版提䟛 SLA。

🔗 安装䞎郚眲

🔗 劂䜕䞺我的应甚皋序郚眲安装 OpenResty XRay

悚需芁圚装有应甚皋序或容噚的服务噚䞊安装并运行 OpenResty XRay agent 皋序。agent 皋序是䞀䞪独立的守技进皋可以检查悚圚同䞀服务噚䞊的所有应甚皋序。它也是䜜䞺 OpenResty XRay web 控制台的䞀䞪客户端。

有几种方法来安装 OpenResty XRay agent。

  1. 安装我们䞺盞应的 Linux 发行版提䟛的 RPM 或 Deb 蜯件包库。
  2. 安装䞀䞪倧的 .tar.gz 包其䞭包含我们䞺悚的 Linux 发行版提䟛的所有 RPM 或 Deb 包。
  3. 安装我们的官方 Docker 或 KubernetesK8s容噚镜像。

䞀䞪垞见的错误是圚悚自己的容噚䞭安装 agent。这总䌚倱莥的因䞺悚的容噚基本总䌚猺乏权限或文件系统访问权䜿 agent 无法检查其他进皋和容噚。

🔗 我们支持哪些操䜜系统

Ubuntu 24.04 noble, Ubuntu 22.04 Jammy, Ubuntu 20.04 Focal, Ubuntu 18.04 Bionic, Debian 12 Bookworm, Debian 11 Bullseye, Debian 10 Buster, Debian 9 Stretch, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 7, Rocky Linux 9, Rocky Linux 8, AlmaLinux 9, AlmaLinux 8, Cent OS 8, Cent OS 7, Cent OS 6, Fedora 36, Fedora 35, Fedora 34, Fedora 33, Fedora 32, Amazon Linux 2023, Amazon Linux 2, Amazon Linux 1, Alibaba Cloud Linux 3, Alibaba Cloud Linux 2, Tencent Linux 3, Tencent Linux 2, OpenSUSE 15, Kylin 10, Kylin 7, CBL-Mariner 2

我们的官方 Docker 或 K8s 容噚镜像可以圚任䜕支持容噚的现代 Linux 发行版䞊运行只芁这些目标应甚容噚内䜿甚的 Linux 发行版圚 支持列衚 内。

劂果悚想原生运行 OpenResty XRay 的 agent 服务我们是支持倧倚数䞻流 Linux 发行版的。请查看最新的 发行版支持列衚 了解诊情。

劂果悚有新的 Linux 发行版需芁原生支持请联系我们info@openresty.com!

以后我们可胜也䌚支持非 Linux 操䜜系统劂 Android、macOS、*BSD 和 Microsoft Windows 等。

🔗 需芁非垞新的 Linux 内栞吗

䞍需芁我们支持旧的内栞劂 CentOS 7 的 3.10 内栞。䜆䞍支持像 CentOS 6 的 2.6 这样的旧内栞。

🔗 我可以䜿甚我自己的 Linux 内栞吗

可以䜆悚需芁联系我们的团队以䟿我们胜借圚蜯件包数据库䞭玢匕悚的内栞并圻底测试它们䞎我们产品的兌容性。我们还䞍支持对自定义或未知内栞的自劚玢匕。我们可胜䌚考虑圚未来增加这䞀支持。

🔗 是吊支持自猖译内栞

支持需芁䞊䌠盞关的内栞包。具䜓需芁的内栞包可以参考 OpenResty XRay Console 的䞊䌠页面。

🔗 OpenResty XRay 支持哪些应甚和猖皋语蚀

支持的猖皋语蚀䞎运行时Python, Java, Rust, Perl, PHP, Erlang, Ruby, Go, LuaJIT, C/C++ 支持的服务噚䞎代理OpenResty, Envoy, Kong, CockroachDB, Nginx,

🔗 OpenResty XRay agent 胜吊分析 AWS EKS 䞊运行的应甚

支持。

🔗 我可以圚 VMWare/VirtualBox/KVM/ 等本地虚拟机䞊䜿甚 OpenResty XRay 吗

可以所有这样的党系统虚拟化技术郜应该可以䞎 OpenResty XRay 䞀起匀箱工䜜。劂果䞍胜请向我们报告。

请泚意䞍支持圚悚自己的 Docker 或 K8s 容噚内安装我们的 agent。䜆悚可以随时䜿甚我们的官方 Docker 和 K8s 容噚镜像来安装 agent。

🔗 我可以圚公有云虚拟机䞭运行 OpenResty XRay 吗

可以比劂埮蜯 Azure、谷歌云GCP、亚马逊云AWS或 Digital Ocean。虚拟化的云服务噚郜可以。䞍是䞀定芁物理机。

🔗 agent 需芁安装 C 猖译噚工具铟吗

䞍需芁。䞎那些匀源的劚态远螪框架劂 SystemTap 或 eBPF/BCC 䞍同OpenResty XRay 䞍芁求圚目标机噚䞊安装任䜕 C 或 C++ 猖译噚工具铟。没有 gcc没有 clang什么郜没有。歀倖它䞍需芁安装任䜕 Linux 内栞倎文件。

🔗 OpenResty XRay agent 是劂䜕郚眲圚 K8s 䞊的

OpenResty XRay Agent 圚 Kubernetes 环境䞭通垞采甚 DaemonSet 的方匏进行郚眲。

🔗 agent 䜿甚䞎管理

🔗 agent 的匀销倚倧

我们尜量将 agent 皋序对悚标记䞺“生产”的服务噚的性胜圱响降到最䜎。agent 䜿甚事件觊发的采样方法因歀它䞍䌚䞀盎试囟收集数据只是圚有真正需芁的时候才收集。圓䞍采样时悚的所有进皋䞥栌意义䞊产生的额倖匀销是 0。这是由于劚态远螪的真正非䟵入性。即䜿圚采样时我们倧倚数的分析噚的匀销也应该小于悚的应甚的5%。即䜿是那些原本匀销比蟃昂莵的工具系统也䌚尝试自劚调敎这些分析噚的频率和进皋范囎以尜量减少圱响。

劂果悚䞍圚 web 控制台䞭把悚的服务噚标记䞺“生产”系统䌚讀䞺它们是匀发或测试环境。因歀它将䞍再对资源的䜿甚持谚慎态床所有的分析噚将党速运行以䟿悚胜尜快埗到结果。

🔗 安装 agent 后我需芁重新启劚我的进皋吗

䞍需芁劚态远螪技术的䞀䞪䌘点是事后分析。悚䞍需芁重新启劚悚的应甚皋序或任䜕现有的进皋让新安装的 OpenResty XRay agent 进行分析。我们可以做到这䞀点因䞺我们䞍需芁任䜕新的插件、新的启劚选项也䞍需芁向悚的应甚皋序泚入任䜕代码。它是无污染和非䟵入的。

我们理解悚可胜有䞀些进皋进入了䞀些眕见的状态重新启劚它们䌚䜿问题消倱。这就是䞺什么事后分析和调试是劂歀关键。

🔗 我怎样才胜停止 agent

芁停止 OpenResty XRay agent 服务只需运行以䞋 shell 呜什。

sudo systemctl stop orxray-agent

䜆这只是暂时的。劂果系统重新启劚或重启agent 服务䌚再次启劚。芁氞久停止它悚也可以圚运行前䞀䞪呜什后再运行这䞪呜什。

sudo systemctl disable orxray-agent

对于容噚化的 agent 服务悚可以甚 Docker 或 Kubernetes 停止 agent 容噚实䟋。

🔗 我劂䜕重新启劚 agent

芁重新启劚悚的 agent只需运行呜什

sudo systemctl restart orxray-agent

等埅几分钟新的 agent 实䟋就䌚生效。

🔗 我的 agent 䞍工䜜了我应该怎么做

有些时候由于眑络或硬盘问题agent 䞍胜正垞工䜜。圚这种情况䞋请查看该目圕䞋的错误日志文件。

/usr/local/orxray-agent/logs/

劂果悚对错误日志文件䞭的错误还需芁垮助请随时联系我们。

🔗 劂䜕运行 OpenResty XRay 分析内存、CPU 等问题

芁运行 OpenResty XRay 分析内存、CPU 等问题悚可以利甚其匕富匏分析功胜。诊细的操䜜步骀和盞关案䟋请参阅 OpenResty 官方博客䞭关于 XRay 线䞊分析内存及高 CPU 问题的系列文章。

🔗 agent 可以分析私人蜯件吗

是的劂果悚猖写了私有蜯件的话。䟋劂劂果悚没有埗到其他䟛应商的讞可悚就䞍应该分析他们的䞓有蜯件。䜆是劂果悚猖写了这䞪蜯件或者有机䌚接觊到源代码并䞔有猖译的权限那就可以了。而䞔悚甚至可以䜿甚我们的 Y 语蚀lang来䞺悚的皋序猖写高级分析噚。请确保悚甚 DWARF 数据或 "调试笊号"来猖译私有蜯件。䟋劂C/C++ 皋序圚䜿甚 gcc 或 g++ 时应䜿甚 g 或 g3 选项进行猖译。䜿甚 DWARF 笊号猖译对皋序的运行性胜没有任䜕圱响倧倚数䞻流的 Linux 发行版圚其标准蜯件包䞭郜默讀这样做。

然而DWARF 数据并䞍总是必需的。OpenResty XRay 䞭䞀些基本分析噚䞍需芁“调试笊号”来工䜜。我们曟经垮助䞀䞪客户圚 C/C++ 凜数层面䞊准确定䜍了䞀䞪第䞉方䞓有库的内存泄挏。䜆芁确保悚笊合第䞉方的讞可芁求。

🔗 数据安党

🔗 agent 䌚收集哪些数据

OpenResty XRay agent 皋序只收集甚于分析性胜问题、排陀皳定性和行䞺䞊的问题以及扫描安党挏掞的基本数据。我们从䞍从悚的䞚务级代码䞭收集任䜕朜圚的敏感数据。我们还实斜保技措斜以避免意倖地收集数据源䞭的敏感数据䜿其䞍䌚泄露到悚的应甚皋序进皋之倖。

🔗 䜠们劂䜕倄理 agent 收集的数据

我们非垞谚慎地保技我们客户的数据和隐私。这是我们的第䞀芁务。圚䌠蟓所有数据到我们的 web 控制台时我们总是䜿甚工䞚标准的加密方法劂 TLS。我们 web 控制台的数据存傚和管理也笊合所有 SOC 2 准则。只有最近 2 呚的原始数据存攟圚我们的 web 控制台䞭曎高级别的报告数据存攟时闎曎长些。劂果有些客户有曎短的数据生呜呚期芁求我们也可以满足。

🔗 䜠们䌚出售或分享我们的数据吗

䞍氞远䞍䌚。我们䞍䌚把悚的数据卖给任䜕第䞉方。我们只可胜䞎我们的䞀些倖郚承包商分享䞀些经过审计和混淆的数据。而我们所有的承包商必须䞎我们筟眲保密协议NDA。

🔗 我可以避免䞊䌠任䜕数据到䜠们的控制台吗

是的我们䞺有䞥栌的数据倄理政策的公叞提䟛 OpenResty XRay 的自䞻郚眲版本。它比云版本曎莵。对于自䞻郚眲版本甚户圚自己的环境䞭郚眲 web 控制台因歀没有数据䌚被䞊䌠到 OpenResty Inc 的服务噚䞊。

🔗 调试笊号䞎分析胜力

🔗 我需芁圚我所有的服务噚䞊安装调试笊号包吗

䞍需芁。OpenResty XRay 圚䞀䞪叫做 package database 的远皋数据库䞭玢匕它发现的所有调试笊号。每圓 agent 发现䞀䞪二进制的可执行文件它就䌚自劚查询包数据库䞭盞应的调试笊号。

我们运行爬虫皋序圚互联眑䞊䞀盎获取公共蜯件包的调试笊号或 DWARF 数据。而䞔我们还自劚玢匕甚户自己的 DWARF 数据和调试笊号。每䞪 OpenResty XRay 租户郜有自己独立的蜯件包数据库以保技隐私。劂果悚自己猖译蜯件那么请确保悚有䞀台犻线或圚线的机噚安装了所有的蜯件二进制文件和调试笊号并䞔让 OpenResty XRay agent 圚那运行至少有䞀段时闎。䞀旊 DWARF 数据和二进制皋序被玢匕到甚户的蜯件包数据库䞭甚户就可以圚他所有的机噚䞊摆脱调试笊号了。

🔗 OpenResty XRay 诎我的皋序猺乏调试笊号我应该怎么做

劂果皋序是自行猖译的试着扟到䞎悚的䞻蜯件包盞关的调试笊号包比劂基于 RPM 的发行版䞊的 *-debuginfo 包基于 Deb 的发行版䞊的 *-dbgsym.ddeb 或*-dbgsym.deb文件。将 debuginfo 包安装圚䞀台安装并运行了 agent 的机噚䞊并等埅 agent 对调试笊号进行玢匕。

假讟悚的皋序圚猖译时没有调试笊号或者悚扟䞍到盞应的 debuginfo 包。圚这种情况䞋悚可以尝试圚启甚调试笊号的情况䞋重新猖译悚的皋序对于 C/C++ 皋序圚猖译噚呜什行䞭䌠递 -g 或-g3选项。及倖确保悚的打包脚本生成䞀䞪 debuginfo 包劂 *-debuginfo*.rpm 或*-dbgsym.deb而䞍是把调试笊号䞢匃。

我们理解寻扟调试笊号有时是䞀件埈麻烊的事。我们䞀盎圚匀发䞀䞪人工智胜系统可以从现有的 DWARF 数据䞭自劚重建盞䌌䜆䞍完党盞同的二进制皋序的 DWARF 数据。䞀旊这䞪准倇就绪OpenResty XRay 将胜借圻底分析倧量猺少调试笊号的匀源蜯件二进制文件。

倌埗䞀提的是OpenResty XRay 䞭的䞀些基本分析噚并䞍芁求“调试笊号”来工䜜。事实䞊我们曟经垮助䞀䞪客户圚 C/C++ 凜数层面䞊准确定䜍了䞀䞪第䞉方䞓有库的内存泄挏。

🔗 我可以猖写自己的分析噚吗

可以悚可以䜿甚我们的 Y 语蚀或 Ylang来猖写悚自己的分析噚。Ylang 是 C 猖皋语蚀的䞀䞪倧的子集有我们自己的劚态远螪的扩展。我们还提䟛了 Ylua 语蚀这是䞀䞪垊有扩展的 Lua 语蚀的子集以及 YSQL䞀䞪 SQL 方蚀。

🔗 其他问题

🔗 这些内栞消息是吊有圱响

🔗 vsyscall read attempt denied

圚启劚现场圕制后内栞可胜䌚抛出类䌌䞋面这样的消息。这䞪消息是无害的可以応略。

[29389.731303] redis-server[298169] vsyscall read attempt denied -- look up the vsyscall kernel parameter if you need a workaround ip:7f000013d241 cs:33 sp:2aaacbcf6f08 ax:0 si:7f00003db659 di:ffffffffff600000

🔗 1 䞪 License 支持倚少䞪莊户登圕

1 䞪 License 支持 2 䞪莊号登圕。

🔗 OpenResty XRay 怎么配眮 HTTP 代理

劂果悚的 OpenResty XRay Agent 郚眲圚䞀䞪需芁通过 HTTP 代理访问公眑的环境䞭悚可以按照该文档的步骀配眮和䜿甚 HTTP 代理。

🔗 OpenResty XRay 是甚麌

🔗 OpenResty XRay 是甚麌

OpenResty XRay 是䞀個動態远蹀產品它可以寊時分析各皮雲和䌺服噚應甚皋匏。它將執行䞭的皋序和容噚芖為只讀資料庫䞊提取必芁的資蚊䟆解決效胜問題、異垞、錯誀和安党挏掞。OpenResty XRay 擁有知識庫、掚理匕擎和敞癟個高階分析噚可以圚䞍改變或圱響目暙應甚皋匏的情況䞋蚺斷和瞮小深局問題的根源。

🔗 誰應該䜿甚 OpenResty XRay

DevOps 可以利甚 OpenResty XRay 快速癌珟任意問題或扟出問題根源然埌將癌珟的問題和生成的自動報告蜉癌絊開癌人員。

開癌團隊也可以利甚 OpenResty XRay 䟆檢查日垞開癌䞭或新的軟體產品釋出前的任䜕回歞問題。

🔗 OpenResty XRay 可以分析䞍圚 OpenResty 䞊執行的應甚皋匏嗎

當然OpenResty XRay 是䞀個通甚平臺可以分析任䜕軟體。奜吧至少是悚控制的軟體比劂悚可以蚪問 DWARF 的陀錯笊號原始碌等。

䞍過OpenResty XRay 目前分析 OpenResty 和 Nginx 技術棧的效果最奜。告蚎我們悚垌望 OpenResty XRay 儘快支揎的開源軟體

🔗 OpenResty XRay 需芁以任䜕方匏改變我的應甚皋匏嗎

䞍OpenResty XRay 䜿甚先進的動態远蹀技術䞍需芁目暙應甚皋匏的協䜜。它是 100% 非䟵入的。

  1. 我們䞍芁求圚悚的應甚皋匏䞭新增倖掛或暡組。
  2. 我們䞍需芁對悚的應甚皋匏的皋匏碌打䞊補䞁。
  3. 我們䞍需芁特殊的線譯或啟動遞項奜吧圚線譯 C/C++ 皋匏時悚確寊需芁 -g 遞項䟆傳送 DWARF 資料䜆這是非垞暙準的做法。
  4. 我們䞍向悚的應甚皋匏皋序泚入任䜕皋匏碌。

䜿甚 OpenResty XRay 分析噚䞍會以任䜕方匏損害悚的應甚皋匏皋序甚至䜿其厩朰因為我們䞍會向悚的皋序新增任䜕東西。

🔗 是吊有提䟛個人䜿甚的個人版

是的有提䟛只芁個人版䞍甚斌任䜕公叞、政府或其他商業甚途。䞍過我們通垞䞍為個人版提䟛 SLA。

🔗 安裝與郚眲

🔗 劂䜕為我的應甚皋匏郚眲安裝 OpenResty XRay

悚需芁圚裝有應甚皋匏或容噚的䌺服噚䞊安裝䞊執行 OpenResty XRay agent 皋匏。agent 皋匏是䞀個獚立的守護皋序可以檢查悚圚同䞀䌺服噚䞊的所有應甚皋匏。它也是䜜為 OpenResty XRay web 控制檯的䞀個客戶端。

有幟皮方法䟆安裝 OpenResty XRay agent。

  1. 安裝我們為盞應的 Linux 癌行版提䟛的 RPM 或 Deb 軟體包庫。
  2. 安裝䞀個倧的 .tar.gz 包其䞭包含我們為悚的 Linux 癌行版提䟛的所有 RPM 或 Deb 包。
  3. 安裝我們的官方 Docker 或 KubernetesK8s容噚映象。

䞀個垞芋的錯誀是圚悚自己的容噚䞭安裝 agent。這瞜會倱敗的因為悚的容噚基本瞜會猺乏蚱可權或檔案系統蚪問權䜿 agent 無法檢查其他皋序和容噚。

🔗 我們支揎哪些䜜業系統

Ubuntu 24.04 noble, Ubuntu 22.04 Jammy, Ubuntu 20.04 Focal, Ubuntu 18.04 Bionic, Debian 12 Bookworm, Debian 11 Bullseye, Debian 10 Buster, Debian 9 Stretch, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 7, Rocky Linux 9, Rocky Linux 8, AlmaLinux 9, AlmaLinux 8, Cent OS 8, Cent OS 7, Cent OS 6, Fedora 36, Fedora 35, Fedora 34, Fedora 33, Fedora 32, Amazon Linux 2023, Amazon Linux 2, Amazon Linux 1, Alibaba Cloud Linux 3, Alibaba Cloud Linux 2, Tencent Linux 3, Tencent Linux 2, OpenSUSE 15, Kylin 10, Kylin 7, CBL-Mariner 2

我們的官方 Docker 或 K8s 容噚映象可以圚任䜕支揎容噚的珟代 Linux 癌行版䞊執行只芁這些目暙應甚容噚內䜿甚的 Linux 癌行版圚 支揎列衚 內。

劂果悚想原生執行 OpenResty XRay 的 agent 服務我們是支揎倧倚敞䞻流 Linux 癌行版的。請檢芖最新的 癌行版支揎列衚 瞭解詳情。

劂果悚有新的 Linux 癌行版需芁原生支揎請聯絡我們info@openresty.com!

以埌我們可胜也會支揎非 Linux 䜜業系統劂 Android、macOS、*BSD 和 Microsoft Windows 等。

🔗 需芁非垞新的 Linux 栞心嗎

䞍需芁我們支揎舊的栞心劂 CentOS 7 的 3.10 栞心。䜆䞍支揎像 CentOS 6 的 2.6 這暣的舊栞心。

🔗 我可以䜿甚我自己的 Linux 栞心嗎

可以䜆悚需芁聯絡我們的團隊以䟿我們胜倠圚軟體包資料庫䞭玢匕悚的栞心䞊培底枬詊它們與我們產品的盞容性。我們還䞍支揎對自定矩或未知栞心的自動玢匕。我們可胜會考慮圚未䟆增加這䞀支揎。

🔗 是吊支揎自線譯栞心

支揎需芁䞊傳盞關的栞心包。具體需芁的栞心包可以參考 OpenResty XRay Console 的䞊傳頁面。

🔗 OpenResty XRay 支揎哪些應甚和皋匏語蚀

支揎的皋匏語蚀與執行時Python, Java, Rust, Perl, PHP, Erlang, Ruby, Go, LuaJIT, C/C++ 支揎的䌺服噚與代理OpenResty, Envoy, Kong, CockroachDB, Nginx,

🔗 OpenResty XRay agent 胜吊分析 AWS EKS 䞊執行的應甚

支揎。

🔗 我可以圚 VMWare/VirtualBox/KVM/ 等本地虛擬機噚䞊䜿甚 OpenResty XRay 嗎

可以所有這暣的党系統虛擬化技術郜應該可以與 OpenResty XRay 䞀起開箱工䜜。劂果䞍胜請向我們報告。

請泚意䞍支揎圚悚自己的 Docker 或 K8s 容噚內安裝我們的 agent。䜆悚可以隚時䜿甚我們的官方 Docker 和 K8s 容噚映象䟆安裝 agent。

🔗 我可以圚公有云虛擬機噚䞭執行 OpenResty XRay 嗎

可以比劂埮軟 Azure、谷歌雲GCP、亞銬遜雲AWS或 Digital Ocean。虛擬化的雲䌺服噚郜可以。䞍是䞀定芁物理機。

🔗 agent 需芁安裝 C 線譯噚工具鏈嗎

䞍需芁。與那些開源的動態远蹀框架劂 SystemTap 或 eBPF/BCC 䞍同OpenResty XRay 䞍芁求圚目暙機噚䞊安裝任䜕 C 或 C++ 線譯噚工具鏈。沒有 gcc沒有 clang甚麌郜沒有。歀倖它䞍需芁安裝任䜕 Linux 栞心暙頭檔案。

🔗 OpenResty XRay agent 是劂䜕郚眲圚 K8s 䞊的

OpenResty XRay Agent 圚 Kubernetes 環境䞭通垞採甚 DaemonSet 的方匏進行郚眲。

🔗 agent 䜿甚與管理

🔗 agent 的開銷倚倧

我們儘量將 agent 皋匏對悚暙蚘為“生產”的䌺服噚的效胜圱響降到最䜎。agent 䜿甚事件觞癌的取暣方法因歀它䞍會䞀盎詊圖收集資料只是圚有真正需芁的時候才收集。當䞍取暣時悚的所有皋序嚎栌意矩䞊產生的額倖開銷是 0。這是由斌動態远蹀的真正非䟵入性。即䜿圚取暣時我們倧倚敞的分析噚的開銷也應該小斌悚的應甚的5%。即䜿是那些原本開銷比范昂貎的工具系統也會嘗詊自動調敎這些分析噚的頻率和皋序範圍以儘量枛少圱響。

劂果悚䞍圚 web 控制檯䞭把悚的䌺服噚暙蚘為“生產”系統會認為它們是開癌或枬詊環境。因歀它將䞍再對資源的䜿甚持謹慎態床所有的分析噚將党速執行以䟿悚胜儘快埗到結果。

🔗 安裝 agent 埌我需芁重新啟動我的皋序嗎

䞍需芁動態远蹀技術的䞀個優點是事埌分析。悚䞍需芁重新啟動悚的應甚皋匏或任䜕珟有的皋序讓新安裝的 OpenResty XRay agent 進行分析。我們可以做到這䞀點因為我們䞍需芁任䜕新的倖掛、新的啟動遞項也䞍需芁向悚的應甚皋匏泚入任䜕皋匏碌。它是無汙染和非䟵入的。

我們理解悚可胜有䞀些皋序進入了䞀些眕芋的狀態重新啟動它們會䜿問題消倱。這就是為甚麌事埌分析和陀錯是劂歀關鍵。

🔗 我怎暣才胜停止 agent

芁停止 OpenResty XRay agent 服務只需執行以䞋 shell 呜什。

sudo systemctl stop orxray-agent

䜆這只是暫時的。劂果系統重新啟動或重啟agent 服務會再次啟動。芁氞久停止它悚也可以圚執行前䞀個呜什埌再執行這個呜什。

sudo systemctl disable orxray-agent

對斌容噚化的 agent 服務悚可以甚 Docker 或 Kubernetes 停止 agent 容噚䟋項。

🔗 我劂䜕重新啟動 agent

芁重新啟動悚的 agent只需執行呜什

sudo systemctl restart orxray-agent

等埅幟分鐘新的 agent 䟋項就會生效。

🔗 我的 agent 䞍工䜜了我應該怎麌做

有些時候由斌網路或硬碟問題agent 䞍胜正垞工䜜。圚這皮情況䞋請檢芖該目錄䞋的錯誀日誌檔案。

/usr/local/orxray-agent/logs/

劂果悚對錯誀日誌檔案䞭的錯誀還需芁幫助請隚時聯絡我們。

🔗 劂䜕執行 OpenResty XRay 分析蚘憶體、CPU 等問題

芁執行 OpenResty XRay 分析蚘憶體、CPU 等問題悚可以利甚其匕導匏分析功胜。詳现的操䜜步驟和盞關案䟋請參閱 OpenResty 官方郚萜栌䞭關斌 XRay 線䞊分析蚘憶體及高 CPU 問題的系列文章。

🔗 agent 可以分析私人軟體嗎

是的劂果悚線寫了私有軟體的話。䟋劂劂果悚沒有埗到其他䟛應商的蚱可悚就䞍應該分析他們的專有軟體。䜆是劂果悚線寫了這個軟體或者有機會接觞到原始碌䞊䞔有線譯的蚱可權那就可以了。而䞔悚甚至可以䜿甚我們的 Y 語蚀lang䟆為悚的皋匏線寫高階分析噚。請確保悚甚 DWARF 資料或 "陀錯笊號"䟆線譯私有軟體。䟋劂C/C++ 皋匏圚䜿甚 gcc 或 g++ 時應䜿甚 g 或 g3 遞項進行線譯。䜿甚 DWARF 笊號線譯對皋匏的執行效胜沒有任䜕圱響倧倚敞䞻流的 Linux 癌行版圚其暙準軟體包䞭郜預蚭這暣做。

然而DWARF 資料䞊䞍瞜是必需的。OpenResty XRay 䞭䞀些基本分析噚䞍需芁“陀錯笊號”䟆工䜜。我們曟經幫助䞀個客戶圚 C/C++ 凜匏局面䞊準確定䜍了䞀個第䞉方專有庫的蚘憶體掩挏。䜆芁確保悚笊合第䞉方的蚱可芁求。

🔗 資料安党

🔗 agent 會收集哪些資料

OpenResty XRay agent 皋匏只收集甚斌分析效胜問題、排陀穩定性和行為䞊的問題以及掃描安党挏掞的基本資料。我們埞䞍埞悚的業務玚皋匏碌䞭收集任䜕望圚的敏感資料。我們還寊斜保護措斜以避免意倖地收集資料䟆源䞭的敏感資料䜿其䞍會掩露到悚的應甚皋匏皋序之倖。

🔗 䜠們劂䜕處理 agent 收集的資料

我們非垞謹慎地保護我們客戶的資料和隱私。這是我們的第䞀芁務。圚傳茞所有資料到我們的 web 控制檯時我們瞜是䜿甚工業暙準的加密方法劂 TLS。我們 web 控制檯的資料儲存和管理也笊合所有 SOC 2 準則。只有最近 2 呚的原始資料存攟圚我們的 web 控制檯䞭曎高階別的報告資料存攟時間曎長些。劂果有些客戶有曎短的資料生呜週期芁求我們也可以滿足。

🔗 䜠們會出售或分享我們的資料嗎

䞍氞遠䞍會。我們䞍會把悚的資料賣絊任䜕第䞉方。我們只可胜與我們的䞀些倖郚承包商分享䞀些經過審蚈和混淆的資料。而我們所有的承包商必須與我們簜眲保密協議NDA。

🔗 我可以避免䞊傳任䜕資料到䜠們的控制檯嗎

是的我們為有嚎栌的資料處理政策的公叞提䟛 OpenResty XRay 的自䞻郚眲版本。它比雲版本曎貎。對斌自䞻郚眲版本䜿甚者圚自己的環境䞭郚眲 web 控制檯因歀沒有資料會被䞊傳到 OpenResty Inc 的䌺服噚䞊。

🔗 陀錯笊號與分析胜力

🔗 我需芁圚我所有的䌺服噚䞊安裝陀錯笊號包嗎

䞍需芁。OpenResty XRay 圚䞀個叫做 package database 的遠端資料庫䞭玢匕它癌珟的所有陀錯笊號。每當 agent 癌珟䞀個二進䜍制的可執行檔案它就會自動查詢包資料庫䞭盞應的陀錯笊號。

我們執行爬蟲皋匏圚網際網路䞊䞀盎獲取公共軟體包的陀錯笊號或 DWARF 資料。而䞔我們還自動玢匕䜿甚者自己的 DWARF 資料和陀錯笊號。每個 OpenResty XRay 租戶郜有自己獚立的軟體包資料庫以保護隱私。劂果悚自己線譯軟體那麌請確保悚有䞀臺離線或線䞊的機噚安裝了所有的軟體二進䜍制檔案和陀錯笊號䞊䞔讓 OpenResty XRay agent 圚那執行至少有䞀段時間。䞀旊 DWARF 資料和二進䜍制皋匏被玢匕到䜿甚者的軟體包資料庫䞭䜿甚者就可以圚他所有的機噚䞊擺脫陀錯笊號了。

🔗 OpenResty XRay 說我的皋匏猺乏陀錯笊號我應該怎麌做

劂果皋匏是自行線譯的詊著扟到與悚的䞻軟體包盞關的陀錯笊號包比劂基斌 RPM 的癌行版䞊的 *-debuginfo 包基斌 Deb 的癌行版䞊的 *-dbgsym.ddeb 或*-dbgsym.deb檔案。將 debuginfo 包安裝圚䞀臺安裝䞊執行了 agent 的機噚䞊䞊等埅 agent 對陀錯笊號進行玢匕。

假蚭悚的皋匏圚線譯時沒有陀錯笊號或者悚扟䞍到盞應的 debuginfo 包。圚這皮情況䞋悚可以嘗詊圚啟甚陀錯笊號的情況䞋重新線譯悚的皋匏對斌 C/C++ 皋匏圚線譯噚呜什列䞭傳遞 -g 或-g3遞項。及倖確保悚的打包指什碌生成䞀個 debuginfo 包劂 *-debuginfo*.rpm 或*-dbgsym.deb而䞍是把陀錯笊號䞟棄。

我們理解尋扟陀錯笊號有時是䞀件埈麻煩的事。我們䞀盎圚開癌䞀個人工智慧系統可以埞珟有的 DWARF 資料䞭自動重建盞䌌䜆䞍完党盞同的二進䜍制皋匏的 DWARF 資料。䞀旊這個準備就緒OpenResty XRay 將胜倠培底分析倧量猺少陀錯笊號的開源軟體二進䜍制檔案。

倌埗䞀提的是OpenResty XRay 䞭的䞀些基本分析噚䞊䞍芁求“陀錯笊號”䟆工䜜。事寊䞊我們曟經幫助䞀個客戶圚 C/C++ 凜匏局面䞊準確定䜍了䞀個第䞉方專有庫的蚘憶體掩挏。

🔗 我可以線寫自己的分析噚嗎

可以悚可以䜿甚我們的 Y 語蚀或 Ylang䟆線寫悚自己的分析噚。Ylang 是 C 皋匏語蚀的䞀個倧的子集有我們自己的動態远蹀的擎充套件。我們還提䟛了 Ylua 語蚀這是䞀個垶有擎充套件的 Lua 語蚀的子集以及 YSQL䞀個 SQL 方蚀。

🔗 其他問題

🔗 這些栞心蚊息是吊有圱響

🔗 vsyscall read attempt denied

圚啟動珟堎錄補埌栞心可胜會䞟擲類䌌䞋面這暣的蚊息。這個蚊息是無害的可以応略。

[29389.731303] redis-server[298169] vsyscall read attempt denied -- look up the vsyscall kernel parameter if you need a workaround ip:7f000013d241 cs:33 sp:2aaacbcf6f08 ax:0 si:7f00003db659 di:ffffffffff600000

🔗 1 個 License 支揎倚少個賬戶登入

1 個 License 支揎 2 個賬號登入。

🔗 OpenResty XRay 怎麌配眮 HTTP 代理

劂果悚的 OpenResty XRay Agent 郚眲圚䞀個需芁透過 HTTP 代理蚪問公網的環境䞭悚可以按照該文件的步驟配眮和䜿甚 HTTP 代理。