systemd – systemctl restart ntp failing with error: unable to bind to wildcard address

We’re running ntpd Ver. 4.2.8p4 on Ubuntu 16.04.6 LTS on ~100 physical servers distributed worldwide, with the configuration file /etc/ntp.conf managed centrally via puppet.
If the configuration is changed, puppet automatically restarts the ntp daemon via invoke-rc.d ntp try-restart. This fails regularly on a fraction of the servers (about four to five, not always the same ones) with the following symptoms:

  • New ntp daemon process exits immediately with message: “unable to bind to wildcard address :: – another process may be running – EXITING”

Syslog excerpt:

May 25 06:31:12 capetown systemd(1): Stopping LSB: Start NTP daemon...
May 25 06:31:12 capetown ntp(28437):  * Stopping NTP server ntpd
May 25 06:31:12 capetown ntp(28437):    ...done.
May 25 06:31:12 capetown systemd(1): Stopped LSB: Start NTP daemon.
May 25 06:31:12 capetown systemd(1): Starting LSB: Start NTP daemon...
May 25 06:31:12 capetown ntp(28449):  * Starting NTP server ntpd
May 25 06:31:12 capetown ntpd(28457): ntpd 4.2.8p4@1.3265-o Tue Jan  7 15:08:23 UTC 2020 (1): Starting
May 25 06:31:12 capetown ntpd(28457): Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 113:119
May 25 06:31:12 capetown ntp(28449):    ...done.
May 25 06:31:12 capetown systemd(1): Started LSB: Start NTP daemon.
May 25 06:31:12 capetown ntpd(28460): proto: precision = 0.105 usec (-23)
May 25 06:31:12 capetown ntpd(2749): 41.76.128.222 local addr 192.168.0.42 -> <null>
May 25 06:31:12 capetown ntpd(28460): MS-SNTP signd operations currently block ntpd degrading service to all clients.
May 25 06:31:12 capetown ntpd(28460): restrict 0.0.0.0: KOD does nothing without LIMITED.
May 25 06:31:12 capetown ntpd(28460): restrict ::: KOD does nothing without LIMITED.
May 25 06:31:12 capetown ntpd(28460): unable to bind to wildcard address :: - another process may be running - EXITING
  • Trying to start ntp service manually via systemctl start ntp just logs Started LSB: Start NTP daemon. but does not actually start an ntp process.
  • Manually executing systemctl stop ntp logs: “start-stop-daemon: warning: failed to kill : No such process”
  • After that, another systemctl start ntp succeeds in starting an ntp process which then runs normally.

How can this be improved so that restarting the ntp service works reliably?

snakemake – InputFunctionException – wildcard not resolved by expand and input function

I am building a snakemake pipeline which downloads a set (3) of paired fastq files for each sample, concatenates the appropriate reads together and then aligns and calls variants.

I am accessing the run accessions and ftp paths for each sample in a config.yaml file (although I also have in text files). The initial, troublesome part of the code is as follows:

configfile:"config.yaml"
import pandas as pd
sampleseq = pd.read_csv("data/sample_seq_headers.csv")
ox_codes = sampleseq.ox_code

rule all:
    input:
        expand("data/variants/{ox_code}/results/variants/variants.vcf.gz", ox_code=ox_codes)


ruleorder: download_fastqs > cat_fastqs
wildcard_constraints: ERR="ERRd+"

rule download_fastqs:
    output:
        "data/reads/{ox_code}/{ERR}_{n}.fastq.gz"
    log:
        "logs/download_ENA/{ox_code}_{ERR}_{n}.log"
    params:
        ftp=lambda wildcards:config('eachrun')(wildcards.ox_code)(wildcards.ERR)('ftp_path')
    shell:
        """
        curl {params.ftp}{wildcards.n}.fastq.gz -s -S --retry 10 --retry-delay 10 > data/reads/{wildcards.ox_code}/{wildcards.ERR}_{wildcards.n}.fastq.gz.tmp 2> {log} 
        && mv data/reads/{wildcards.ox_code}/{wildcards.ERR}_{wildcards.n}.fastq.gz.tmp {output} 2> {log}
        """

