Skip to content
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

httpbin.org down #9

Open
robert-sanfeliu opened this issue Dec 9, 2024 · 0 comments
Open

httpbin.org down #9

robert-sanfeliu opened this issue Dec 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@robert-sanfeliu
Copy link

httpbin.org seems to be down:

image

Apparently, it also happened recently.

This service is essential for ONM:

public_ip=${4:-$(curl -s http://httpbin.org/ip | grep -oP '(?<="origin": ")[^"]*')}

Consider adding a fallback server to get the IP. Simlarly how is done at waitForMaster:

@Synchronized
def checkIPFromServers() {
    def servers = [
            "checkip.amazonaws.com",
            "api.ipify.org",
            "ifconfig.me",
            "ipinfo.io/ip",
            "icanhazip.com",
            "ident.me",
            "myip.dnsomatic.com"
    ];
    for (def server : servers) {
        def ip = retrieveIPFromServer(server)
        if (ip) {
            println "Address was retrieved from ${server}"
            println "Public IP: ${ip}"
            variables.put("masterIp", ip)
            return ip
        }
    }

    println "Unable to retrieve the public IP from any server."
}
```

Also, add error messages when this variable is not set or any of the necessary variables for the script
@robert-sanfeliu robert-sanfeliu added the enhancement New feature or request label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants