Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

can not get ScionServer to connect

Help
2010-04-15
2012-12-06
  • Chris Daniels
    Chris Daniels
    2010-04-15

    I am trying to get FP2 to work on linux.

    I am able to get Eclipse to detect the scion server, but the .log states

    !ENTRY net.sf.eclipsefp.haskell.scion.client 4 4 2010-04-15 10:06:56.793
    !MESSAGE The connection with the Scion server could not be established.
    !STACK 0
    The connection with the Scion server could not be established.
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.connectToServer(ScionServer.java:328)
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.startServer(ScionServer.java:73)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance.start(ScionInstance.java:94)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance.runCommandSync(ScionInstance.java:207)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.run(ScionCommand.java:136)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.connectToServer(ScionServer.java:345)
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.connectToServer(ScionServer.java:324)
    … 5 more

     
  • JP Moresmau
    JP Moresmau
    2010-04-15

    The connection uses the loopback interface (127.0.0.1) to a port starting at port 4004. Is there no other messages previously in the log that would point to a problem launching scion-server? You can try to connect to it from outside Eclipse to see if it's running, and you can try to run the server yourself and see if you can connect via telnet or something.

     
  • Chris Daniels
    Chris Daniels
    2010-04-15

    Sorry, no messages about the scion server before that.

    I checked to see that the scion server exists by doing a 'ps | grep scion', and it does.

    Doing a telnet do 127.0.0.1 -4004 does not work

    Opening a scion by itself and forcing it to port 4004 (it defaults to 4005),  will allow me to telnet using the correct address, but eclipse still will not connect.

     
  • Chris Daniels
    Chris Daniels
    2010-04-15

    This code works when I open a server up on port 4004

    public static void main(String args) {
    Socket socket = null;
            int port=4004;
      
    try {
    socket = new Socket((String) null, port);
    } catch (UnknownHostException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    System.out.println("IOException");
    } finally {
    if (socket != null) {
    try {
    socket.close();
    } catch (IOException e) {
    e.printStackTrace();
    }
    }
    }
    }

    }

    When I open eclipse up, it does not connect to this server.

    A server is created when eclipse is running, I just don't know what the port is, nor can I figure out what port the code is trying to reach.

     
  • Chris Daniels
    Chris Daniels
    2010-04-16

    One other clue

    When I build FP2 I can access Scion, but I get an error.
    When I use the update site with the same build of eclipse, I can not access Scion

    net.sf.eclipsefp.haskell.scion.exceptions.ScionCommandException: The Scion server returned an error of type UnknownCommand:
    The requested method is not supported.
    The command was:
    {
      "id": 5,
      "method": "outline",
      "params": {}
    }
    The response was:
    {
      "error": {
        "message": "The requested method is not supported.",
        "name": "UnknownCommand"
      },
      "id": 5,
      "version": "0.1"
    }
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.processResponseResult(ScionCommand.java:287)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.processResponse(ScionCommand.java:272)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.receiveResponse(ScionCommand.java:206)
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.runCommandSync(ScionServer.java:373)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance.runCommandSync(ScionInstance.java:196)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.run(ScionCommand.java:136)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Caused by: org.json.JSONException: JSONObject not found.
    at org.json.JSONObject.get(JSONObject.java:517)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.processResponseResult(ScionCommand.java:281)
    … 6 more

     
  • JP Moresmau
    JP Moresmau
    2010-04-19

    What do you mean, when you build FP2? You mean building the java plugins? From what you get here, it looks you're trying to connect against a old version of Scion. Scion  didn't have "outline" till I added it. So get scion from my github. Anyway when you start Eclipse you should be able to see on what port and interfaces scion is listening to. On windows I do netstat -an, something similar must exist on your linux. The code starts at 4005 and go up, tries to find a unused port.