Task 'Set up compute instance bruce-digges.,,,' *failed*

Problem:

I installed and configured the foreman-xen plugin. In the connection test, everything proved to be correct. When trying to create a host the error occurs. Log error below is generated.

Expected outcome:

If it is a problem with the plugin or the foreman, it works correctly. If it is a configuration problem, I’ll check it out.

Foreman and Proxy versions:

1.17.1

Foreman and Proxy plugin versions:

foreman-xen > 0.6.1

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]

https://pastebin.com/raw/8KEM5JAP

Hello,

Any help?

Pasting here the relevant part of the log:

2018-08-16T12:23:30 39ad6f8c [app] [I] Started POST "/hosts" for 172.16.11.11 at 2018-08-16 12:23:30 -0300
2018-08-16T12:23:30 39ad6f8c [app] [I] Processing by HostsController#create as */*
2018-08-16T12:23:30 39ad6f8c [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"TKUxEX5De1m1e9IkoDKV+dTE1yTkCF9FkobUPT+2+/iZEG53sjagaNj26ZDqjYkUdwdg9Xe0NCtbz7GHAiorTg==", "host"=>{"name"=>"bruce-digges", "hostgroup_id"=>"", "compute_resource_id"=>"1", "compute_profile_id"=>"1", "environment_id"=>"3", "puppet_proxy_id"=>"1", "puppet_ca_proxy_id"=>"1", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"bruce-digges", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"172.16.40.1", "ip6"=>"", "managed"=>"0", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "compute_attributes"=>{"vcpus_max"=>"1", "memory_min"=>"536870912", "memory_max"=>"1073741824", "custom_template_name"=>"#Template Debian 9", "xenstore"=>{"vm-data"=>{"ifs"=>{"0"=>{"ip"=>"172.16.40.1", "gateway"=>"172.16.1.1", "netmask"=>"255.255.0.0"}}, "nameserver1"=>"200.132.218.131", "nameserver2"=>"", "environment"=>"development"}}, "VBDs"=>{"sr_uuid"=>"c98d00e1-27dd-2ee2-815a-83cb7f5688f6", "physical_size"=>""}, "xstools"=>"0", "VIFs"=>{"print"=>"Pool-wide network associated with eth1"}, "hypervisor_host"=>"", "start"=>"1"}, "architecture_id"=>"1", "operatingsystem_id"=>"7", "provision_method"=>"build", "build"=>"1", "medium_id"=>"2", "ptable_id"=>"92", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"4-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build", "provider"=>"Xenserver", "bare_metal_capabilities"=>"build"}
2018-08-16T12:23:30 39ad6f8c [app] [I] Current user: admin (administrator)
2018-08-16T12:23:30 39ad6f8c [app] [I] Adding Compute instance for bruce-digges.mycompany.intra
2018-08-16T12:23:30 39ad6f8c [app] [I] create_vm(): custom_template_name: #Template Debian 9
2018-08-16T12:23:30 39ad6f8c [app] [I] create_vm(): builtin_template_name: 
2018-08-16T12:23:30 39ad6f8c [app] [I] create_vm_from_builtin: host : xenserver1
2018-08-16T12:24:01 39ad6f8c [app] [I] <Net::ReadTimeout> Net::ReadTimeout
	/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/xen_server/connection.rb:35:in `eval'
	/usr/lib/ruby/2.3.0/net/protocol.rb:136:in `readuntil'
	/usr/lib/ruby/2.3.0/net/protocol.rb:146:in `readline'
	/usr/lib/ruby/2.3.0/net/http/response.rb:40:in `read_status_line'
	/usr/lib/ruby/2.3.0/net/http/response.rb:29:in `read_new'
	/usr/lib/ruby/2.3.0/net/http.rb:1437:in `block in transport_request'
	/usr/lib/ruby/2.3.0/net/http.rb:1434:in `catch'
	/usr/lib/ruby/2.3.0/net/http.rb:1434:in `transport_request'
	/usr/lib/ruby/2.3.0/net/http.rb:1407:in `request'
	/usr/share/foreman/lib/foreman/http_proxy/net_http_extension.rb:14:in `request'
	/usr/lib/ruby/2.3.0/net/http.rb:1352:in `request_post'
	/usr/lib/ruby/2.3.0/xmlrpc/client.rb:498:in `do_rpc'
	/usr/lib/ruby/2.3.0/xmlrpc/client.rb:287:in `call2'
	/usr/lib/ruby/2.3.0/xmlrpc/client.rb:268:in `call'
	(eval):1:in `request'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/xen_server/connection.rb:35:in `eval'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/xen_server/connection.rb:35:in `request'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/compute/xen_server/requests/clone_server.rb:6:in `clone_server'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/compute/xen_server/models/server.rb:157:in `clone'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_xen-0.6.1/app/models/foreman_xen/xenserver.rb:234:in `create_vm_from_custom'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_xen-0.6.1/app/models/foreman_xen/xenserver.rb:210:in `create_vm'
	/usr/share/foreman/app/models/concerns/orchestration/compute.rb:77:in `setCompute'
	/usr/share/foreman/app/models/concerns/orchestration.rb:222:in `execute'
	/usr/share/foreman/app/models/concerns/orchestration.rb:145:in `block in process'
	/usr/share/foreman/app/models/concerns/orchestration.rb:137:in `each'
	/usr/share/foreman/app/models/concerns/orchestration.rb:137:in `process'
	/usr/share/foreman/app/models/concerns/orchestration.rb:44:in `around_save_orchestration'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:827:in `_run_save_callbacks'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/callbacks.rb:336:in `create_or_update'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/persistence.rb:129:in `save'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/validations.rb:44:in `save'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/attribute_methods/dirty.rb:35:in `save'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:308:in `block (2 levels) in save'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
	/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:381:in `with_transaction_returning_status'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:308:in `block in save'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:323:in `rollback_active_record_state!'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:307:in `save'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/suppressor.rb:42:in `save'
	/usr/share/foreman/app/models/concerns/foreman/sti.rb:26:in `save'
	/usr/share/foreman/app/controllers/hosts_controller.rb:104:in `create'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in `process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
	/usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
	/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
	/usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/audited-4.5.0/lib/audited/sweeper.rb:14:in `around'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/audited-4.5.0/lib/audited/sweeper.rb:14:in `around'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in `process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in `process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `block in instrument'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `instrument'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:in `process_action'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in `process'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in `process'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in `dispatch'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in `dispatch'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in `serve'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in `block in serve'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `each'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `serve'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.8/lib/apipie/static_dispatcher.rb:65:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.8/lib/apipie/extractor/recorder.rb:136:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.8/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
	/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:8:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/etag.rb:25:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/conditional_get.rb:38:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/head.rb:12:in `call'
	/usr/share/foreman/lib/middleware/session_safe_logging.rb:17:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in `context'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in `run_callbacks'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:in `call_app'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
	/usr/share/foreman/lib/middleware/tagged_logging.rb:18:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/runtime.rb:22:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/secure_headers-3.7.3/lib/secure_headers/middleware.rb:12:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in `block in call'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `each'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `call'
	/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
	/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request'
	/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
	/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
	/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
	/usr/share/foreman/vendor/ruby/2.3.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2018-08-16T12:24:01 39ad6f8c [app] [I] /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/xen_server/connection.rb:35:in `eval'
 | /usr/lib/ruby/2.3.0/net/protocol.rb:136:in `readuntil'
 | /usr/lib/ruby/2.3.0/net/protocol.rb:146:in `readline'
 | /usr/lib/ruby/2.3.0/net/http/response.rb:40:in `read_status_line'
 | /usr/lib/ruby/2.3.0/net/http/response.rb:29:in `read_new'
 | /usr/lib/ruby/2.3.0/net/http.rb:1437:in `block in transport_request'
 | /usr/lib/ruby/2.3.0/net/http.rb:1434:in `catch'
 | /usr/lib/ruby/2.3.0/net/http.rb:1434:in `transport_request'
 | /usr/lib/ruby/2.3.0/net/http.rb:1407:in `request'
 | /usr/share/foreman/lib/foreman/http_proxy/net_http_extension.rb:14:in `request'
 | /usr/lib/ruby/2.3.0/net/http.rb:1352:in `request_post'
 | /usr/lib/ruby/2.3.0/xmlrpc/client.rb:498:in `do_rpc'
 | /usr/lib/ruby/2.3.0/xmlrpc/client.rb:287:in `call2'
 | /usr/lib/ruby/2.3.0/xmlrpc/client.rb:268:in `call'
 | (eval):1:in `request'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/xen_server/connection.rb:35:in `eval'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/xen_server/connection.rb:35:in `request'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/compute/xen_server/requests/clone_server.rb:6:in `clone_server'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/fog-xenserver-0.3.0/lib/fog/compute/xen_server/models/server.rb:157:in `clone'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_xen-0.6.1/app/models/foreman_xen/xenserver.rb:234:in `create_vm_from_custom'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_xen-0.6.1/app/models/foreman_xen/xenserver.rb:210:in `create_vm'
 | /usr/share/foreman/app/models/concerns/orchestration/compute.rb:77:in `setCompute'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:222:in `execute'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:145:in `block in process'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:137:in `each'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:137:in `process'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:44:in `around_save_orchestration'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:827:in `_run_save_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/callbacks.rb:336:in `create_or_update'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/persistence.rb:129:in `save'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/validations.rb:44:in `save'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/attribute_methods/dirty.rb:35:in `save'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:308:in `block (2 levels) in save'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
 | /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:381:in `with_transaction_returning_status'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:308:in `block in save'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:323:in `rollback_active_record_state!'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:307:in `save'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/suppressor.rb:42:in `save'
 | /usr/share/foreman/app/models/concerns/foreman/sti.rb:26:in `save'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:104:in `create'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/audited-4.5.0/lib/audited/sweeper.rb:14:in `around'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/audited-4.5.0/lib/audited/sweeper.rb:14:in `around'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `block in instrument'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `instrument'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in `process'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in `process'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in `dispatch'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in `dispatch'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in `serve'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `each'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `serve'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.8/lib/apipie/static_dispatcher.rb:65:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.8/lib/apipie/extractor/recorder.rb:136:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.8/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 | /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:8:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/etag.rb:25:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/conditional_get.rb:38:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/head.rb:12:in `call'
 | /usr/share/foreman/lib/middleware/session_safe_logging.rb:17:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in `context'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in `run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:in `call_app'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 | /usr/share/foreman/lib/middleware/tagged_logging.rb:18:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/runtime.rb:22:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/secure_headers-3.7.3/lib/secure_headers/middleware.rb:12:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in `block in call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `each'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `call'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2018-08-16T12:24:01 39ad6f8c [app] [W] Rolling back due to a problem: [#<Orchestration::Task:0x007f60eaea12b0 @name="Set up compute instance bruce-digges.mycompany.intra", @status="failed", @priority=2, @action=[#<Host::Managed id: nil, name: "bruce-digges.mycompany.intra", last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: "$5$BbxzSYqL$aarM8il876M0FzOwXDVuPwZF9gT.cKQnoduaPz...", architecture_id: 1, operatingsystem_id: 7, environment_id: 3, ptable_id: 92, medium_id: 2, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 4, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id: nil, organization_id: nil, location_id: nil, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: 1, provision_method: "build", grub_pass: "$6$iDuunDFU$lL3W85Q5aWzpCL8TFV8hL6pO4z3/3PCRNhIvFR...", global_status: 0, lookup_value_matcher: "fqdn=bruce-digges.mycompany.intra", pxe_loader: "PXELinux BIOS">, :setCompute], @timestamp=2018-08-16 15:24:01 UTC>]
2018-08-16T12:24:01 39ad6f8c [app] [I] Processed 1 tasks from queue 'Host::Managed Main', completed 0/3
2018-08-16T12:24:01 39ad6f8c [app] [E] Task 'Set up compute instance bruce-digges.mycompany.intra' *failed*
2018-08-16T12:24:01 39ad6f8c [app] [E] Task 'Query instance details for bruce-digges.mycompany.intra' *canceled*
2018-08-16T12:24:01 39ad6f8c [app] [E] Task 'Power up compute instance bruce-digges.mycompany.intra' *canceled*
2018-08-16T12:24:01 39ad6f8c [app] [I] Failed to save: 
2018-08-16T12:24:01 39ad6f8c [app] [I]   Rendering hosts/new.html.erb within layouts/application

The stack trace seems to indicate a network timeout in the fog-xenserver gem, which is the library handling the connection between Foreman and the Xen server. I’m not familiar with Xen or the plugin itself, but I would try verifying everything on the network level is set up correctly.