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

Change default listen address to 'localhost' #828

Merged
merged 1 commit into from Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,9 @@ Every entry has a category for which we use the following visual abbreviations:

## Unreleased

- 🔄 The default bind address has been changed from `::` to `localhost`.
lava marked this conversation as resolved.
Show resolved Hide resolved
[#828](https://github.com/tenzir/vast/pull/828)

- 🐞 Archive lookups are now interruptible. This change fixes an issue that
caused consecutive exports to slow down the node, which improves the overall
performance for larger databases considerably.
Expand Down
6 changes: 3 additions & 3 deletions libvast/src/system/start_command.cpp
Expand Up @@ -65,7 +65,7 @@ caf::message start_command_impl(start_command_extra_steps extra_steps,
return caf::make_message(std::move(node_opt.error()));
auto& node = node_opt->get();
// Publish our node.
auto host = node_endpoint.host.empty() ? nullptr : node_endpoint.host.c_str();
auto host = node_endpoint.host.empty() ? "localhost" : node_endpoint.host.c_str();
auto publish = [&]() -> caf::expected<uint16_t> {
if (use_encryption)
#ifdef VAST_USE_OPENSSL
Expand All @@ -80,8 +80,8 @@ caf::message start_command_impl(start_command_extra_steps extra_steps,
auto bound_port = publish();
if (!bound_port)
return caf::make_message(std::move(bound_port.error()));
VAST_INFO_ANON("VAST node is listening on", (host ? host : "")
<< ':' << *bound_port);
auto listen_addr = std::string{host} + ':' + std::to_string(*bound_port);
VAST_INFO_ANON("VAST node is listening on", listen_addr);
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for fixing this output. Finally it makes sense to humans!

Copy link
Member Author

Choose a reason for hiding this comment

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

You're welcome, fellow human.

// Run user-defined extra code.
if (extra_steps != nullptr)
if (auto err = extra_steps(self, invocation.options, node))
Expand Down
2 changes: 1 addition & 1 deletion libvast/vast/defaults.hpp
Expand Up @@ -285,7 +285,7 @@ constexpr const caf::atom_value server_file_verbosity = caf::atom("debug");
namespace system {

/// Hostname or IP address and port of a remote node.
constexpr std::string_view endpoint = ":42000/tcp";
constexpr std::string_view endpoint = "localhost:42000/tcp";

/// The unique ID of this node.
constexpr std::string_view node_id = "node";
Expand Down