<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Articles on AsherSu's Blog</title><link>https://ashersu.cn/en/posts/</link><description>Recent content in Articles on AsherSu's Blog</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Tue, 24 Nov 2026 00:10:00 +0800</lastBuildDate><atom:link href="https://ashersu.cn/en/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>OpenNMS Distributed Deployment: Source Build, Remote Debugging, and Minion Configuration</title><link>https://ashersu.cn/en/posts/opennms-distributed-deployment/</link><pubDate>Tue, 24 Nov 2026 00:10:00 +0800</pubDate><guid>https://ashersu.cn/en/posts/opennms-distributed-deployment/</guid><description>&lt;p&gt;This article records the main steps and failure modes encountered while building OpenNMS from source and deploying a Core and Minion topology.&lt;/p&gt;&#10;&lt;h2 id="prerequisites"&gt;&lt;a href="#prerequisites" class="header-anchor"&gt;&lt;/a&gt;Prerequisites&#13;&#10;&lt;/h2&gt;&lt;ol&gt;&#10;&lt;li&gt;Prepare a machine with at least &lt;code&gt;8 GB&lt;/code&gt; of memory.&lt;/li&gt;&#10;&lt;li&gt;Install Java 17.&lt;/li&gt;&#10;&lt;li&gt;Ensure that Maven Central and the required dependency repositories are reachable.&lt;/li&gt;&#10;&lt;li&gt;Use a PostgreSQL version supported by the target OpenNMS release. For the environment described here, that means a version earlier than PostgreSQL 17.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="build-opennms-from-source"&gt;&lt;a href="#build-opennms-from-source" class="header-anchor"&gt;&lt;/a&gt;Build OpenNMS from source&#13;&#10;&lt;/h2&gt;&lt;p&gt;Clone the &lt;a class="link" href="https://github.com/OpenNMS/opennms" target="_blank" rel="noopener"&#13;&#10; &gt;OpenNMS repository&lt;/a&gt;, then run the project scripts:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;span class="lnt"&gt;3&#10;&lt;/span&gt;&lt;span class="lnt"&gt;4&#10;&lt;/span&gt;&lt;span class="lnt"&gt;5&#10;&lt;/span&gt;&lt;span class="lnt"&gt;6&#10;&lt;/span&gt;&lt;span class="lnt"&gt;7&#10;&lt;/span&gt;&lt;span class="lnt"&gt;8&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;ulimit&lt;/span&gt; -n &lt;span class="m"&gt;65535&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install bzip2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./clean.pl&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./compile.pl -DskipTests&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./assemble.pl -p dir&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./target/opennms-33.1.4/bin/runjava -s&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./target/opennms-33.1.4/bin/install -dis&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./target/opennms-33.1.4/bin/opennms -vt start&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;When tests fail during assembly, use:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./assemble.pl -p dir -DskipTests&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;Keep a custom Maven repository outside the OpenNMS source tree. The assembly process packages source directories, so a repository placed inside the checkout can make the generated archive unexpectedly large.&lt;/p&gt;&#10;&lt;h2 id="user-and-permission-failures"&gt;&lt;a href="#user-and-permission-failures" class="header-anchor"&gt;&lt;/a&gt;User and permission failures&#13;&#10;&lt;/h2&gt;&lt;p&gt;If startup scripts report that the configured user does not exist or lacks permissions, review the &lt;code&gt;RUNAS&lt;/code&gt; value in the &lt;code&gt;runjava&lt;/code&gt;, &lt;code&gt;install&lt;/code&gt;, and &lt;code&gt;opennms&lt;/code&gt; scripts. For a controlled test environment, it can be set explicitly:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;RUNAS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;root&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;Use a dedicated service account and minimal permissions for a production deployment.&lt;/p&gt;&#10;&lt;h2 id="postgresql-authentication"&gt;&lt;a href="#postgresql-authentication" class="header-anchor"&gt;&lt;/a&gt;PostgreSQL authentication&#13;&#10;&lt;/h2&gt;&lt;p&gt;A common installation failure is:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The server requested SCRAM-based authentication,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;but the password is an empty string.&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;This means the installer reached PostgreSQL but did not receive a valid password. Verify the OpenNMS datasource configuration, the database role password, and the matching &lt;code&gt;pg_hba.conf&lt;/code&gt; rule. Test the same credentials with &lt;code&gt;psql&lt;/code&gt; before rerunning the OpenNMS installer.&lt;/p&gt;&#10;&lt;h2 id="remote-debugging"&gt;&lt;a href="#remote-debugging" class="header-anchor"&gt;&lt;/a&gt;Remote debugging&#13;&#10;&lt;/h2&gt;&lt;p&gt;Enable the JVM debug agent on port &lt;code&gt;8001&lt;/code&gt;, then create a Remote JVM Debug configuration in IntelliJ IDEA. Bind the debug listener to a trusted interface only, and restrict the port with a firewall or SSH tunnel because the Java debug protocol must not be exposed publicly.&lt;/p&gt;&#10;&lt;p&gt;The OpenNMS web interface is available on port &lt;code&gt;8980&lt;/code&gt; by default.&lt;/p&gt;&#10;&lt;h2 id="core-and-minion-deployment"&gt;&lt;a href="#core-and-minion-deployment" class="header-anchor"&gt;&lt;/a&gt;Core and Minion deployment&#13;&#10;&lt;/h2&gt;&lt;p&gt;The distributed topology consists of:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;OpenNMS Core for event processing, persistence, alarms, and the web console.&lt;/li&gt;&#10;&lt;li&gt;Minion close to monitored networks for collection and remote execution.&lt;/li&gt;&#10;&lt;li&gt;gRPC for communication between Core and Minion.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The critical checks are:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Core exposes the configured gRPC endpoint.&lt;/li&gt;&#10;&lt;li&gt;Minion can resolve and reach the Core address.&lt;/li&gt;&#10;&lt;li&gt;Certificates, credentials, and location identifiers match.&lt;/li&gt;&#10;&lt;li&gt;The Minion appears online in the OpenNMS console.&lt;/li&gt;&#10;&lt;li&gt;A test collection or scan can be executed from the expected location.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Treat network reachability, authentication, and location configuration as separate concerns. Verifying them independently makes distributed deployment failures much easier to diagnose.&lt;/p&gt;&#10;</description></item><item><title>Enterprise Integration Patterns: Channels, Routing, and Transformation</title><link>https://ashersu.cn/en/posts/enterprise-integration-patterns/</link><pubDate>Tue, 24 Nov 2026 00:00:00 +0800</pubDate><guid>https://ashersu.cn/en/posts/enterprise-integration-patterns/</guid><description>&lt;p&gt;Enterprise Integration Patterns provide a shared vocabulary for connecting systems without turning every integration into a one-off design. The value of the patterns is not the diagram itself, but the explicit ownership, delivery semantics, and failure behavior behind it.&lt;/p&gt;&#10;&lt;h2 id="messages-and-channels"&gt;&lt;a href="#messages-and-channels" class="header-anchor"&gt;&lt;/a&gt;Messages and channels&#13;&#10;&lt;/h2&gt;&lt;p&gt;Applications in a distributed system cannot share process memory. They exchange messages that normally contain:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A header with metadata such as an identifier, timestamp, correlation ID, and routing information.&lt;/li&gt;&#10;&lt;li&gt;A body containing the business payload.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Channels isolate business flows. Commands, domain events, queries, and bulk data transfers should not be mixed into one undifferentiated stream because they have different consumers, priorities, and retry expectations.&lt;/p&gt;&#10;&lt;h2 id="pipes-and-filters"&gt;&lt;a href="#pipes-and-filters" class="header-anchor"&gt;&lt;/a&gt;Pipes and filters&#13;&#10;&lt;/h2&gt;&lt;p&gt;The Pipes and Filters pattern decomposes a complex flow into independent processing stages.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A filter validates, enriches, decrypts, or transforms a message.&lt;/li&gt;&#10;&lt;li&gt;A pipe transfers a message between filters.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Filters should be stateless whenever practical. Stateless stages are easier to scale horizontally, retry, and test. If a stage requires state, the consistency boundary and replay behavior must be explicit.&lt;/p&gt;&#10;&lt;h2 id="message-routers"&gt;&lt;a href="#message-routers" class="header-anchor"&gt;&lt;/a&gt;Message routers&#13;&#10;&lt;/h2&gt;&lt;p&gt;A router decides where a message goes without changing its business content. Common routing strategies include:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Static routing for stable, predefined destinations.&lt;/li&gt;&#10;&lt;li&gt;Content-based routing using fields in the header or payload.&lt;/li&gt;&#10;&lt;li&gt;Context-based routing using service health, tenant, region, or runtime policy.&lt;/li&gt;&#10;&lt;li&gt;Dynamic routing where rules are maintained by a control plane.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Routing rules are business rules. They need versioning, tests, monitoring, and a fallback path for messages that match no destination.&lt;/p&gt;&#10;&lt;h2 id="message-translation"&gt;&lt;a href="#message-translation" class="header-anchor"&gt;&lt;/a&gt;Message translation&#13;&#10;&lt;/h2&gt;&lt;p&gt;Systems often disagree at several levels:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Level&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Example&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Transport&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;HTTP to JMS&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Representation&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;XML to JSON&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Data type&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;String to integer&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Business structure&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;External order model to internal payment model&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;Keep translation at integration boundaries. Allowing an external model to spread through the domain layer couples core business logic to another system&amp;rsquo;s schema.&lt;/p&gt;&#10;&lt;h2 id="splitter-and-aggregator"&gt;&lt;a href="#splitter-and-aggregator" class="header-anchor"&gt;&lt;/a&gt;Splitter and aggregator&#13;&#10;&lt;/h2&gt;&lt;p&gt;A splitter turns one composite message into multiple smaller messages. An aggregator combines related messages into one result.&lt;/p&gt;&#10;&lt;p&gt;Both patterns require a correlation identifier. Aggregation also needs a completion rule:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Expected message count reached.&lt;/li&gt;&#10;&lt;li&gt;A final marker received.&lt;/li&gt;&#10;&lt;li&gt;A time window expired.&lt;/li&gt;&#10;&lt;li&gt;A business-specific condition became true.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Timeout behavior matters as much as the successful path. The system must decide whether to return a partial result, retry missing parts, send the message to manual handling, or fail the entire operation.&lt;/p&gt;&#10;&lt;h2 id="reliability-and-idempotency"&gt;&lt;a href="#reliability-and-idempotency" class="header-anchor"&gt;&lt;/a&gt;Reliability and idempotency&#13;&#10;&lt;/h2&gt;&lt;p&gt;Most message systems provide at-least-once delivery in real deployments. Consumers must therefore tolerate duplicates.&lt;/p&gt;&#10;&lt;p&gt;Useful controls include:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A business idempotency key.&lt;/li&gt;&#10;&lt;li&gt;A consumed-message table or deduplication cache.&lt;/li&gt;&#10;&lt;li&gt;Transactional outbox for atomically persisting business state and an event.&lt;/li&gt;&#10;&lt;li&gt;Retry policies with backoff and a maximum attempt count.&lt;/li&gt;&#10;&lt;li&gt;Dead-letter handling with enough context for replay.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Exactly-once business outcomes usually come from idempotent application design, not from assuming the broker will deliver every message exactly once.&lt;/p&gt;&#10;&lt;h2 id="observability"&gt;&lt;a href="#observability" class="header-anchor"&gt;&lt;/a&gt;Observability&#13;&#10;&lt;/h2&gt;&lt;p&gt;An integration flow should expose:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Message and correlation IDs.&lt;/li&gt;&#10;&lt;li&gt;Current stage and destination.&lt;/li&gt;&#10;&lt;li&gt;Processing duration per stage.&lt;/li&gt;&#10;&lt;li&gt;Retry count and final failure reason.&lt;/li&gt;&#10;&lt;li&gt;Queue depth, consumer lag, and dead-letter volume.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Structured logs and distributed tracing must avoid recording passwords, tokens, personal data, or full payment payloads.&lt;/p&gt;&#10;&lt;p&gt;The practical goal is a flow where routing, transformation, retries, and ownership are visible. A pattern is useful only when operators can understand what happened to a message after production traffic becomes imperfect.&lt;/p&gt;&#10;</description></item><item><title>A Practical Arthas Workflow for Troubleshooting Java in Production</title><link>https://ashersu.cn/en/posts/arthas-online-troubleshooting/</link><pubDate>Mon, 12 Oct 2026 20:09:00 +0800</pubDate><guid>https://ashersu.cn/en/posts/arthas-online-troubleshooting/</guid><description>&lt;p&gt;When an API suddenly becomes slow, restarting the service should not be the first response. A restart may temporarily restore service, but it also destroys the most valuable runtime evidence. Arthas can inspect a running JVM without changing application code.&lt;/p&gt;&#10;&lt;h2 id="confirm-the-scope"&gt;&lt;a href="#confirm-the-scope" class="header-anchor"&gt;&lt;/a&gt;Confirm the scope&#13;&#10;&lt;/h2&gt;&lt;p&gt;Before running commands, record:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The affected APIs or jobs.&lt;/li&gt;&#10;&lt;li&gt;When the problem started and whether traffic changed.&lt;/li&gt;&#10;&lt;li&gt;CPU, memory, GC, thread pool, and database connection pool metrics.&lt;/li&gt;&#10;&lt;li&gt;Recent releases, configuration changes, and downstream failures.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Every command should test a hypothesis. Avoid enabling expensive observation on high-frequency production methods without limits.&lt;/p&gt;&#10;&lt;h2 id="inspect-the-jvm-and-threads"&gt;&lt;a href="#inspect-the-jvm-and-threads" class="header-anchor"&gt;&lt;/a&gt;Inspect the JVM and threads&#13;&#10;&lt;/h2&gt;&lt;p&gt;Use &lt;code&gt;dashboard&lt;/code&gt; for a high-level view of threads, heap usage, and GC. Then inspect high-CPU or blocked threads:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;span class="lnt"&gt;3&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dashboard&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;thread -n 10&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;thread --state BLOCKED&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;If many threads wait for the same lock, inspect their stacks. If they are waiting on remote calls, move the investigation toward downstream latency, timeouts, and connection pools.&lt;/p&gt;&#10;&lt;h2 id="locate-slow-methods"&gt;&lt;a href="#locate-slow-methods" class="header-anchor"&gt;&lt;/a&gt;Locate slow methods&#13;&#10;&lt;/h2&gt;&lt;p&gt;&lt;code&gt;trace&lt;/code&gt; shows the time spent at each node in a call chain:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;trace com.example.OrderService queryOrder &amp;#39;#cost &amp;gt; 100&amp;#39;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;Filtering by execution time reduces noise and runtime overhead. After identifying a suspicious method, use &lt;code&gt;watch&lt;/code&gt; to inspect only the necessary arguments, return values, or exceptions.&lt;/p&gt;&#10;&lt;p&gt;Always limit the number of observations and output depth. Avoid printing large objects or observing extremely hot methods.&lt;/p&gt;&#10;&lt;h2 id="verify-the-loaded-code"&gt;&lt;a href="#verify-the-loaded-code" class="header-anchor"&gt;&lt;/a&gt;Verify the loaded code&#13;&#10;&lt;/h2&gt;&lt;p&gt;When a release appears not to have taken effect, use &lt;code&gt;sc&lt;/code&gt;, &lt;code&gt;sm&lt;/code&gt;, and &lt;code&gt;jad&lt;/code&gt; to inspect loaded classes, methods, and decompiled bytecode. The &lt;code&gt;classloader&lt;/code&gt; command helps identify which class loader loaded a class.&lt;/p&gt;&#10;&lt;h2 id="build-an-evidence-chain"&gt;&lt;a href="#build-an-evidence-chain" class="header-anchor"&gt;&lt;/a&gt;Build an evidence chain&#13;&#10;&lt;/h2&gt;&lt;p&gt;A useful incident conclusion connects monitoring symptoms, thread or trace evidence, the root cause, immediate mitigation, and the permanent fix. For example, an apparently slow Java method may ultimately be waiting for an exhausted database connection pool.&lt;/p&gt;&#10;&lt;p&gt;Arthas shortens the distance between a symptom and runtime evidence. Use the smallest observation scope possible and record the commands, timestamps, and conclusions for the incident review.&lt;/p&gt;&#10;</description></item><item><title>How to Identify the Real Business Problem Behind a Requirement</title><link>https://ashersu.cn/en/posts/find-real-problem-from-requirements/</link><pubDate>Mon, 13 Jul 2026 19:44:00 +0800</pubDate><guid>https://ashersu.cn/en/posts/find-real-problem-from-requirements/</guid><description>&lt;p&gt;Customer requests are often phrased as solutions: &amp;ldquo;add a button,&amp;rdquo; &amp;ldquo;provide another route type,&amp;rdquo; or &amp;ldquo;make the task faster.&amp;rdquo; Implementing the sentence literally can deliver a feature without solving the underlying problem.&lt;/p&gt;&#10;&lt;h2 id="start-with-the-users-goal"&gt;&lt;a href="#start-with-the-users-goal" class="header-anchor"&gt;&lt;/a&gt;Start with the user&amp;rsquo;s goal&#13;&#10;&lt;/h2&gt;&lt;p&gt;Rewrite the request in this form:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;span class="lnt"&gt;3&#10;&lt;/span&gt;&lt;span class="lnt"&gt;4&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;When a specific user is in a specific situation,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;what task are they trying to complete,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;what currently prevents them from completing it,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;and what observable result defines success?&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;For example, a request for manual waypoint insertion may actually come from inaccurate route altitude over uneven terrain. The more direct solution could be denser DEM sampling and a better simplification algorithm rather than asking users to edit every point.&lt;/p&gt;&#10;&lt;h2 id="separate-the-requirement-solution-and-constraints"&gt;&lt;a href="#separate-the-requirement-solution-and-constraints" class="header-anchor"&gt;&lt;/a&gt;Separate the requirement, solution, and constraints&#13;&#10;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;Requirement: the business problem that must be solved.&lt;/li&gt;&#10;&lt;li&gt;Solution: one proposed implementation.&lt;/li&gt;&#10;&lt;li&gt;Constraints: protocol, device, time, cost, security, and compatibility limits.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;When these are mixed together, a temporary implementation idea can be mistaken for an immutable requirement.&lt;/p&gt;&#10;&lt;h2 id="test-the-understanding-with-failure-cases"&gt;&lt;a href="#test-the-understanding-with-failure-cases" class="header-anchor"&gt;&lt;/a&gt;Test the understanding with failure cases&#13;&#10;&lt;/h2&gt;&lt;p&gt;Happy-path discussion creates false agreement. Ask:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;What happens when input is empty, duplicated, or outside the allowed range?&lt;/li&gt;&#10;&lt;li&gt;How does a partially completed task recover?&lt;/li&gt;&#10;&lt;li&gt;Can concurrent users create a conflict?&lt;/li&gt;&#10;&lt;li&gt;May an external timeout be retried?&lt;/li&gt;&#10;&lt;li&gt;Which actions require an audit record?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Failure scenarios expose business rules more effectively than a screen mockup alone.&lt;/p&gt;&#10;&lt;h2 id="write-verifiable-acceptance-criteria"&gt;&lt;a href="#write-verifiable-acceptance-criteria" class="header-anchor"&gt;&lt;/a&gt;Write verifiable acceptance criteria&#13;&#10;&lt;/h2&gt;&lt;p&gt;The result of requirement analysis should be testable:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;span class="lnt"&gt;3&#10;&lt;/span&gt;&lt;span class="lnt"&gt;4&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Given a valid work area with concave boundaries,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;when the user generates an orthophoto route,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;the system must produce only valid segments inside the permitted area,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;and the waypoint count must remain within the device limit.&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;Acceptance criteria give product, engineering, and testing a shared definition of completion.&lt;/p&gt;&#10;&lt;h2 id="keep-the-change-focused"&gt;&lt;a href="#keep-the-change-focused" class="header-anchor"&gt;&lt;/a&gt;Keep the change focused&#13;&#10;&lt;/h2&gt;&lt;p&gt;Finding the real problem does not mean replacing the existing design. Prefer the smallest verifiable change that preserves stable interfaces and critical workflows. State what is intentionally outside the current scope.&lt;/p&gt;&#10;&lt;p&gt;Good requirement analysis reduces rework and hidden assumptions. Its purpose is not to produce a longer document, but to make the proposed solution falsifiable and the expected outcome clear.&lt;/p&gt;&#10;</description></item><item><title>How I Diagnosed and Fixed a Bug in hub4j/github-api</title><link>https://ashersu.cn/en/posts/hub4j-notification-bug-fix/</link><pubDate>Fri, 19 Jun 2026 21:12:00 +0800</pubDate><guid>https://ashersu.cn/en/posts/hub4j-notification-bug-fix/</guid><description>&lt;p&gt;While using the notification stream in &lt;code&gt;hub4j/github-api&lt;/code&gt;, I encountered a GitHub API &lt;code&gt;422&lt;/code&gt; response:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Unable to parse If-Modified-Since request header.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Please make sure value is in an acceptable format.&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;The fix was merged in &lt;a class="link" href="https://github.com/hub4j/github-api/pull/1984" target="_blank" rel="noopener"&#13;&#10; &gt;PR #1984&lt;/a&gt; and linked to &lt;a class="link" href="https://github.com/hub4j/github-api/issues/1985" target="_blank" rel="noopener"&#13;&#10; &gt;Issue #1985&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="trace-the-error-to-the-request-header"&gt;&lt;a href="#trace-the-error-to-the-request-header" class="header-anchor"&gt;&lt;/a&gt;Trace the error to the request header&#13;&#10;&lt;/h2&gt;&lt;p&gt;The response explicitly named &lt;code&gt;If-Modified-Since&lt;/code&gt;, so the investigation focused on request construction rather than response parsing. In &lt;code&gt;GHNotificationStream.fetch()&lt;/code&gt;, the request reused the &lt;code&gt;Last-Modified&lt;/code&gt; value from the previous response:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;If-Modified-Since&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastModified&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;The problem was that &lt;code&gt;lastModified&lt;/code&gt; is optional. When it was &lt;code&gt;null&lt;/code&gt;, the request layer could send the string &lt;code&gt;&amp;quot;null&amp;quot;&lt;/code&gt;. That is not a valid HTTP date, so the GitHub API returned 422.&lt;/p&gt;&#10;&lt;h2 id="apply-the-smallest-correct-fix"&gt;&lt;a href="#apply-the-smallest-correct-fix" class="header-anchor"&gt;&lt;/a&gt;Apply the smallest correct fix&#13;&#10;&lt;/h2&gt;&lt;p&gt;The notification stream did not need a broad refactor. The header should only be set when a value exists:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;span class="lnt"&gt;3&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lastModified&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;If-Modified-Since&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastModified&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;This preserves the valid path. When GitHub returns &lt;code&gt;Last-Modified&lt;/code&gt;, later polls still use a conditional request. When it is absent, the client sends a normal request.&lt;/p&gt;&#10;&lt;h2 id="add-a-regression-test"&gt;&lt;a href="#add-a-regression-test" class="header-anchor"&gt;&lt;/a&gt;Add a regression test&#13;&#10;&lt;/h2&gt;&lt;p&gt;A one-line code change is not enough evidence that the bug will stay fixed. I added WireMock data for the notification endpoint and extended the existing test with another iteration after a response without &lt;code&gt;Last-Modified&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;The test verifies observable behavior rather than a private field: consecutive notification reads must not send an &lt;code&gt;If-Modified-Since&lt;/code&gt; header containing &lt;code&gt;&amp;quot;null&amp;quot;&lt;/code&gt; and must not receive a 422 response.&lt;/p&gt;&#10;&lt;h2 id="takeaway"&gt;&lt;a href="#takeaway" class="header-anchor"&gt;&lt;/a&gt;Takeaway&#13;&#10;&lt;/h2&gt;&lt;p&gt;An effective open-source fix combines a reproducible failure, a focused code change, and a regression test that matches the project&amp;rsquo;s existing style.&lt;/p&gt;&#10;&lt;p&gt;The same boundary condition applies to many integrations: optional response headers, cursors, continuation tokens, and pagination links must be checked before they are copied into a later request.&lt;/p&gt;&#10;</description></item><item><title>Building and Remotely Debugging OpenNMS</title><link>https://ashersu.cn/en/posts/legacy-189/</link><pubDate>Fri, 28 Mar 2025 08:44:08 +0800</pubDate><guid>https://ashersu.cn/en/posts/legacy-189/</guid><description>&lt;h2 id="prerequisites"&gt;&lt;a href="#prerequisites" class="header-anchor"&gt;&lt;/a&gt;Prerequisites&#13;&#10;&lt;/h2&gt;&lt;ol&gt;&#10;&lt;li&gt;Use a machine with at least &lt;code&gt;8 GB&lt;/code&gt; of memory.&lt;/li&gt;&#10;&lt;li&gt;Install Java 17.&lt;/li&gt;&#10;&lt;li&gt;Ensure that external dependency repositories are reachable.&lt;/li&gt;&#10;&lt;li&gt;Use a PostgreSQL version supported by the OpenNMS release.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="build-and-start"&gt;&lt;a href="#build-and-start" class="header-anchor"&gt;&lt;/a&gt;Build and start&#13;&#10;&lt;/h2&gt;&lt;p&gt;Clone &lt;a class="link" href="https://github.com/OpenNMS/opennms" target="_blank" rel="noopener"&#13;&#10; &gt;OpenNMS&lt;/a&gt;, then run:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;span class="lnt"&gt;3&#10;&lt;/span&gt;&lt;span class="lnt"&gt;4&#10;&lt;/span&gt;&lt;span class="lnt"&gt;5&#10;&lt;/span&gt;&lt;span class="lnt"&gt;6&#10;&lt;/span&gt;&lt;span class="lnt"&gt;7&#10;&lt;/span&gt;&lt;span class="lnt"&gt;8&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;ulimit&lt;/span&gt; -n &lt;span class="m"&gt;65535&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install bzip2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./clean.pl&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./compile.pl -DskipTests&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./assemble.pl -p dir&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./target/opennms-33.1.4/bin/runjava -s&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./target/opennms-33.1.4/bin/install -dis&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./target/opennms-33.1.4/bin/opennms -vt start&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;If assembly tests fail, retry with:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./assemble.pl -p dir -DskipTests&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;Do not place a custom Maven repository inside the source checkout, because the assembly process may include it in the generated source archive.&lt;/p&gt;&#10;&lt;h2 id="remote-debugging"&gt;&lt;a href="#remote-debugging" class="header-anchor"&gt;&lt;/a&gt;Remote debugging&#13;&#10;&lt;/h2&gt;&lt;p&gt;Configure the OpenNMS JVM to listen for a debugger on port &lt;code&gt;8001&lt;/code&gt;, then attach with IntelliJ IDEA. Keep the debug port private and use an SSH tunnel when debugging a remote host.&lt;/p&gt;&#10;&lt;p&gt;The web console uses port &lt;code&gt;8980&lt;/code&gt; by default.&lt;/p&gt;&#10;&lt;h2 id="script-permissions"&gt;&lt;a href="#script-permissions" class="header-anchor"&gt;&lt;/a&gt;Script permissions&#13;&#10;&lt;/h2&gt;&lt;p&gt;If the startup scripts report a missing user or insufficient permissions, review the &lt;code&gt;RUNAS&lt;/code&gt; setting in &lt;code&gt;runjava&lt;/code&gt;, &lt;code&gt;install&lt;/code&gt;, and &lt;code&gt;opennms&lt;/code&gt;. In a temporary test environment, the value can be supplied explicitly:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;RUNAS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;root&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;Production environments should use a dedicated service user with only the required permissions.&lt;/p&gt;&#10;</description></item></channel></rss>