Bug: Test Failure: dtest-offheap.auth_test.TestNetworkAuth.test_revoked_dc_access 
Status: Open
Priority: Normal
Created: 26/Jan/22 17:47

https://ci-cassandra.apache.org/job/Cassandra-4.0/315/testReport/dtest-offheap.auth_test/TestNetworkAuth/test_revoked_dc_access/

Failed 1 times in the last 29 runs. Flakiness: 3%, Stability: 96%
Error Message
subprocess.CalledProcessError: Command '('/usr/lib/jvm/java-8-openjdk-amd64/bin/java', '-cp', '/usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar:lib/jolokia-jvm-1.6.2-agent.jar', 'org.jolokia.jvmagent.client.AgentLauncher', '--host', '127.0.0.2', 'start', '1147')' returned non-zero exit status 1.

{code}
Stacktrace
self = <auth_test.TestNetworkAuth object at 0x7f85962f2e20>

    def test_revoked_dc_access(self):
        """
            if a user's access to a dc is revoked while they're connected,
            all of their requests should fail once the cache is cleared
            """
        def test_revoked_access(cache_name):
            logger.debug('Testing with cache name: %s' % cache_name)
            username = self.username()
            self.create_user("CREATE ROLE %s WITH password = 'password' AND LOGIN = true", username)
            self.assertConnectsTo(username, self.dc1_node)
            self.assertConnectsTo(username, self.dc2_node)
    
            # connect to the dc2 node, then remove permission for it
            session = self.exclusive_cql_connection(self.dc2_node, user=username, password='password')
            self.superuser.execute("ALTER ROLE %s WITH ACCESS TO DATACENTERS {'dc1'}" % username)
            self.clear_network_auth_cache(self.dc2_node, cache_name)
            self.assertUnauthorized(lambda: session.execute("SELECT * FROM ks.tbl"))
    
        if self.dtest_config.cassandra_version_from_build >= '4.1':
            test_revoked_access("NetworkPermissionsCache")
    
        # deprecated cache name, scheduled for removal in 5.0
        if self.dtest_config.cassandra_version_from_build < '5.0':
>           test_revoked_access("NetworkAuthCache")

auth_test.py:3131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
auth_test.py:3123: in test_revoked_access
    self.clear_network_auth_cache(self.dc2_node, cache_name)
auth_test.py:3093: in clear_network_auth_cache
    with JolokiaAgent(node) as jmx:
tools/jmxutils.py:309: in __enter__
    self.start()
tools/jmxutils.py:187: in start
    subprocess.check_output(args, stderr=subprocess.STDOUT)
/usr/lib/python3.8/subprocess.py:415: in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

input = None, capture_output = False, timeout = None, check = True
popenargs = (('/usr/lib/jvm/java-8-openjdk-amd64/bin/java', '-cp', '/usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar:lib/jolokia-jvm-1.6.2-agent.jar', 'org.jolokia.jvmagent.client.AgentLauncher', '--host', '127.0.0.2', ...),)
kwargs = {'stderr': -2, 'stdout': -1}
process = <subprocess.Popen object at 0x7f85949eaaf0>
stdout = b"Couldn't start agent for PID 1147\nPossible reason could be that port '8778' is already occupied.\nPlease check the standard output of the target process for a detailed error message.\n"
stderr = None, retcode = 1

    def run(*popenargs,
            input=None, capture_output=False, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.
    
        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
    
        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.
    
        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.
    
        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.
    
        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.
    
        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE
    
        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE
    
        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '('/usr/lib/jvm/java-8-openjdk-amd64/bin/java', '-cp', '/usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar:lib/jolokia-jvm-1.6.2-agent.jar', 'org.jolokia.jvmagent.client.AgentLauncher', '--host', '127.0.0.2', 'start', '1147')' returned non-zero exit status 1.

/usr/lib/python3.8/subprocess.py:516: CalledProcessError
{code}