-
Notifications
You must be signed in to change notification settings - Fork 9
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
new check: make sure remote zone connection information is good #129
Comments
Genquery columns have |
Just leaving this here for reference: If we had a backend, we could do something like this (written in AWS Lambda) const NetcatClient = require('netcat/client')
const client = new NetcatClient()
const bytes = "\x00\x00\x00\x33<MsgHeader_PI><type>HEARTBEAT</type></MsgHeader_PI>";
module.exports.handler = async (event) => {
console.log(event);
const hostname = event.queryStringParameters.hostname;
const port = parseInt(event.queryStringParameters.port);
const res = await runFunc(hostname, port);
return {
statusCode: 200,
body: JSON.stringify(
{
result: res,
input: event,
},
null,
2
),
};
};
function runFunc(hostname, port) {
return new Promise((resolve, reject) => {
client.addr(hostname).port(port).connect().send(bytes);
const timeout = setTimeout(() => {
client.close();
resolve('failure');
}, 2000);
client.on('data', (data) => {
clearTimeout(timeout);
if (data.toString() === "HEARTBEAT") {
client.close();
resolve("HEARTBEAT");
}
});
});
} |
Very cool! |
Yes, instead - let's poke the iRODS port directly, and treat the 'invalid' HTTP response as the 'alive' check. This will pollute the iRODS server's log with "readWorkerTask - readStartupPack failed", but we can't do better for now since the browser is not allowed to talk to raw TCP sockets. |
I don't think that this is possible right now for ZMT. I made two GET requests, one to
However, we don't have a way of extracting the From here, we could either:
|
not excited about a ZMT backend. we'd just build this into the server itself... yes, something like a HEARTBEAT that is available via REST/HTTP is probably the better answer. |
Hmm, just thought about this. Would adding a socket connection in the HTTP/REST API be better or would adding a websocket / HTTP API to the main iRODS server code be better? |
we won't open up new things on the iRODS server until well understood and 'contact with the enemy' is proven i think REST/HTTP is first in line for that. |
removing from milestone for now - awaiting new API endpoint(s). |
remote zones each have a hostname and port
The text was updated successfully, but these errors were encountered: