apache/cassandra · warning

Gossiper.unsafeAssassinateEndpoint is deprecated and will…

Error message

Gossiper.unsafeAssassinateEndpoint is deprecated and will be removed in the next release; use assassinateEndpoint instead

What it means

unsafeAssassinateEndpoint is a deprecated wrapper around assassinateEndpoint that logs a deprecation warning on every call. It exists for backward compatibility with older nodetool/scripts; it performs the same dangerous operation of forcing an endpoint out of the ring regardless of its actual state.

Solutions

  1. Switch to assassinateEndpoint (or the current nodetool assassinate) instead of the unsafe variant.
  2. Prefer decommission/removenode over assassination whenever the node can communicate.
  3. If assassination is required, ensure the node is truly dead and update automation to call the non-deprecated API.
  4. Remove usages from scripts/JMX automation before the next major release where the method is deleted.

Example fix

// before
Gossiper.instance.unsafeAssassinateEndpoint("10.0.0.5");
// after
Gossiper.instance.assassinateEndpoint("10.0.0.5");
Defensive patterns

Strategy: fallback

Validate before calling

// prefer non-deprecated path
boolean canCommunicate = Gossiper.instance.getEndpointStateForEndpoint(ep) != null && Gossiper.instance.isAlive(ep);

Prevention

When it happens

Trigger: Calling Gossiper.unsafeAssassinateEndpoint(address) directly, or running an old nodetool 'assassinate' variant that targets the deprecated method.

Common situations: Operators removing a dead node with outdated tooling or scripts copied from old runbooks; JMX clients invoking the deprecated MBean operation.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/cccc0268da3c39ea. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/gms/Gossiper.java:813

            }
            gDigests.add(new GossipDigest(entry.getKey(), generation, maxVersion));
        }

        if (logger.isTraceEnabled())
        {
            StringBuilder sb = new StringBuilder();
            for (GossipDigest gDigest : gDigests)
            {
                sb.append(gDigest);
                sb.append(' ');
            }
            logger.trace("Gossip Digests are : {}", sb);
        }
    }

    public void unsafeAssassinateEndpoint(String address) throws UnknownHostException
    {
        logger.warn("Gossiper.unsafeAssassinateEndpoint is deprecated and will be removed in the next release; use assassinateEndpoint instead");
        assassinateEndpoint(address);
    }

    /**
     * Do not call this method unless you know what you are doing.
     * It will try extremely hard to obliterate any endpoint from the ring,
     * even if it does not know about it.
     *
     * @param address
     * @throws UnknownHostException
     */
    public void assassinateEndpoint(String address) throws UnknownHostException
    {
        InetAddressAndPort endpoint = InetAddressAndPort.getByName(address);
        Assassinate.assassinateEndpoint(endpoint);
    }

    public boolean isKnownEndpoint(InetAddressAndPort endpoint)

View on GitHub (pinned to 88fd0f6a0e)