Size: 4812
Comment: improve introduction, add hint about needed file permissions
|
Size: 3376
Comment: Removed part about debug levels; used Windows paths and commands
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
getting them from a keyserver or via WKD. [1]. | getting them from a keyserver or via WKD. |
Line 16: | Line 16: |
When the dirmngr is starting it looks for a configuration file. When it finds the file it uses it. Otherwise the dirmngr uses default configurations. If we want to get a log file the easiest way is to tell the dirmngr to do so with in a configuration file. | When the dirmngr is starting it looks for a configuration file. When it finds the file it uses it. Otherwise the dirmngr uses default configurations. If we want to tell the dirmngr to create a log file and where the file is located we to do so with a configuration file. |
Line 18: | Line 18: |
Create a file called {{{dirmngr.conf}}} in the following path: \\{{{$HOME/.gnupg/}}} \\\\In this case $~HOME is your home directory, e.g. "/home/jane/". **Important:** Use the file name mentioned above. Else the dirmngr won't find it. |
* Press the Windows-key and the "R"-key on your keyboard simultaneously * Enter {{{C:/Users/user_name/AppData/Roaming/gnupg/}}} * Press the Return-key * Create a file called {{{dirmngr.conf}}} |
Line 24: | Line 25: |
Now we can to tell the dirmngr what options it has to use. Therefore open the configuration file with an editor.\\ First we can decide where the dirmngr should create the log file. We are doing this by adding this line:\\ {{{log-file $PATH/$FILENAME}}} |
Now we can to tell the dirmngr what options it has to use. Therefore open the configuration file by double-clicking on it.\\ First we can decide where the dirmngr creates the log file. We are doing this by adding this line:\\ {{{log-file C:/Users/user_name/Desktop/dirmngr.log.txt}}} |
Line 28: | Line 29: |
\\\\A concrete example is: \\{{{log-file /home/jane/dirmngr.log}}} |
|
Line 31: | Line 30: |
====2.2 Debug Level or Debug Flag The dirmngr can create a log file that is more or less detailed. That depends on what debug level you set in the configuration file. You can set the debug level by adding the following line to the configuration file: \\{{{debug-level $LEVEL}}} \\\\In this case $L~EVEL is one of the following: *none *basic *advanced *expert *guru |
====2.2 Set Debug Flags The dirmngr can create a log file that is more or less detailed. That depends on what debug flags you set in the configuration file. \\If you have a problem when trying to retrieve a public key add the following line in the configuration file to get helpful information: \\{{{debug dns,network,lookup}}} \\\\If you want to find out which debug flags you can use you can follow these steps: |
Line 41: | Line 36: |
The information that will appear in the log file grows from the top to the bottom. So when you choose //basic// you get little information about what happens in the dirmngr. When you choose //guru// you get as much information as possible. If you want to know more about the levels you can look [[https://gnupg.org/documentation/manuals/gnupg/Dirmngr-Options.html|here]]. | * Press the Windows-key and the "R"-key on your keyboard simultaneously * Enter {{{cmd}}} * In the new window enter {{{dirmngr --debug help}}} |
Line 43: | Line 40: |
A concrete example is: \\{{{debug-level advanced}}} \\\\Internally the dirmngr converts debug levels to debug flags and the latter affect which information is shown in the log file. So you can use these flags //alternatively// to add more precision. The following flags are available: *x509 *crypto *memory *cache *memstat *hashing *ipc *dns *network *lookup *extprog For example the debug level //advanced// causes the dirmngr to enable the debug flags //x509, ipc// and //lookup//. \\You can set debug flags with the following line in the configuration file: \\{{{debug $FLAGS}}} \\\\In this case $F~LAGS is a list of the flags mentioned above separated by commas. \\\\A concrete example is: \\{{{debug ipc,network}}} {{{ Note: If you enter both debug flags and a debug level the debug level has a higher priority. For example when the configuration file contains the following two lines debug-level guru debug ipc,network the following flags will be enabled: x509 crypto memory cache memstat hashing ipc dns network lookup extprog }}} |
Then you get a list of flags which you can use for debugging. More information about debug flags is available [[https://gnupg.org/documentation/manuals/gnupg/Dirmngr-Options.html|here]]. |
Line 78: | Line 45: |
{{{ Note: If you want to see which flags the dirmngr is using you can kill it first with "killall dirmngr" and then start it with "dirmngr --daemon". }}} |
|
Line 96: | Line 53: |
* The debug level (or debug flags) influences what is visible in the log file. Because it can contain sensitive information we recommend you to set a debug level as high as necessary but as low as possible. * Please tell in the forums also the version of Gnu~PG/Gpg4win you are using and what you did before the problem appeared. ---- [1] https://gnupg.org/documentation/manuals/gnupg/Invoking-DIRMNGR.html |
* The debug flags influence what is visible in the log file. Because it can contain sensitive information we recommend you not to use every debug flag. * Please tell in the forums also the version of Gnu~PG/Gpg4win you are using and the steps you made before the problem appeared. |
Find the cause of a problem with dirmngr
under construction
What is dirmngr?
The thing called dirmngr (spoken: dirmanager) is a tool that comes with GnuPG. It is responsible for sending or receiving information about public keys, like getting them from a keyserver or via WKD.
If we want to analyze what is going wrong with these network access operations, dirmngr can create log files.
How to create log files?
1. Create a configuration file
When the dirmngr is starting it looks for a configuration file. When it finds the file it uses it. Otherwise the dirmngr uses default configurations. If we want to tell the dirmngr to create a log file and where the file is located we to do so with a configuration file.
- Press the Windows-key and the "R"-key on your keyboard simultaneously
- Enter C:/Users/user_name/AppData/Roaming/gnupg/
- Press the Return-key
- Create a file called dirmngr.conf
2. Edit the configuration file
2.1 Path for log file
Now we can to tell the dirmngr what options it has to use. Therefore open the configuration file by double-clicking on it.
First we can decide where the dirmngr creates the log file. We are doing this by adding this line:
log-file C:/Users/user_name/Desktop/dirmngr.log.txt
The path and the name of the file are your choice but of course it has to be a place where dirmngr can write and a meaningful name helps you later to recognize the file ;-)
2.2 Set Debug Flags
The dirmngr can create a log file that is more or less detailed. That depends on what debug flags you set in the configuration file.
If you have a problem when trying to retrieve a public key add the following line in the configuration file to get helpful information:
debug dns,network,lookup
If you want to find out which debug flags you can use you can follow these steps:
- Press the Windows-key and the "R"-key on your keyboard simultaneously
- Enter cmd
- In the new window enter dirmngr --debug help
Then you get a list of flags which you can use for debugging. More information about debug flags is available here.
3. Restart the dirmngr
If you don't tell the dirmngr to read your edited configuration file it will be lazy and won't read it. To make it read the file and adapt the settings you have to restart it and you do this with the following command:
gpgconf reload dirmngr
How to solve my problem with the log file?
Look into the log file
After you configurated the dirmngr and restarted it you can read the file (remember: you set the location in 2.1). Maybe this already helps you to find out what causes the problem.
Share your log file in the forums
Maybe the content of the log file doesn't tell you anything because you don't understand this gibberish. Or maybe you are just no "technical person". In any case you can upload your log file in the forums so other people can try to help you.
Please note two things:
- The debug flags influence what is visible in the log file. Because it can contain sensitive information we recommend you not to use every debug flag.
- Please tell in the forums also the version of GnuPG/Gpg4win you are using and the steps you made before the problem appeared.