Troubleshooting a resin server and Jstack Preliminary understanding

Source: Internet
Author: User
Tags to domain

Do not know why, there is a dark cloud outside the window, and do not know why, the annoying cicada suddenly become silent, the brain of the noisy moment to place the quiet, grass he, my test server and special is no reason for the collapse.

As a rookie in order to troubleshoot, the first thought is to find the log, successively analyzed the project start log, resin startup log, the JVM log completely can not see the results.

The 1.JVM log shows that the GC is normal and memory is not overflowing.

      

2.resin process, the boot log is not an error.

3. The project log has a warning, log4j and another log packet has a class conflict, the general warning is ignored, in order to safely delete the useless log packet, restart the resin service is still unavailable, the request will not come in.

Log parsing has no results, code recompilation The heavy server is still unresponsive and helpless. Had to kneel and lick the great god for help.

Colleagues looked at the log after the discovery of a problem, resin did not really get up.

At that time resin's stdout.log was this:

      

The normal start should be more than one sentence log as follows:

[20:28:53.406] Resin started in 336646ms

Indicates that resin was blocked for some reason when it was started. So I used the jstack to analyze the situation at the time of the thread.

Jstack 572781 > tmp

      

is the main thread of resin, in a few moments using jstack to view the state of the main thread is always the case, indicating that the main thread is blocked on this method.

A little look at the main thread of the stack, the reason is definitely related to IP and zookeeper, I will recall, recently the company because of business downsizing, housekeeping, the former ZK services were migrated,

Sure enough, I found the project in ZK configuration ping the original IP ping, then the project ZK configuration changed to domain name access, in the hosts set up an IP after the OK.

Having experienced this server outage, I learned to use Jstack to find out why the process was blocked, and to learn more about thread dumps in Java.

Another problem is that the previous resin heavy part only needs about 24s, now need 3min, do not know whether is still the ZK configuration problem, pending further investigation.

Gorgeous Split-line:

Jstack using:

Java Thread Dump:

Troubleshooting a resin server and Jstack Preliminary understanding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.