Skip to content
New issue

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

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

Already on GitHub? # to your account

FATAL: Fetching the Tomcat tarball checksum resulted in an error 301 #380

Closed
cameronkroeker opened this issue Feb 20, 2024 · 1 comment
Closed

Comments

@cameronkroeker
Copy link
Contributor

The following error occurs when a local copy of the tomcat installer does not exist:

remote_file[apache 9.0.48 tarball] action create[2024-02-19T05:28:03+00:00] FATAL: Fetching the Tomcat tarball checksum at http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.48/bin/apache-tomcat-9.0.48.tar.gz.sha512 resulted in an error 301
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu: [2024-02-19T05:28:03+00:00] FATAL: Could not fetch the checksum due to an error:
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu:
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu:
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu: ================================================================================
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu: Error executing action create on resource 'remote_file[apache 9.0.48 tarball]'
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu: ================================================================================
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu:
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu: RuntimeError
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu: ------------
2024-02-19T14:58:03+09:30: 1_arcgis_ubuntu.amazon-ebs.arcgis_server_ubuntu:

Workaround 1: Download and specify tarball_path

  • Manually download apache-tomcat-9.0.48.tar.gz file and and specify the path using node['tomcat']['tarball_path'] attribute in json config.
  • set node['tomcat']['verify_checksum'] attribute in json config to false.

Workaround 2: Modify Cookbooks to use https endpoint instead of http

  1. In cookbooks/esri-tomcat/attributes/default.rb:

Add:

default['tomcat']['tarball_base_uri'] = 'https://archive.apache.org/dist/tomcat/'
default['tomcat']['checksum_base_uri'] = 'https://archive.apache.org/dist/tomcat/'

For example:

default['tomcat']['version'] = '9.0.48'
default['tomcat']['tarball_base_uri'] = 'https://archive.apache.org/dist/tomcat/'
default['tomcat']['checksum_base_uri'] = 'https://archive.apache.org/dist/tomcat/'
default['tomcat']['instance_name'] = 'arcgis'
  1. In cookbooks/esri-tomcat/recipes/install.rb:

tomcat_install instance_name do
version node['tomcat']['version']
install_path node['tomcat']['install_path']
tarball_path node['tomcat']['tarball_path']
verify_checksum node['tomcat']['verify_checksum']
tomcat_user node['tomcat']['user']
tomcat_group node['tomcat']['group']
create_user node['tomcat']['create_user']
create_group node['tomcat']['create_group']
tomcat_user_shell node['tomcat']['tomcat_user_shell']
create_symlink node['tomcat']['create_symlink']
symlink_path node['tomcat']['symlink_path']
exclude_manager true
exclude_hostmanager true
not_if { ::File.exist?(::File.join(node['tomcat']['install_path'], 'LICENSE')) }
end

Add:

tarball_base_uri node['tomcat']['tarball_base_uri']
checksum_base_uri node['tomcat']['checksum_base_uri']

For example:

tomcat_install instance_name do
  version node['tomcat']['version']
  install_path node['tomcat']['install_path']
  tarball_base_uri node['tomcat']['tarball_base_uri']
  checksum_base_uri node['tomcat']['checksum_base_uri']
  tarball_path node['tomcat']['tarball_path']
  verify_checksum node['tomcat']['verify_checksum']
  tomcat_user node['tomcat']['user']
  tomcat_group node['tomcat']['group']
  create_user node['tomcat']['create_user']
  create_group node['tomcat']['create_group']
  tomcat_user_shell node['tomcat']['tomcat_user_shell']  
  create_symlink node['tomcat']['create_symlink']  
  symlink_path node['tomcat']['symlink_path'] 
  exclude_manager true
  exclude_hostmanager true 
  not_if { ::File.exist?(::File.join(node['tomcat']['install_path'], 'LICENSE')) }
end
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant