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

Update foreman.yml #602

Merged
merged 1 commit into from Jan 2, 2023
Merged

Update foreman.yml #602

merged 1 commit into from Jan 2, 2023

Conversation

nofaralfasi
Copy link
Contributor

I'm using vanilla foreman and :host: 'https://localhost/' didn't work for me,
and caused the error:

Could not load the API description from the server: 
Failed to open TCP connection to localhost:443 (Address family not supported by protocol - socket(2) for "localhost" port 443)
  - is the server down?
  - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
Warning: An error occured while loading module hammer_cli_foreman.

@theforeman-bot
Copy link
Member

Can one of the admins verify this patch?

@nofaralfasi
Copy link
Contributor Author

Hi @ofedoren, following the issue I had, I created this PR.

Copy link
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @nofaralfasi, although it's acceptable way as well, I'd rather suggest a bit different, what do you think?

@@ -3,7 +3,7 @@
:enable_module: true

# Your foreman server address
:host: 'https://localhost/'
:host: 'http://127.0.0.1:3000'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:host: 'http://127.0.0.1:3000'
:host: 'https://127.0.0.1:443'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm running localhost (127.0.0.1) with http (which I think most people are), and not https.
I guess that the port number is probably not 3000 like in my case for other users, but it didn't work for me when I omitted it.
So I think you know better than me what is best to decide, I just suggested what works for me :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this file is not for developers only, but any users, I'd recommend to use https :) AFAIR we force Foreman to run on https in production.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. Thank you for bringing this to my attention.

@ares
Copy link
Member

ares commented Nov 29, 2022

What is the next step here?

@nofaralfasi
Copy link
Contributor Author

What is the next step here?

It looks like @ofedoren wants to keep it as is.
I would close this PR, unless you think we should add a comment with a suggestion to add the port number or use http instead, if not working as is.

…a development environment

I'm using vanilla foreman and `:host: 'https://localhost/'` didn't work for me,
and caused the error:
```
Could not load the API description from the server:
Failed to open TCP connection to localhost:443 (Address family not supported by protocol - socket(2) for "localhost" port 443)
  - is the server down?
  - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
Warning: An error occured while loading module hammer_cli_foreman.
```
Copy link
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @nofaralfasi, I'm so sorry for not merging this earlier :/

@ofedoren ofedoren merged commit 6b97656 into theforeman:master Jan 2, 2023
@nofaralfasi
Copy link
Contributor Author

Thanks, @nofaralfasi, I'm so sorry for not merging this earlier :/

No worries! Thanks :)

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