Discussion:
cockpit-bridge
Paul Cuzner
2018-11-07 23:35:33 UTC
Permalink
Hi,

I'm writing a plugin which uses cockpit.http to talk to an API server on
localhost. On Fedora 28/29 the calls through cockpit.http work fine, but
I'm having problems when testing the code against RHEL7.6.

On RHEL I'm seeing this error in the cockpit-bridge
Nov 07 17:20:45 rh76-cockpit cockpit-bridge[7698]:
https://localhost:5001api/v1/hosts/ceph-1:
couldn't read: Error receiving data: Connection reset by peer
Nov 07 17:20:45 rh76-cockpit cockpit-bridge[7698]:
https://localhost:5001api/v1/hosts/ceph-1: close failed: Error sending
data: Broken pipe

The connection reset issue stops my app. It's not caught in a promise
.catch method either.

As an example, here's the js code that I'm using

export function deleteHost(hostName, svcToken) {
console.log("removing " + hostName + " from the inventory");
let url = "/api/v1/hosts/" + hostName;
return http.request({
path: url,
body: {},
method: "delete",
headers: {Authorization: svcToken}
});
}


RHEL 7.6 has cockpit 173 - but the versions of Fedora I've been testing
with were 179-181(I think). RHEL has selinux in permissive mode, and the
firewall down.

Could anyone shed any light on why the bridge hit's this error on older
versions? The API server I'm talking to is the same, and it's responding
with a http 200!

Thanks,

Paul C
Paul Cuzner
2018-11-08 04:42:13 UTC
Permalink
This now looks like an app library problem. My API server is using flask -
and with the rpm version I see these connection resets - but when I remove
the rpm versions and pull them in from pypi everything works.

Apologies for the SPAM!
Post by Paul Cuzner
Hi,
I'm writing a plugin which uses cockpit.http to talk to an API server on
localhost. On Fedora 28/29 the calls through cockpit.http work fine, but
I'm having problems when testing the code against RHEL7.6.
On RHEL I'm seeing this error in the cockpit-bridge
https://localhost:5001api/v1/hosts/ceph-1: couldn't read: Error receiving
data: Connection reset by peer
https://localhost:5001api/v1/hosts/ceph-1: close failed: Error sending
data: Broken pipe
The connection reset issue stops my app. It's not caught in a promise
.catch method either.
As an example, here's the js code that I'm using
export function deleteHost(hostName, svcToken) {
console.log("removing " + hostName + " from the inventory");
let url = "/api/v1/hosts/" + hostName;
return http.request({
path: url,
body: {},
method: "delete",
headers: {Authorization: svcToken}
});
}
RHEL 7.6 has cockpit 173 - but the versions of Fedora I've been testing
with were 179-181(I think). RHEL has selinux in permissive mode, and the
firewall down.
Could anyone shed any light on why the bridge hit's this error on older
versions? The API server I'm talking to is the same, and it's responding
with a http 200!
Thanks,
Paul C
Stef Walter
2018-11-08 08:48:57 UTC
Permalink
No worries. Did you see the same behavior when accessing your flask
service with curl? If not, you may have run into a bug in the HTTP
client code of Cockpit, and I'd be interested in reproducing.

Stef
Post by Paul Cuzner
This now looks like an app library problem. My API server is using flask
- and with the rpm version I see these connection resets - but when I
remove the rpm versions and pull them in from pypi everything works.
Apologies for the SPAM!
Hi,
I'm writing a plugin which uses cockpit.http to talk to an API
server on localhost. On Fedora 28/29 the calls through cockpit.http
work fine, but I'm having problems when testing the code against
RHEL7.6.
On RHEL I'm seeing this error in the cockpit-bridge
https://localhost:5001api/v1/hosts/ceph-1: couldn't read: Error
receiving data: Connection reset by peer
https://localhost:5001api/v1/hosts/ceph-1: close failed: Error
sending data: Broken pipe
The connection reset issue stops my app. It's not caught in a
promise .catch method either.
As an example, here's the js code that I'm using
export function deleteHost(hostName, svcToken) {
console.log("removing " + hostName + " from the inventory");
let url = "/api/v1/hosts/" + hostName;
return http.request({
path: url,
body: {},
method: "delete",
headers: {Authorization: svcToken}
});
}
RHEL 7.6 has cockpit 173 - but the versions of Fedora I've been
testing with were 179-181(I think). RHEL has selinux in permissive
mode, and the firewall down.
Could anyone shed any light on why the bridge hit's this error on
older versions? The API server I'm talking to is the same, and it's
responding with a http 200!
Thanks,
Paul C
_______________________________________________
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
_______________________________________________
cockpit-devel mailing list -- cockpit-***@lists.fedorahosted.org
To unsubscribe send an email to cockpit-devel-***@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedorahosted.or

Continue reading on narkive:
Loading...