Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work autosign.conf #9430

Closed
makuartur opened this issue Jul 26, 2024 · 2 comments
Closed

Does not work autosign.conf #9430

makuartur opened this issue Jul 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@makuartur
Copy link

makuartur commented Jul 26, 2024

When starting the Puppet server with autosign enabled and the following content in autosign.conf:

rebuilt.example.com
*.scratch.example.com
*.local

(taken from the example documentation here), the Puppet server does not start and crashes with the error:

root@some-host:/etc/puppetlabs# cat /tmp/clojure-10159116997566303567.edn
{:clojure.main/message
 "Execution error (ConfigException$Parse) at com.typesafe.config.impl.ConfigDocumentParser$ParseContext/parseError (ConfigDocumentParser.java:201).\n/etc/puppetlabs/puppetserver/conf.d/autosign.conf: 2: Key 'rebuilt.example.com' may not be followed by token: '*' (Reserved character '*' is not allowed outside quotes) (if you intended '*' (Reserved character '*' is not allowed outside quotes) to be part of a key or string value, try enclosing the key or value in double quotes)\n",
 :clojure.main/triage
 {:clojure.error/class com.typesafe.config.ConfigException$Parse,
  :clojure.error/line 201,
  :clojure.error/cause
  "/etc/puppetlabs/puppetserver/conf.d/autosign.conf: 2: Key 'rebuilt.example.com' may not be followed by token: '*' (Reserved character '*' is not allowed outside quotes) (if you intended '*' (Reserved character '*' is not allowed outside quotes) to be part of a key or string value, try enclosing the key or value in double quotes)",
  :clojure.error/symbol
  com.typesafe.config.impl.ConfigDocumentParser$ParseContext/parseError,
  :clojure.error/source "ConfigDocumentParser.java",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type com.typesafe.config.ConfigException$Parse,
    :message
    "/etc/puppetlabs/puppetserver/conf.d/autosign.conf: 2: Key 'rebuilt.example.com' may not be followed by token: '*' (Reserved character '*' is not allowed outside quotes) (if you intended '*' (Reserved character '*' is not allowed outside quotes) to be part of a key or string value, try enclosing the key or value in double quotes)",
    :at
    [com.typesafe.config.impl.ConfigDocumentParser$ParseContext
     parseError
     "ConfigDocumentParser.java"
     201]}],
  :trace
  [[com.typesafe.config.impl.ConfigDocumentParser$ParseContext
    parseError
    "ConfigDocumentParser.java"
    201]
   [com.typesafe.config.impl.ConfigDocumentParser$ParseContext
    parseError
    "ConfigDocumentParser.java"
    197]
   [com.typesafe.config.impl.ConfigDocumentParser$ParseContext
    parseObject
    "ConfigDocumentParser.java"
    461]
   [com.typesafe.config.impl.ConfigDocumentParser$ParseContext
    parse
    "ConfigDocumentParser.java"
    648]
   [com.typesafe.config.impl.ConfigDocumentParser
    parse
    "ConfigDocumentParser.java"
    14]
   [com.typesafe.config.impl.Parseable
    rawParseValue
    "Parseable.java"
    262]
   [com.typesafe.config.impl.Parseable
    rawParseValue
    "Parseable.java"
    250]
   [com.typesafe.config.impl.Parseable parseValue "Parseable.java" 180]
   [com.typesafe.config.impl.Parseable parseValue "Parseable.java" 174]
   [com.typesafe.config.impl.Parseable parse "Parseable.java" 152]
   [com.typesafe.config.impl.SimpleIncluder
    fromBasename
    "SimpleIncluder.java"
    172]
   [com.typesafe.config.impl.ConfigImpl
    parseFileAnySyntax
    "ConfigImpl.java"
    138]
   [com.typesafe.config.ConfigFactory
    parseFileAnySyntax
    "ConfigFactory.java"
    844]
   [com.typesafe.config.ConfigFactory
    parseFileAnySyntax
    "ConfigFactory.java"
    856]
   [puppetlabs.config.typesafe$config_file__GT_map
    invokeStatic
    "typesafe.clj"
    101]
   [puppetlabs.config.typesafe$config_file__GT_map
    invoke
    "typesafe.clj"
    93]
   [puppetlabs.trapperkeeper.config$config_file__GT_map
    invokeStatic
    "config.clj"
    54]
   [puppetlabs.trapperkeeper.config$config_file__GT_map
    invoke
    "config.clj"
    47]
   [clojure.core$map$fn__5935 invoke "core.clj" 2772]
   [clojure.lang.LazySeq sval "LazySeq.java" 42]
   [clojure.lang.LazySeq seq "LazySeq.java" 51]
   [clojure.lang.Cons next "Cons.java" 39]
   [clojure.lang.RT next "RT.java" 713]
   [clojure.core$next__5451 invokeStatic "core.clj" 64]
   [clojure.core$every_QMARK_ invokeStatic "core.clj" 2698]
   [clojure.core$every_QMARK_ invoke "core.clj" 2689]
   [puppetlabs.kitchensink.core$deep_merge_with_keys_STAR_
    invokeStatic
    "core.clj"
    476]
   [puppetlabs.kitchensink.core$deep_merge_with_keys_STAR_
    doInvoke
    "core.clj"
    473]
   [clojure.lang.RestFn applyTo "RestFn.java" 142]
   [clojure.core$apply invokeStatic "core.clj" 671]
   [clojure.core$apply invoke "core.clj" 662]
   [puppetlabs.kitchensink.core$deep_merge_with_keys
    invokeStatic
    "core.clj"
    487]
   [puppetlabs.kitchensink.core$deep_merge_with_keys
    doInvoke
    "core.clj"
    482]
   [clojure.lang.RestFn applyTo "RestFn.java" 139]
   [clojure.core$apply invokeStatic "core.clj" 669]
   [clojure.core$apply invoke "core.clj" 662]
   [puppetlabs.trapperkeeper.config$load_config
    invokeStatic
    "config.clj"
    100]
   [puppetlabs.trapperkeeper.config$load_config invoke "config.clj" 90]
   [puppetlabs.trapperkeeper.config$fn__6386$parse_config_data__6391$fn__6392
    invoke
    "config.clj"
    135]
   [puppetlabs.trapperkeeper.config$fn__6386$parse_config_data__6391
    invoke
    "config.clj"
    125]
   [puppetlabs.trapperkeeper.core$fn__15913$boot_with_cli_data__15920$fn__15921$config_data_fn__15922
    invoke
    "core.clj"
    126]
   [puppetlabs.trapperkeeper.core$fn__15913$boot_with_cli_data__15920$fn__15921
    invoke
    "core.clj"
    127]
   [puppetlabs.trapperkeeper.core$fn__15913$boot_with_cli_data__15920
    invoke
    "core.clj"
    97]
   [puppetlabs.trapperkeeper.core$fn__15942$run__15947$fn__15948
    invoke
    "core.clj"
    155]
   [puppetlabs.trapperkeeper.core$fn__15942$run__15947
    invoke
    "core.clj"
    149]
   [puppetlabs.trapperkeeper.core$main invokeStatic "core.clj" 225]
   [puppetlabs.trapperkeeper.core$main doInvoke "core.clj" 211]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$apply invoke "core.clj" 662]
   [puppetlabs.trapperkeeper.main$_main invokeStatic "main.clj" 7]
   [puppetlabs.trapperkeeper.main$_main doInvoke "main.clj" 4]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.main$main_opt invokeStatic "main.clj" 514]
   [clojure.main$main_opt invoke "main.clj" 510]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause
  "/etc/puppetlabs/puppetserver/conf.d/autosign.conf: 2: Key 'rebuilt.example.com' may not be followed by token: '*' (Reserved character '*' is not allowed outside quotes) (if you intended '*' (Reserved character '*' is not allowed outside quotes) to be part of a key or string value, try enclosing the key or value in double quotes)"}}

The configuration file for the Puppet server:

[server]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
dns_alt_names = stubchain-puppet.gprptest.net
autosign = true
storeconfigs = true
storeconfigs_backend = puppetdb
http_extra_headers = <some_header>

[agent]
server = stubchain-puppet.gprptest.net
serverport = 443
http_extra_headers = <some_header>
[user]
http_extra_headers = <some_header>
[main]
http_extra_headers = <some_header>

Other information:

root@some-host:/etc/puppetlabs# /opt/puppetlabs/bin/puppetserver --version
puppetserver version: 8.6.1
root@some-host:/etc/puppetlabs# uname -r
6.5.0-1023-aws
root@some-host:/etc/puppetlabs# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@some-host:/etc/puppetlabs#
@makuartur makuartur added the bug Something isn't working label Jul 26, 2024
@joshcooper
Copy link
Contributor

@makuartur from the docs

Puppet looks for autosign.conf at $confdir/autosign.conf by default

So that should be /etc/puppetlabs/puppet/autosign.conf not /etc/puppetlabs/puppetserver/conf.d/autosign.conf Please reach out in community slack if you have further issues.

@makuartur
Copy link
Author

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants