Unable to find resource grr-response-templates@grr-response-templates
Fadavvi opened this issue · comments
OS: Ubuntu 18 (4.15.0-112-generic)
Python: 3.6.9
Error in last step of running grr_config_updater initialize
:
Step 2: Key Generation
All keys will have a bit length of 2048.
Generating executable signing key
Generating CA keys
Generating Server keys
Generating secret key for csrf protection.
Writing configuration to /home/test/INSTALL/install_data/etc/server.local.yaml.
I0810 05:04:14.212861 140612431202112 config_lib.py:469] Writing back configuration to file /home/test/INSTALL/install_data/etc/server.local.yaml
Initializing the datastore.
I0810 05:04:14.324506 140612431202112 server_logging.py:186] Writing log file to /home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/var/log//GRRlog.txt
Step 3: Adding GRR Admin User
Please enter password for user 'admin':
Step 4: Repackaging clients with new configuration.
Server debs include client templates. Re-download templates? [yN]: [N]:
Repack client templates? [Yn]: [Y]:
ERROR:2020-08-10 05:04:55,948 8832 MainProcess 140612431202112 MainThread package:32] Distribution grr-response-templates not found. Is it installed?
Traceback (most recent call last):
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/config_lib.py", line 1430, in InterpolateValue
context=context).Parse()
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/config_lib.py", line 671, in Parse
self.Close()
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/lexer.py", line 200, in Close
while self.NextToken():
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/lexer.py", line 138, in NextToken
possible_next_state = cb(string=m.group(0), match=m)
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/config_lib.py", line 639, in Filter
arg = filter_object().Filter(arg)
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/config_lib.py", line 274, in Filter
"Unable to find resource %s while interpolating: " % filename_spec)
grr_response_core.lib.config_lib.FilterError: Unable to find resource grr-response-templates@grr-response-templates while interpolating:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/test/INSTALL/bin/grr_config_updater", line 33, in <module>
sys.exit(load_entry_point('grr-response-server', 'console_scripts', 'grr_config_updater')())
File "/opt/grr/grr/server/grr_response_server/distro_entry.py", line 25, in ConfigUpdater
config_updater.Run()
File "/opt/grr/grr/server/grr_response_server/bin/config_updater.py", line 421, in Run
app.run(main, flags_parser=lambda argv: parser.parse_args(argv[1:]))
File "/home/test/INSTALL/lib/python3.6/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/home/test/INSTALL/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "/opt/grr/grr/server/grr_response_server/bin/config_updater.py", line 312, in main
repack_templates=not args.norepack_templates)
File "/opt/grr/grr/server/grr_response_server/bin/config_updater_util.py", line 755, in Initialize
prompt=True)
File "/opt/grr/grr/server/grr_response_server/bin/config_updater_util.py", line 697, in FinalizeConfigInit
repacking.TemplateRepacker().RepackAllTemplates(upload=True)
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_client_builder/repacking.py", line 233, in RepackAllTemplates
for template in os.listdir(config.CONFIG["ClientBuilder.template_dir"]):
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/config_lib.py", line 1225, in __getitem__
return self.Get(name)
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/config_lib.py", line 1292, in Get
context=calc_context)
File "/home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/lib/config_lib.py", line 1436, in InterpolateValue
raise type(e)(message)
grr_response_core.lib.config_lib.FilterError: Unable to find resource grr-response-templates@grr-response-templates while interpolating: : %(grr-response-templates@grr-response-templates|resource)/templates
Content of /home/test/INSTALL/lib/python3.6/site-packages/grr_response_core/var/log//GRRlog.txt:
ERROR:2020-08-10 05:04:55,948 8832 MainProcess 140612431202112 MainThread package:32] Distribution grr-response-templates not found. Is it installed?
P.S: I tried to run travis/fetch_client_templates.sh manually but (almost) same error repeated.
P.S 2!: Output of pip install grr-response-templates
:
ERROR: Could not find a version that satisfies the requirement grr-response-templates (from versions: none)
ERROR: No matching distribution found for grr-response-templates
@Fadavvi, a few questions:
- Which version of GRR are you installing?
- How do you install it (PIP, deb package)?
Installed from source, From current Github repository (based on https://grr-doc.readthedocs.io/en/latest/installing-grr-server/from-source.html#installing-python-3-grr-version-from-source)
The reason you see the error message when trying to install the grr-response-templates package is: the grr-response-templates package is too big to be served by PyPi. Its PyPi definition exists as a stub - https://pypi.org/project/grr-response-templates. Consequently, we put the grr-response-templates packages here. So it can be installed via:
pip install --no-cache-dir -f https://storage.googleapis.com/releases.grr-response.com/index.html grr-response-templates
However, there's a caveat here. If you build GRR from sources from HEAD, then the HEAD GRR version (currently - 3.4.2.1) is guaranteed to be higher than the latest release version (3.4.2.0). GRR components have a strictly defined version dependency - i.e. all installed PIP packages must have the same version. Mixing different versions together might not work.
Given this, you effectively have 2 options:
- Install from the 3.4.2.0 release branch (https://github.com/google/grr/tree/v3.4.2.0). When answering the question
Server debs include client templates. Re-download templates? [yN]:
, please answery
and GRR will automatically download and install the templates. - Install from HEAD and build the templates yourself, as described here (see the
Once that is done, you can build a template for your platform with:
part).
@mbushkov Thanks a lot. Problem resolved.