rule cat_fastqs:
    input:
        expand("data/reads/{{ox_code}}/{ERR}_{{n}}.fastq.gz", ERR=lambda wildcards: config('allruns')(wildcards.ox_code)('ERR'))
    output:
        "data/reads/{ox_code}/merged_{ox_code}_{n}.fastq.gz"
    log:
        "logs/cat_fastqs/{ox_code}_{n}.log"
    shell:
        """
        zcat {input} > {output}
        """

The config file is in two parts – ‘allruns’ and ‘eachrun’ – and is nested as follows (3 entries for each ERR run):

allruns:
  WA-0001:
    country:
    - Ghana
    - Ghana
    - Ghana
    location:
    - XXXX
    - XXXX
    - XXXX
    ERS:
    - ERSXXXXXXX
    - ERSXXXXXXX
    - ERSXXXXXXX
    ERR:
    - ERR1234567
    - ERRXXXXXXX
    - ERRXXXXXXX
    ftp_path:
    - ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR333/002/ERR1234567/ERR1234567_
    - ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERXXXX...........
    - ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERXXXX...........
 WA-XXXX
eachrun:
  WA-0001:
    ERR1234567:
      country: Ghana
      location: XXXXX
      ERS: ERSXXXXXX
      ftp_path: ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR333/002/ERR1234567/ERR1234567_
    ERR2XXXXX:

However, I am receiving an InputFunctionException error, as the lambda function within the rule cat_fastqs seems to fail. That or for whatever reason snakemake isnt resolving the ERR wildcard, appropriately. Ive tinkered with the input and output file names as that can help, but it doesn’t seem to in this case.

I either get this error…

InputFunctionException in line 43 of /home/sanj/projects/XXXX/Snakefile:
KeyError: 'WA-0075'
Wildcards:
ox_code=WA-0075
ERR=WA-0075
n=1

or using a wildcard constraint (which i’m not 100% sure is correct)..

MissingInputException in line 56 of /home/sanj/projects/XXXX/Snakefile:
Missing input files for rule cat_fastqs:
data/reads/WA-0073/ function lambda at 0x7f4b8f0f7170_1 .fastq.gz

If anyone had any ideas I would be very grateful.

On Netlify, how do I redirect a URL wildcard to that same directory?

I have URLs I want to redirect to their parent folder/directory:

/hats-category/hats1
/hats-category/hats2
/hats-category/cool-hats

