-
Notifications
You must be signed in to change notification settings - Fork 117
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
NoMethodError while registering SDE files in ArcGIS Server 10.7.1 #244
Comments
Have you also tried with the latest cookbook release v3.5.0? https://github.com/Esri/arcgis-cookbook/releases/tag/v3.5.0 |
@cameronkroeker I will give it a try. However, the specified recipe "datasources" hasn't changed for 2 years. So I'm not quite sure what is causing the problem. |
The problem persist with the newest cookbook release. And registering another SDE connection file also didn't help. |
@jesa-esrich Would you be able to share your role json file? (Please scrub out any sensitive information such as passwords, hostnames, etc). |
Here's the role json. As a side note there are also some custom recipes (marked as custom in the run list): { |
@cameronkroeker We tested a couple of other things:
|
Thank you for providing the role json file used. I suspect the error I was able to reproduce the same error. Try adding the following to the json file:
This workaround worked for me. And to your point about: "CHEF seems to use the CN for accessing the server website and registering the datasources (registering folders at least)." I suspect this is because of the following:
Looks like if ['arcgis']['datasources']['server_config_url'] is not specified then it will construct the following url:
So perhaps try defining ['arcgis']['datasources']['server_config_url'] attribute in the role json file as well. |
@cameronkroeker --> would be great to adjust/mention this in the documentation. Quite weirdly this was not needed for ArcGIS Cookbook 3.3.1 and ArcGIS Server 10.6.1. Maybe there was some dependency with the chef client. Concerning the suggestion for the certificate, the server url parameter did not resolve it. It still uses the CN for accessing the server and registering the datasources. But I only ran the scripts isolated using the datasources recipe. I'll keep you up to date if something changes if I run the whole list of recipes. |
Glad to hear that the workaround resolved the issue. --> would be great to adjust/mention this in the documentation. Quite weirdly this was not needed for ArcGIS Cookbook 3.3.1 and ArcGIS Server 10.6.1. Maybe there was some dependency with the chef client. This very well could be the case as there hasn't been any changes made to the datasources recipe in quite some time. I've made an internal issue for us to adjust the logic as this isn't the desired behavior with the Thanks for bringing this to our attention and apologies that it took so long to find a workaround. |
This has been fixed in cookbook release v3.6.1: https://github.com/Esri/arcgis-cookbook/releases |
Environment:
Windows Server 2016
ArcGIS Server 10.7.1
Chef Client 14.14.29
Microsoft SQL Server 2017
Microsoft SQL Server Driver 17
ArcGIS Cookbook 3.4.0
While installing and configuring ArcGIS Server 10.7.1 with Chef the script runs into an error while registering SDE Files in ArcGIS Server (registering folders works):
arcgis_enterprise_datasources[Create folder ] action create_folder (skipped due to only_if)
arcgis_enterprise_datasources[Share folder ] action share_folder (skipped due to only_if)
arcgis_enterprise_datasources[Register folder in ArcGIS Server] action register_folder
arcgis_enterprise_datasources[Register SDE files from folder as data source within ArcGIS Server] action register_sde_files_from_folder
================================================================================
Error executing action
register_sde_files_from_folder
on resource 'arcgis_enterprise_datasources[Register SDE files from folder as data source within ArcGIS Server]'NoMethodError
undefined method `each' for nil:NilClass
Resource Declaration:
In c:/chef/local-mode-cache/cache/cookbooks/arcgis-enterprise/recipes/datasources.rb
105: arcgis_enterprise_datasources 'Register SDE files from folder as data source within ArcGIS Server' do
106: not_if { node['arcgis']['datasources']['sde_files']['folder'].nil? }
107: action :register_sde_files_from_folder
108: end
109:
Compiled Resource:
Declared in c:/chef/local-mode-cache/cache/cookbooks/arcgis-enterprise/recipes/datasources.rb:105:in `from_file'
arcgis_enterprise_datasources("Register SDE files from folder as data source within ArcGIS Server") do
action [:register_sde_files_from_folder]
default_guard_interpreter :default
declared_type :arcgis_enterprise_datasources
cookbook_name "arcgis-enterprise"
recipe_name "datasources"
not_if { #code block }
end
System Info:
chef_version=14.14.29
platform=windows
platform_version=10.0.14393
ruby=ruby 2.5.7p206 (2019-10-01 revision 67816) [x64-mingw32]
program_name=C:/opscode/chef/bin/chef-solo
executable=C:/opscode/chef/bin/chef-solo
This worked perfectly fine for the ArcGIS Cookbook 3.3.1 and ArcGIS Server 10.6.1. The mentioned recipe and depending files (providers...etc.) also haven't changed between those version.
Does anyone know the cause for this error and how to resolve it?
The text was updated successfully, but these errors were encountered: