Skip to content
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

[ERROR] AlgoliaUnreachableHostException: Unreachable hosts #6

Open
bazooka720 opened this issue Nov 23, 2021 · 5 comments
Open

[ERROR] AlgoliaUnreachableHostException: Unreachable hosts #6

bazooka720 opened this issue Nov 23, 2021 · 5 comments

Comments

@bazooka720
Copy link

bazooka720 commented Nov 23, 2021

I tried running this and keep getting this / similar error notes. Thoughts?

Traceback (most recent call last):  File "/opt/python/aws_lambda_powertools/logging/logger.py", line 347, in decorate    return lambda_handler(event, context)  File "/opt/python/aws_lambda_powertools/tracing/tracer.py", line 314, in decorate    response = lambda_handler(event, context, **kwargs)  File "/var/task/getfeed.py", line 493, in handler    blogupdate, newblogs = get_feed(url, blogsource, guids, table, event)  File "/opt/python/aws_lambda_powertools/tracing/tracer.py", line 631, in decorate    response = method(*args, **kwargs)  File "/var/task/getfeed.py", line 251, in get_feed    put_dynamo(timest_post, title, cleantxt, rawhtml, description, link, blogsource, author, guid, tags, category, datestr_post, table, event)  File "/opt/python/aws_lambda_powertools/tracing/tracer.py", line 631, in decorate    response = method(*args, **kwargs)  File "/var/task/getfeed.py", line 85, in put_dynamo    index.save_objects([smallitem])  File "/opt/python/algoliasearch/search_index.py", line 72, in save_objects    response = self._chunk("updateObject", objects, request_options)  File "/opt/python/algoliasearch/search_index.py", line 527, in _chunk    raw_responses.append(self._raw_batch(requests, request_options))  File "/opt/python/algoliasearch/search_index.py", line 534, in _raw_batch    return self._transporter.write(  File "/opt/python/algoliasearch/http/transporter.py", line 35, in write    return self.request(verb, hosts, path, data, request_options, timeout)  File "/opt/python/algoliasearch/http/transporter.py", line 72, in request    return self.retry(hosts, request, relative_url)  File "/opt/python/algoliasearch/http/transporter.py", line 94, in retry    raise

@marekq
Copy link
Owner

marekq commented Nov 23, 2021

Hey @bazooka720 ,

What is in your samconfig.toml file? I added a few additional options you can configure with the SAM CLI, where most options can be disabled without issue.

I cannot tell what's going wrong based on the error, but is i.e. EnableAlgolia set to "n" in your config? It seems to try and reach that service, which is likely an add-on you don't need.

@bazooka720
Copy link
Author

bazooka720 commented Nov 23, 2021

@marekq
version = 0.1
[default]
[default.deploy]
[default.deploy.parameters]
stack_name = "rss-app"
s3_bucket = "aws-sam-cli-managed-default-samclisourcebucket-XXXXXXXX"
s3_prefix = "rss-app"
region = "ca-central-1"
confirm_changeset = true
capabilities = "CAPABILITY_IAM"
parameter_overrides = "SourceEmail="My emaill" DestEmail="" SendEmails="n" StorePublicS3="n" CreateAppSync="y" EnableAlgolia="y" AlgoliaApp="rssapp" AlgoliaApikey="XXXX" AlgoliaIndex="""
image_repositories = []

@bazooka720
Copy link
Author

bazooka720 commented Nov 23, 2021

@marekq only thing is that i did add Algolia index name directly in the cloudformation stack parameters (just remembered)

@bazooka720
Copy link
Author

what does enable algolia do @marekq

@marekq
Copy link
Owner

marekq commented Nov 25, 2021

I extended the stack with many options that I use in "production", but others may not need. Algolia is an online search service that allows me to index and search through all the various blog posts. It's a managed service from a startup that allows me to offer a simple search option without having to maintain this myself. If AWS had an equivalent service I'd integrate that, but they don't.

What you could best try is to deploy the stack with the features disabled and no entries set. I didn't extensively test this part of enabling/disabling features, but happy to fix anything. I may remove or change this part long term too, since I'm probably the only one using Algolia, the email service etc. It's making this project harder to adopt for people like you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants