java.lang.IllegalArgumentException: Resource '{:type "File", :title "/var/lib/p uppet/concat/thomas_vimrc/fragments/75_thomas_vimrc-\" allow adding additional config through .vimrc.local_if filereadable(glob(\"~_.vimrc.local\"))_\tsource ~_.vimrc.local_endif_"}' has an invalid tag 'thomas:vimrc-" allow adding additi onal config through .vimrc.local if filereadable(glob("~/.vimrc.local")) source ~/.vimrc.local endif '. Tags must match the pattern /\A[a-z0-9_][a-z0-9_:\-.]*\Z/.

gnome.org | 2 months ago
  1. 0

    Planet GNOME

    gnome.org | 2 months ago
    java.lang.IllegalArgumentException: Resource '{:type "File", :title "/var/lib/p uppet/concat/thomas_vimrc/fragments/75_thomas_vimrc-\" allow adding additional config through .vimrc.local_if filereadable(glob(\"~_.vimrc.local\"))_\tsource ~_.vimrc.local_endif_"}' has an invalid tag 'thomas:vimrc-" allow adding additi onal config through .vimrc.local if filereadable(glob("~/.vimrc.local")) source ~/.vimrc.local endif '. Tags must match the pattern /\A[a-z0-9_][a-z0-9_:\-.]*\Z/.
  2. 0

    Planet Grep - Planet'ing Belgian FLOSS people

    grep.be | 2 months ago
    java.lang.IllegalArgumentException: Resource '{:type "File", :title "/var/lib/p uppet/concat/thomas_vimrc/fragments/75_thomas_vimrc-\" allow adding additional config through .vimrc.local_if filereadable(glob(\"~_.vimrc.local\"))_\tsource ~_.vimrc.local_endif_"}' has an invalid tag 'thomas:vimrc-" allow adding additi onal config through .vimrc.local if filereadable(glob("~/.vimrc.local")) source ~/.vimrc.local endif '. Tags must match the pattern /\A[a-z0-9_][a-z0-9_:\-.]*\Z/.
  3. 0

    The Puppet compiler uses the following regex to determine whether or not a tag\ is valid: {code} ^[0-9A-Za-z_][0-9A-Za-z_:.-]*$ {code} This regex has an issue in that validation will stop at the first newline character in a tag. PuppetDB uses a stricter regex that will reject any tag containing newlines: {code} \A[a-z0-9_][a-z0-9_:\-.]*\Z {code} This rejection causes PuppetDB to discard catalogs containing resources tagged with strings containing newlines. h2. Reproduction Case Install PE 2016.2.1 and add the following resource to the default node declaration in {{/etc/puppetlabs/code/environments/production/manifests/site.pp}}: {code:puppet} notify {"two\nlines": } {code} Run {{puppet agent -t}}. h3. Outcome The catalog compiles and applies just fine: {noformat} # puppet agent -t Info: Using configured environment 'production' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for pe-201621-master.puppetdebug.vlan Info: Applying configuration version '1472744920' Notice: two lines {noformat} However, errors are present in the PuppetDB log: {noformat} 2016-09-01 08:48:49,635 ERROR [p.p.mq-listener] [a7244661-f9cd-469c-bfac-ca35be92db5c] [replace catalog] Fatal error on attempt 0 for pe-201621-master.puppetdebug.vlan java.lang.IllegalArgumentException: Resource '{:type "Notify", :title "two\nlines"}' has an invalid tag 'two lines'. Tags must match the pattern /\A[a-z0-9_][a-z0-9_:\-.]*\Z/. at puppetlabs.puppetdb.catalogs$validate_resources.invokeStatic(catalogs.clj:303) ~[na:na] at puppetlabs.puppetdb.catalogs$validate_resources.invoke(catalogs.clj:294) ~[na:na] ... {noformat} And a query to the PuppetDB node endpoint shows that a new set of facts was stored along with a new report, but the catlog is out of date: {noformat} # curl http://127.0.0.1:8080/pdb/query/v4/nodes/$(hostname -f)f) { "deactivated" : null, "latest_report_hash" : "221e50f615f0320d22c276dd4c4cc01634ba0841", "facts_environment" : "production", "cached_catalog_status" : "not_used", "report_environment" : "production", "catalog_environment" : "production", "facts_timestamp" : "2016-09-01T15:56:58.329Z", "latest_report_noop" : false, "expired" : null, "report_timestamp" : "2016-09-01T15:57:14.151Z", "certname" : "pe-201621-master.puppetdebug.vlan", "catalog_timestamp" : "2016-09-01T01:57:03.472Z", "latest_report_status" : "changed" } {noformat} h3. Expected Outcome The Puppet compiler uses {{/A}} and {{/Z}} to validate tags so that newlines don't break validation.

    JIRA | 3 months ago | Charlie Sharpsteen
    java.lang.IllegalArgumentException: Resource '{:type "Notify", :title "two\nlines"}' has an invalid tag 'two lines'. Tags must match the pattern /\A[a-z0-9_][a-z0-9_:\-.]*\Z/.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 785#217747142

    GitHub | 7 months ago | kaikreuzer
    java.lang.IllegalArgumentException: UID segment 'Hilo.fritz.box' contains invalid characters. Each segment of the UID must match the pattern [A-Za-z0-9_-]*.
  6. 0

    DiskLruCache - IllegalArgumentException

    Stack Overflow | 4 years ago | Alin
    java.lang.IllegalArgumentException: keys must match regex [a-z0-9_-]{1,64}: "mYUb5gz5gx"

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Resource '{:type "File", :title "/var/lib/p uppet/concat/thomas_vimrc/fragments/75_thomas_vimrc-\" allow adding additional config through .vimrc.local_if filereadable(glob(\"~_.vimrc.local\"))_\tsource ~_.vimrc.local_endif_"}' has an invalid tag 'thomas:vimrc-" allow adding additi onal config through .vimrc.local if filereadable(glob("~/.vimrc.local")) source ~/.vimrc.local endif '. Tags must match the pattern /\A[a-z0-9_][a-z0-9_:\-.]*\Z/.

      at com.puppetlabs.puppetdb.catalogs$validate_resources.invoke()
    2. com.puppetlabs.puppetdb
      catalogs$validate_resources.invoke
      1. com.puppetlabs.puppetdb.catalogs$validate_resources.invoke(catalogs.clj:331)[na:na]
      1 frame