Rule looks like this: /hats-category/* /hats-category

So I can redirect this way:
/hats-category/hats1 -> /hats-category
/hats-category/hats2 -> /hats-category
/hats-category/cool-hats -> /hats-category

It looks like this leads to a redirect loop. How do I do this?

Apache redirect all non valid wildcard subdomains to root domain

Is it possible to redirect all 404 subdomain result to the root domain in apache2? Im using a wildcard subdomain entry in my DNS provider, and apache is set to fetch the site in the folder with the same name as the subdomain. But I would also like it to be able to redirect its self to the root domain if there is no folder.

NameVirtualHost *:80

# Root domain
<VirtualHost *:80>
        ServerName example.com
        ServerAlias www.example.com
        DocumentRoot /var/www/example.com/public
</VirtualHost>

# Wildcard subdomains
<VirtualHost *:80>
        ServerAlias *.example.com
        VirtualDocumentRoot /var/www/%0/public
        # Redirect to root if `$0` folder doesn't exist
</VirtualHost>

8 – How to use a wildcard in the controller

I have 3 views with the paths below:

  • /user/foo
  • /user/you
  • /user/bar

I need to create a controller that points to any path starting with: /user/*

So i created a custom_module module where in the custom_module.routing.yml file, I have:

custom_module.CheckUserStatus:
  path: '/user/{param}'
  defaults:
    _controller: 'Drupalcustom_moduleControllerCheckUserStatusController::CheckUserStatus'
  requirements:
    _permission: 'access content'

and in the custom_module/src/Controller/CheckUserStatusController.php file, I have:

the {param} is just an arbitrary placeholder for a parameter supplied by the expected user. This should serve as a "wildcard", so /user/foo, /user/bar, /user/you etc. must all point to this controller.

But when I go on one of the paths above, the controller is not triggered at all!

What am i doing wrong?

deep links – Android applying wildcard characters and common asset links json

I have an app that has 4 product flavors based on development environments, say alpha, beta, gamma and prod. So the extension of my application package will be the name env which is defined using applicationIdSuffix in gradle.

I also have two key stores to create my app. One for debugging and another for output.

I am adding the app to my app and I have two questions here:

1. can i use a wildcard in my intention filter? as i will have domain urls like alpha.abc.com, beta.abc.com, gamma.abc.com and abc.com (the package name prod and prod will not have any applicationIdSuffix)

I tried to use * .abc.com and using this wildcard actually causes a problem in the link and displays a selection dialog. what am i doing wrong here?

2. Can I have a json digital asset link for all approx? or should i keep an assetlinks.json file for each env? Right now, my package name changes depending on enc like "package_name": "com.abc.beta", "com.abc.alpha", etc.
In addition, my "sha256_cert_fingerprints" changes depending on the keystore I use (debugging or version)

Any help is appreciated. I find a lot of questions but nothing seems useful to me.

Thanks in advance.

xml – Xpath wildcard

Hi i'm trying to use a wildcard in my xpath expression to find the tile

So far, I have this

x://a(@title="King")

So far all is well back the value = King

But there are 30 titles on the page and I want to browse using an incremented variable for offset

So I'm trying to retrieve the first x: // a (@ title = "wildcard?") Using a wildcard and I'm not very successful 🙁

Any help appreciated 🙂

amazon web services – Encrypt wildcard SSL that doesn't work behind AWS ELB

I have two servers behind an ELB on AWS. I am using the latest generic SSL functionality from Lets Encrypt, but I am experiencing the following error ERR_SSL_PROTOCOL_ERROR the strange part is that sometimes it will work and sometimes it won't.

I generated the site using the following command with the last certbot

./certbot-auto certonly                                     
--manual 
--preferred-challenges=dns 
--email tech@example.com 
--server https://acme-v01.api.letsencrypt.org/directory 
--agree-tos 
-d *.example.net

Here is also my curl output

curl -v https://admin.example.net
* Rebuilt URL to: https://admin.example.net/
*   Trying 54.222.163.142...
* TCP_NODELAY set
* Connected to admin.example.net (xxx.xxx.xxx.xxx) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
* Closing connection 0
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

any idea why this is an unknown protocol? Ironically, my front-end server which is not behind the load balancer is working

Can I create a default Apache name server for wildcard pages / characters on shared hosting?

Experts apologize for seemingly noob question, but I'm stuck:

So we have shared hosting on cpanel with a dedicated IP on say example.com. What we want is to download a default HTML file somewhere, which is used for all domains that use ns1.example.com, ns2.example.com as name servers, without our having to make a DNS entry for this domain in our server. Is it called the default apache page?

To clarify: We have registered ns1.example.com and ns2.example.com as name servers (glue records) by pointing them to the dedicated IP of our hosting. What configuration should we do on our server so that if randomdomain1.com, randomdomain2.com … randomdomain100.com displays the default file without us having to make an entry for random domains on our server. Much like the operation of domain parking companies.

Possible?

opensuse – Match the wildcard when deleting zypper?

I'm trying to delete an old kernel from openSUSE. The version of openSUSE is Tumbleweed (20191128) and the old kernel is 5.1.16.

The Zypper manual page is here. It seems that Zypper supports wildcards (if I correctly parse the manual page), but the syntax is not correct. I do not know how to tell the package manager to match the wildcard when deleting.

How to tell Zypper to delete matching packets *5.1.16*?


> ls /boot/
boot.readme                  sysctl.conf-5.1.16-1-default
config-5.1.16-1-default      sysctl.conf-5.3.12-1-default
config-5.3.12-1-default      System.map-5.1.16-1-default
grub2                        System.map-5.3.12-1-default
initrd                       vmlinux-5.1.16-1-default.gz
initrd-5.1.16-1-default      vmlinux-5.3.12-1-default.gz
initrd-5.3.12-1-default      vmlinuz
symvers-5.1.16-1-default.gz  vmlinuz-5.1.16-1-default
symvers-5.3.12-1-default.gz  vmlinuz-5.3.12-1-default

> sudo zypper remove *5.1.16*
Loading repository data...
Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.
Reading installed packages...
'*5.1.16*' not found in package names. Trying capabilities.
No provider of '*5.1.16*' found.
Resolving package dependencies...

Nothing to do.

> sudo zypper remove '*5.1.16*'
Loading repository data...
Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.
Reading installed packages...
'*5.1.16*' not found in package names. Trying capabilities.
No provider of '*5.1.16*' found.
Resolving package dependencies...

Nothing to do.