[jbosstools-issues] [JBoss JIRA] (JBIDE-18274) AS7/WildFly8/EAP6 with oracle java 7 fails to start when bound to your hostname

Martin Malina (JIRA) issues at jboss.org
Tue Jun 23 11:09:05 EDT 2015


    [ https://issues.jboss.org/browse/JBIDE-18274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082915#comment-13082915 ] 

Martin Malina commented on JBIDE-18274:
---------------------------------------

OK, so this is my java file:
{code}
package javaproj;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.HttpURLConnection;
import java.net.URLConnection;

public class ServerCheck {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		if(onePing("http://nattura.brq.redhat.com:8080")) {
			System.out.println("true");
		}
		else {
			System.out.println("false");
		}

	}

	private static boolean onePing(String url) {
		URLConnection conn = null;
		try {
			URL pingUrl = new URL(url);
			conn = pingUrl.openConnection();
			((HttpURLConnection)conn).getResponseCode();
			return true;
		} catch( FileNotFoundException fnfe ) {
			return true;
		} catch (MalformedURLException e) {
			// Should NEVER happen since the URL's are hand-crafted, but whatever
			//Status s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, e.getMessage(), e);
			//JBossServerCorePlugin.getDefault().log(s);
		} catch (IOException e) {
			// Does not need to be logged
			return false;
		} finally {
			if( conn != null ) {
				((HttpURLConnection)conn).disconnect();
			}
		}
		return false;
	}

}
{code}

And it returns true. And yet, the server view is in "Starting" status.

The steps to reproduce are still the same. I tried this today with JBDS 9.0.0.Beta1, WildFly 8.2, Oracle JDK 1.7, OS X 10.10 Yosemite. As the steps describe, this server is created using runtime detection, so naturally it's using the Local server mode.

> AS7/WildFly8/EAP6 with oracle java 7 fails to start when bound to your hostname
> -------------------------------------------------------------------------------
>
>                 Key: JBIDE-18274
>                 URL: https://issues.jboss.org/browse/JBIDE-18274
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 4.2.0.CR1
>            Reporter: Martin Malina
>            Assignee: Rob Stryker
>            Priority: Minor
>             Fix For: 4.3.0.Beta2
>
>         Attachments: server-adapter.png, server-editor.png, server-logs.png, server-runtime.png
>
>
> This is a follow up of JBIDE-17935 .
> Previously, Rob fixed this:
> {quote}
> I've surprisingly been able to replicate this and it's a race-condition. I'll need to synchronize some variables in this class here.
> {quote}
> But in this rare case it still fails for me.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jbosstools-issues mailing list