Hi there,

when i tried to integrate my new compute cluster into foreman with Hammer, 
Foreman / Hammer failed. I did it with the same setup but at least 8 month 
ago. Since then I upgraded Foreman constantly.

Command:

hammer -v -d host create --subnet-id 4 --environment-id 1 --medium-id 12 
--hostgroup-id=56 --partition-table-id 86 --environment-id 1 
--architecture-id 1 --domain-id 5 --puppet-proxy-id 1 --operatingsystem-id 
13 --ip 172.18.144.211 --name polstor01 --mac 24:6e:96:3f:1b:28 --comment 
"(Polaris Storage Node)" --managed 1


System:

Foreman 1.15.2
Centos 7.3
Official SSL-Certificates

Apache-Conf:

# ************************************
# Vhost template in module puppetlabs-apache
# Managed by Puppet
# ************************************

<VirtualHost *:443>
  ServerName urzlxdeploy.rz.uni-leipzig.de
  ## Vhost docroot
  DocumentRoot "/usr/share/foreman/public"

  ## Directories, there should at least be a declaration for 
/usr/share/foreman/public

  <Directory "/usr/share/foreman/public">
    Options SymLinksIfOwnerMatch
    AllowOverride None
    Require all granted
  </Directory>

  ## Logging
  ErrorLog "/var/log/httpd/foreman-ssl_error_ssl.log"
  ServerSignature Off
  CustomLog "/var/log/httpd/foreman-ssl_access_ssl.log" combined 

  ## Server aliases
  ServerAlias foreman

  ## SSL directives
  SSLEngine on
  SSLCertificateFile     
 "/etc/ssl/certs/urzlxdeploy-cert-7651137570087527.pem"
  SSLCertificateKeyFile   "/etc/pki/tls/private/urzlxdeploy.pem"
  SSLCertificateChainFile "/etc/ssl/certs/cachain.crt"
  SSLCACertificateFile    "/var/lib/puppet/ssl/certs/ca.pem"
  SSLCARevocationFile     "/var/lib/puppet/ssl/crl.pem"
  SSLCARevocationCheck    "chain"
  SSLVerifyClient         optional
  SSLVerifyDepth          3
  SSLOptions +StdEnvVars +ExportCertData

  ## Custom fragment
  # Static public dir serving

<Directory /usr/share/foreman/public>

  <IfVersion < 2.4>
    Allow from all
  </IfVersion>
  <IfVersion >= 2.4>
    Require all granted
  </IfVersion>


  PassengerAppRoot /usr/share/foreman
  PassengerRuby /usr/bin/tfm-ruby
  PassengerMinInstances 1
  PassengerStartTimeout 600
  PassengerPreStart https://urzlxdeploy.rz.uni-leipzig.de

  AddDefaultCharset UTF-8
</VirtualHost>


Error messages:

[ INFO 2017-07-27 13:17:47 Init] Initialization of Hammer CLI (0.10.2) has 
started...                                                                 
                                                                        
