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

Unwanted log ERROR: Connection refused (Connection refused) #316

Open
toschneck opened this issue Mar 7, 2018 · 1 comment
Open

Unwanted log ERROR: Connection refused (Connection refused) #316

toschneck opened this issue Mar 7, 2018 · 1 comment

Comments

@toschneck
Copy link
Contributor

PROBLEM:
Sometimes Sakuli prints out after all is down the following log line

ERROR [2018-03-07 19:19:27.543] - Connection refused (Connection refused)

This comes from the Sahi ShutDownHookl class. When System.exit() is called at the SakuliStarter. This is basically no Error because the Sahi Proxy is just already down.

TODO:

  • Find a way to suppress this misleading log message
    • Logger
    • Maybe Aspect around and call the hook earlier
public class ShutDownHook implements Runnable {
    private String sahiHost;
    private String port;
    private String sessionId;

    public ShutDownHook(String sahiHost, String port, String sessionId) {
        this.sahiHost = sahiHost;
        this.port = port;
        this.sessionId = sessionId;
    }

    public void run() {
        try {
            System.out.println("Shutting down ...");
            String urlStr = "http://" + this.sahiHost + ":" + this.port + "/_s_/dyn/Suite_kill/?sahisid=" + this.sessionId;
            URL url = new URL(urlStr);
            url.getContent();
        } catch (IOException var3) {
            System.err.println(var3.getMessage());
        }

    }
}
@toschneck
Copy link
Contributor Author

Around aspect like:

public String[] getCommandTokens(ProceedingJoinPoint joinPoint, String commandString) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant