openshift / openshift-restclient-java

Other
78 stars 112 forks source link

exec error with Java Client #467

Closed waytoharish closed 3 years ago

waytoharish commented 3 years ago

Hi Team, I am trying to run `exec with java code but getting bellow error - java.net.ProtocolException: Expected HTTP 101 response but was '400 Bad Request'. Please could some have a look and help me how to fix this. My OpenShift cluster version is 3.11-

Below is My Java Code- String[] echoCommand = { "echo", "a", "b", "c" }; IPodExec.Options options = new IPodExec.Options(); options.container("backup1");

    TestExecListener echoListener = new TestExecListener();
    PodExec podExec = new PodExec(pod, client);
    IStoppable stoppable =pod.accept(new CapabilityVisitor<IPodExec, IStoppable>() {
        @Override
        public IStoppable visit(IPodExec capability) {
            System.out.println(ipod.getName());
            return capability.start(echoListener, options, echoCommand);
        }
    }, null);

    echoListener.testDone.await(60, TimeUnit.SECONDS);
    System.out.println(echoListener.failureCalled.get());
    System.out.println(echoListener.messages.size());
openshift-bot commented 3 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot commented 3 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot commented 3 years ago

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-ci[bot] commented 3 years ago

@openshift-bot: Closing this issue.

In response to [this](https://github.com/openshift/openshift-restclient-java/issues/467#issuecomment-917193513): >Rotten issues close after 30d of inactivity. > >Reopen the issue by commenting `/reopen`. >Mark the issue as fresh by commenting `/remove-lifecycle rotten`. >Exclude this issue from closing again by commenting `/lifecycle frozen`. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.