Java development blog (tips, notes, …)
"First, solve the problem. Then, write the code." (John Johnson)

    letsencrypt "Certbot doesn't know how to automatically configure the web server on this system"

    2017-08-20 19:00:00 +0000

    Had a little problem with letsencrypt, when I tried to renew the certificates, the following error showed:

    root@tsunade / # letsencrypt --renew-by-default
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Certbot doesn't know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run "certbot certonly" to do so. You'll need to manually configure your web server to use the resulting certificate.

    So I looked in /var/log/letsencrypt/letsencrypt.log :

    2017-08-20 18:43:37,178:DEBUG:certbot.main:Root logging level set at 20
    2017-08-20 18:43:37,179:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
    2017-08-20 18:43:37,179:DEBUG:certbot.main:certbot version: 0.10.2
    2017-08-20 18:43:37,179:DEBUG:certbot.main:Arguments: ['--apache']
    2017-08-20 18:43:37,180:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone)
    2017-08-20 18:43:37,180:DEBUG:certbot.plugins.selection:Requested authenticator apache and installer apache
    2017-08-20 18:43:37,180:DEBUG:certbot.plugins.selection:No candidate plugin
    2017-08-20 18:43:37,180:DEBUG:certbot.plugins.selection:Selected authenticator None and installer None

    So…. I had no clue, but a quick search on stackoverflow showed that I missed a package

    root@tsunade / # apt-get install python-certbot-apache
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following additional packages will be installed:
      augeas-lenses libaugeas0 python-augeas

    And all ended well. I renewed the certificates:

    root@tsunade / # letsencrypt --renew-by-default
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Which names would you like to activate HTTPS for?
    -------------------------------------------------------------------------------                                                                                                              
    1: my domains
    ...
    -------------------------------------------------------------------------------
    Select the appropriate numbers separated by commas and/or spaces, or leave input blank to select all options shown (Enter 'c' to cancel):
    Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org 
    Renewing an existing certificate
    ...

    Link: Xsd Reducer

    2017-08-11 18:00:00 +0000

    Simplify and reduce the size of the Xsd by deleting the unused declarations from it : http://www.abhortsoft.hu/xsdreducer/xsd_reducer.html

    Just does what it says. Good little tool.

    java is cool

    2017-02-02 18:00:00 +0000

    http://www.javais.cool :” There are many resources on news sites and blogs that carry valuable insights for your projects. Some are already well known, some a bit less and together they will keep you on the right track. Here are our favorites:”

    Commit empty folder structure (with git)

    2015-09-05 17:50:00 +0000

    In Git, you can’t commit empty folders, because Git does not actually save folders, only files. You’ll have to create some placeholder file inside those directories, if you actually want them to be “empty”.

    You could create a empty .gitignore file inside each empty folder. I find this confusing, since the goal is to keep the empty directories, not ignore them or some files inside of them.

    With the following script you can create a file named “.gitkeep” inside every empty folder. The filename has no meaning for git, but it makes it purpose clear.

    find . -type d -empty -not -path "./.git/*" -exec touch {}/.gitkeep \;

    AH00992: ajp_read_header: ajp_ilink_receive failed

    2015-06-02 13:31:00 +0000

    Recently I did not receive a response, after calling a webapp. There was no entry/error in the Application log. It was wired.

    Setup: Caller → Apache → Tomcat with Webapp

    After inspecting the apache logs, I found the following entries: “AH00992: ajp_read_header: ajp_ilink_receive failed”. I could not reproduce them, they just happened. As it turn out, my image of “my” setup was wrong:

    Real Setup: Caller → Apache → Firewall → Tomcat with Webapp

    The firewall kept droping the connection. No reason whatsoever. Since I have no controll over the firewall, I modified the timeouts of the http and the application server:

    For Apache HTTP + MOD_PROXY: ProxyPass Directive

    In Tomcat: Just set the “connectionTimeout” in the AJP connector. Source: JK Timeout Attributes -> Connection Pools and Idle Timeouts

subscribe via RSS