Installation error: ERROR too many arguments

I get error message “ERROR: too many arguments” when installing with katello plugin
foreman-installer --scenario katello

First I gave all my arguments but after i got the error I tried cutting out the following thinking the command line somehow got too long:
(some of the above have further options which I leave out)

Whe trying without these arguments the installer passed the pre-check and started (however, failed later on the versionlock and the dhcp-bug) so I guess the “too many arguments” error comes from some of the above modules. When googling the error message I get one hit on “Bug #4182: Values with spaces cause "Error: too many arguments" in hammer shell - Hammer CLI - Foreman” which is an error when creating domains with hammer command. Could be related?

The problem in the link seems to be with spaces in the arguments but the only space I have in my arguments is the dhcp-range and as stated, that passed pre-check on my second try. I also tried double quoting all arguments but same result.

Expected outcome:
Successful installation

Foreman and Proxy versions:
foreman-release 2.2.0-1
Foreman and Proxy plugin versions:
Katello 3.17
pulp-server 2.21
python3-pulpcore 3.6.3-2
Distribution and version:
CentOS 7.9
Other relevant data:
The foreman server is a CentOS 7.9 server running in enforcing mode and is pre-registered to freeIPA.

The issue you linked is likely not related - the error message itself arises when some function is sent an incorrect number of arguments.
Could you share the full log showing the error an the stack trace, as well as the full command you ran (if needed you can modify domain names/IPs/passwords to hide any sensetive details)?


Thanks for looking into this. Don’t know what you mean by stack trace. The command never “started”. No puppet run was started so the usual updating line after the command never appeared. When looking through the different files in /var/log/foreman-installer all of them seem to exit with “real” puppet errors not just a parser error so I don’t think any of those were created when I ran the command below. I also must admit all quotes were not there from the beginning but I get the same error message after I added them.

Below are my input and output. It’s first time I try the “ansible” and “realm” modules so It could be a simple syntax error on my part but I’ve tried to follow the output from “foreman-installer --scenario katello --help” to figure out what to enter.

foreman-installer --scenario katello
–foreman-initial-organization “MyOrg”
–foreman-initial-location “MyLoc”
–foreman-initial-admin-username MyAdmin
–foreman-initial-admin-password MyAdminPW
–certs-server-cert “/root/sat_cert/foremanserver.crt”
–certs-server-key “/root/sat_cert/foremanserver.key”
–certs-server-ca-cert “/root/sat_cert/ipa-ca-chain.pem”
–foreman-proxy-dns true
–foreman-proxy-dns-managed true
–foreman-proxy-dns-interface “eno1”
–foreman-proxy-dns-server “”
–foreman-proxy-dns-zone “”
–foreman-proxy-dns-reverse “”
–foreman-proxy-dns-forwarders “”
–foreman-proxy-dhcp true
–foreman-proxy-dhcp-managed true
–foreman-proxy-dhcp-interface “eno1”
–foreman-proxy-dhcp-range “”
–foreman-proxy-dhcp-gateway “”
–foreman-proxy-dhcp-nameservers “”
–foreman-proxy-tftp true
–foreman-proxy-tftp-managed true
–foreman-proxy-tftp-servername “”
–foreman-proxy-plugin-openscap-timeout “600”
–foreman-proxy-realm-keytab “/etc/foreman-proxy/freeipa.keytab”
–foreman-proxy-realm-listen-on “https”
–foreman-proxy-realm-principal “realm-capsule@DOMAIN.SE”
–foreman-proxy-realm-provider “freeipa”
–tuning default

######### Input above, Output below #######################

ERROR: too many arguments

See: ‘foreman-installer --help’


I found the error. Shamefully it was on my part. There should be a “true” after the “–foreman-proxy-realm” flag.

Sorry for bothering you with this.