[46/1936]
[DEBUG 2017-07-27 13:17:47 Init] Running at ruby 2.2.2-p95
[ INFO 2017-07-27 13:17:47 Init] Configuration from the file 
/etc/hammer/cli_config.yml has been loaded
[ INFO 2017-07-27 13:17:47 Init] Configuration from the file 
/etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2017-07-27 13:17:47 Init] Configuration from the file 
/etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2017-07-27 13:17:47 Init] Configuration from the file 
/etc/hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2017-07-27 13:17:47 Init] Configuration from the file 
/home/urzadmin/.hammer/cli_config.yml has been loaded
[ INFO 2017-07-27 13:17:47 Init] Configuration from the file 
/home/urzadmin/.hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2017-07-27 13:17:47 Init] Configuration from the file 
/home/urzadmin/.hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2017-07-27 13:17:47 Init] Configuration from the file 
/home/urzadmin/.hammer/cli.modules.d/foreman_discovery.yml has been loaded
[DEBUG 2017-07-27 13:17:47 SSLoptions] SSL options: {
    :verify_ssl => true
}
[DEBUG 2017-07-27 13:17:47 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en"
}
[DEBUG 2017-07-27 13:17:47 API] Follow redirects: never
[DEBUG 2017-07-27 13:17:47 Connection] Registered: foreman
[ INFO 2017-07-27 13:17:47 Modules] Extension module hammer_cli_foreman 
(0.10.2) loaded
[ INFO 2017-07-27 13:17:47 Modules] Extension module 
hammer_cli_foreman_bootdisk (0.1.3) loaded
[ INFO 2017-07-27 13:17:47 Modules] Extension module 
hammer_cli_foreman_discovery (1.0.0) loaded
[DEBUG 2017-07-27 13:17:47 Init] Using locale 'en'
[DEBUG 2017-07-27 13:17:47 Init] 'mo' files for locale domain 'hammer-cli' 
loaded from 
'/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/locale'
[DEBUG 2017-07-27 13:17:47 Init] 'mo' files for locale domain 
'hammer-cli-foreman' loaded from 
'/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/locale'
[ INFO 2017-07-27 13:17:47 HammerCLI::MainCommand] Called with options: 
{"option_verbose"=>true, "option_debug"=>true}
[ INFO 2017-07-27 13:17:47 HammerCLIForeman::Host] Called with options: {}
[ INFO 2017-07-27 13:17:47 HammerCLIForeman::Host::CreateCommand] Called 
with options: {"option_managed"=>true, "option_build"=>true, 
"option_enabled"=>true, "option_overwrite"=>true, "option_volume_list"=>[], 
"option_interface_li$
t"=>[], "option_environment_id"=>1, "option_architecture_id"=>1, 
"option_domain_id"=>5, "option_operatingsystem_id"=>13, 
"option_medium_id"=>12, "option_ptable_id"=>86, "option_subnet_id"=>4, 
"option_hostgroup_id"=>56, "option_nam$
"=>"polstor01", "option_ip"=>"172.18.144.211", 
"option_mac"=>"24:6e:96:3f:1b:28", "option_puppet_proxy_id"=>1, 
"option_comment"=>"(Polaris Storage Node)"}
[ INFO 2017-07-27 13:17:47 API] Server: 
https://urzlxdeploy.rz.uni-leipzig.de
[ INFO 2017-07-27 13:17:47 API] POST /api/hosts
[DEBUG 2017-07-27 13:17:47 API] Params: {
    "host" => {
                              "name" => "polstor01",
                    "environment_id" => 1,
                                "ip" => "172.18.144.211",
                               "mac" => "24:6e:96:3f:1b:28",
                   "architecture_id" => 1,
                         "domain_id" => 5,
                   "puppet_proxy_id" => 1,
                "operatingsystem_id" => 13,
                         "medium_id" => 12,
                         "ptable_id" => 86,
                         "subnet_id" => 4,
                      "hostgroup_id" => 56,
                             "build" => true,
                           "enabled" => true,
                           "managed" => true,
                           "comment" => "(Polaris Storage Node)",
                "compute_attributes" => {
            "volumes_attributes" => {}
        },
                         "overwrite" => true,
        "host_parameters_attributes" => [],
             "interfaces_attributes" => []
    }
}
[ERROR 2017-07-27 13:17:47 Exception] Resource host not found by id ''
[ERROR 2017-07-27 13:17:47 Exception] 

RestClient::ResourceNotFound (404 Resource Not Found):
    
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in
 
`return!'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:352:in
 
`block in rest_client_call_block'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in
 
`call'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in
 
`process_result'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in
 
`block in transmit'
    /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in
 
`transmit'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in
 
`execute'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in
 
`execute'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/resource.rb:67:in
 
`post'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:324:in
 
`call_client'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:240:in
 
`http_call'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:190:in
 
`call_action'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:185:in
 
`call'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/resource.rb:21:in
 
`call'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/apipie/command.rb:43:in
 
`send_request'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:166:in
 
`send_request'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/apipie/command.rb:34:in
 
`execute'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in
 
`run'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in
 
`run'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in
 
`execute'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in
 
`run'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in
 
`run'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in
 
`execute'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in
 
`run'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in
 
`run'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in
 
`run'
    
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/bin/hammer:147:in
 
`<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'


Does anybody might know what the reason can be?

Cheers,

Vadim

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to