Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SSLHandshakeException certificate_required on linux server

Featured Replies

I am trying to access my api from java but I get the following error:

javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_required


I do not get this error when I test the code on my personal Windows computer. But this error does occur on my linux production server running Ubuntu with openjdk 11.

The server is hosted on that same ubuntu server, and proxied with Cloudflare SSL Full

HttpsURLConnection con = null;
    try {
        URL url = new URL("https://www.example.com/");
        con = (HttpsURLConnection) url.openConnection();
        con.addRequestProperty("XF-Api-Key", "key");
        con.addRequestProperty("XF-Api-User", "1");
        con.setConnectTimeout(5000);
        con.setReadTimeout(5000);
        con.addRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
        con.setRequestMethod("GET");
        con.setRequestProperty("Content-Type", "application/json");
        try {
            BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
            String inputLine;
            StringBuffer content = new StringBuffer();
            while ((inputLine = in.readLine()) != null)
                content.append(inputLine);
            in.close();

            System.out.println(content.toString());
        } catch (Exception e) {
            e.printStackTrace();
            BufferedReader in = new BufferedReader(new InputStreamReader(con.getErrorStream()));
            String inputLine;
            StringBuffer content = new StringBuffer();
            while ((inputLine = in.readLine()) != null) {
                content.append(inputLine);
            }
            in.close();
            System.out.println(content.toString());
        }
    } catch (Exception exp) {
        System.out.println("Cant load data from API");
        exp.printStackTrace();
    } finally {
        if (con != null)
            con.disconnect();
    }


Is something not configured properly on my linux server?

 

hopefully youve found a solution for this by now. with SSL, are the root certificates up to date on the linux host? im not a linux person but this can sometimes cause issues on windows

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.