Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Default Install using localhost cert causes error #220

Open
seanmcfeely opened this issue Mar 5, 2019 · 1 comment
Open

Default Install using localhost cert causes error #220

seanmcfeely opened this issue Mar 5, 2019 · 1 comment

Comments

@seanmcfeely
Copy link
Contributor

The nodes db table picks up the hostname and uses it to define the location:

mysql> select * from nodes;
+----+-----------------------+----------+------------+---------------------+------------+----------+----------+
| id | name                  | location | company_id | last_update         | is_primary | any_mode | is_local |
+----+-----------------------+----------+------------+---------------------+------------+----------+----------+
|  1 | localhost.localdomain | animus   |          1 | 2019-03-05 17:10:29 |          1 |        1 |        0 |
+----+-----------------------+----------+------------+---------------------+------------+----------+----------+

This does not agree with the default api prefix or default certs and cases the following error:

unable to submit alert: HTTPSConnectionPool(host='animus', port=443): Max retries exceeded with url: /api/analysis/submit (Caused by SSLError(CertificateError("hostname 'animus' doesn't match either of 'localhost', '127.0.0.1'",),)) 

A work around is to do this:

update nodes set location='localhost' where id=1;

This either needs to be fixed by making sure the nodes table location defaults to localhost or that the appropriate config item reflects the hostname of the system that gets added to the nodes entry.

@seanmcfeely seanmcfeely changed the title Install using localhost certs fails Default Install using localhost cert cases error Mar 5, 2019
@seanmcfeely seanmcfeely changed the title Default Install using localhost cert cases error Default Install using localhost cert causes error Mar 5, 2019
@unixfreak0037
Copy link
Collaborator

Thanks. api.prefix config option defaults to AUTO which uses the result of socket.getfqdn(), which returns localhost.localdomain, while the SSL cert is configured for localhost.

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

No branches or pull requests

2 participants