-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Changing hostname after starting an InfluxDB is problematic #419
Comments
I hit this issue -- it's pretty easy to bring out. Surely option #2 isn't really a fix, since someone could always set the hostname explicitly to one value (hostname1), and then just set it to another value (hostname2) next time? Because if I do that, it still happens. :-) Is option #1 feasible? I see from the logs that there is still reference to the first hostname (hostname1): [04/14/14 21:16:32] [INFO] ClusterServer: 1 connecting to: hostname1:8099 so I guess it's coming from an older cluster configuration file on disk. |
I just go bitten by this too, very annoying. Renaming my server should not make anything on it crash :s |
it's used as an identifier for clustering, but it needs to be resolvable. On Thu, Apr 17, 2014 at 6:14 AM, Julien Ammous notifications@github.comwrote:
|
ok I see. |
@schmurfy that's exactly what this issue is about. That is the best solution if it's feasible. I can't think of a reason why we can't do this. |
What actually appears to be happening -- from looking at the code and the logs -- is that the standalone node thinks it has a another node to connect to -- a node by the name of the previous hostname. |
is there a workaround in the meantime to allow renaming hosts ? is there a way to manually "fix" the influxdb state to properly teach it its new hostname ? |
you may be able to update it in the raft directory. Those files are On Thu, Apr 24, 2014 at 6:48 AM, Julien Ammous notifications@github.comwrote:
|
ok, I actually retract what I just said. Chances are you have a Raft snapshot already and you won't be able to update that manually. We'll try to get to this next week. Thanks |
This fix allows changing hostnames in a single node cluster setup, which seems to be the most common use case. I'll open a new issue to make it possible to change hostnames/ports in a cluster of nodes. |
Changing the hostname throught the os or by setting it in the config file causes the InfluxDB instance to not start and throw a nil pointer dereference. We have two options here:
These two options require the ability to detect if a hostname changed after influxdb was started and take one of the actions. So first step is to detect when the hostname change.
The text was updated successfully, but these errors were encountered: