Last modified by Martijn Woudstra on 2022/06/23 15:52

Show last authors
1 {{container}}{{container layoutStyle="columns"}}(((
2 There is a need to see the complete stack trace logged when something goes wrong on runtime in some cases. In eMagiz, only the top-level information is shown and not always the entire stack trace. When this particular runtime runs on-premises, you can see the complete logging on the runtime in the karaf.log. In this microlearning, we will learn how to find the karaf log and search within the karaf log to find the corresponding error and subsequently analyze that error.
3
4 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]].
5
6 * Last update: November 15th, 2021
7 * Required reading time: 5 minutes
8
9 == 1. Prerequisites ==
10
11 * Advanced knowledge of the eMagiz platform
12
13 == 2. Key concepts ==
14
15 This microlearning centers around interpreting the karaf.log for an on-premise runtime
16 With a karaf.log, we mean: A file that holds the logging related to that specific runtime
17
18 In a karaf log, you see (among others) the following information:
19
20 * Start and stop information of flows or the complete runtime
21 * Manual logging you defined on flows running within that runtime
22 * Connection logging indicates whether there are connection problems
23 * Errors when something in an entry breaks down
24
25
26
27 == 3. Interpreting karaf.log on-premise ==
28
29 There is a need to see the complete stack trace logged when something goes wrong on runtime in some cases. In eMagiz, only the top-level information is shown and not always the entire stack trace. When this particular runtime runs on-premises, you can see the complete logging on the runtime in the karaf.log. In this microlearning, we will learn how to find the karaf log and search within the karaf log to find the corresponding error and subsequently analyze that error.
30
31 In a karaf log, you see (among others) the following information:
32
33 * Start and stop information of flows or the complete runtime
34 * Manual logging you defined on flows running within that runtime
35 * Connection logging indicates whether there are connection problems
36 * Errors when something in an entry breaks down
37
38 === 3.1 Where to find the karaf.log ===
39
40 Before we can interpret the karaf.log, the first action will be to find the karaf.log. The karaf.log is available within the data folder of each eMagiz runtime that is running on-premises. To see it, you first need to know the location where you saved and unpacked the runtime zips. Suppose you open the runtime for which you want to interpret the karaf log and open the data folder. Within the data folder, there is a folder called log. In there, you will see a file called karaf which can be opened with a tool such as Notepad++.
41
42 [[image:Main.Images.Microlearning.WebHome@advanced-advanced-monitoring-interpreting-karaf-log-on-premise--karaf-log-location.png]]
43
44 When you open the karaf.log file, you will see all logging that took place on that runtime. Note that when there is an extreme amount of logging, new karaf.log files are created. The first one is without a suffix and each of the following with a suffix (1,2,3,4) up to 9. When you exceed, that maximum eMagiz will start wiping the oldest logging to prevent problems with regards to disk size.
45
46 [[image:Main.Images.Microlearning.WebHome@advanced-advanced-monitoring-interpreting-karaf-log-on-premise--karaf-log-multiple-logs.png]]
47
48 === 3.2 Find additional information ===
49
50 Now that we know where to find the karaf.log, the next step is to analyze the karaf.log. The most logical scenario to arrive here is when you saw an error in the eMagiz Manage phase that could not be explained without looking at the complete stack trace. By opening and analyzing the karaf.log, you can find the whole stack trace to assist in performing your RCA on the problem at hand. Below you see an error in eMagiz for illustrative purposes.
51
52 [[image:Main.Images.Microlearning.WebHome@advanced-advanced-monitoring-interpreting-karaf-log-on-premise--error-in-the-log-manage.png]]
53
54 As you can see, we have the timestamp (in UTC) of when the logging was triggered. Having this information helps us to quickly locate the corresponding logging around that time by searching Notepad++. That way, you can find the related error easily to read the stack trace and interpret the error in more detail.
55
56 [[image:Main.Images.Microlearning.WebHome@advanced-advanced-monitoring-interpreting-karaf-log-on-premise--search-error-in-karaf-log.png]]
57
58
59
60 == 4. Assignment ==
61
62 Run your own Academy project on your laptop (on-premise), so you can experiment a bit with analyzing the karaf.log on-premise. This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment.
63
64 == 5. Key takeaways ==
65
66 * The karaf.log can be found within the folder called log under the folder data
67 * You can search the log with the help of tools such as Notepad++
68 * By looking at the timestamp in the eMagiz Manage Log, you can run a focused search
69
70
71
72 == 6. Suggested Additional Readings ==
73
74 No suggested additional readings for this microlearning.
75
76 == 7. Silent demonstration video ==
77
78 As this is a more theoretical microlearning, we have no video for this)))((({{toc/}}))){{/container}}{{/container}}