glassfish
  1. glassfish
  2. GLASSFISH-15471

better error message when unable to connect to the server

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1_b36
    • Fix Version/s: None
    • Component/s: command_line_interface
    • Labels:
      None

      Description

      request a better error message when unable to connect to the server, but the --host option is the default localhost, as shown in use case below. In this case, asadmin should be able to look at the local domain information and see what the port might be to determine if the server(s) is running.

      ==========
      Use case:
      ==========
      if i change domains/domain1/domain.xml
      admin-listener port="46612" i get errors below. if i change admin-port back to 4848 it doesn't error.

      // start domain1 on non-default port 46612
      $ ./asadmin start-domain domain1
      Waiting for domain1 to start ................
      Successfully started the domain : domain1
      domain Location: /space/glassfish3/glassfish/domains/domain1
      Log File: /space/glassfish3/glassfish/domains/domain1/logs/server.log
      Admin Port: 46612
      Command start-domain executed successfully.

      $ ./asadmin list-components
      Remote server does not listen for requests on [localhost:4848]. Is the server up?
      No such local command, list-components. To run remote commands, start the application server (e.g. 'asadmin start-domain').
      Command list-components failed.

      $ ./asadmin list-components domain
      Remote server does not listen for requests on [localhost:4848]. Is the server up?
      No such local command, list-components. To run remote commands, start the application server (e.g. 'asadmin start-domain').
      Command list-components failed.

      From this output above, I knew I did asadmin start-domain, and pieced together that it is a port problem when i saw 4848, knowing I switched my admin-port to non-default. Would be better to be explicitly told it's a port problem if we know that is cause.

      can this reporting be more helpful when I'm not using default admin port? Maybe something like:

      $ ./asadmin list-components
      Remote server does not listen for requests on [localhost:4848]. Detected that server is up, but using non-default admin-port, so pass --port <port_number> option.
      No such local command, list-components. To run remote commands, start
      the application server (e.g. 'asadmin start-domain').
      Command list-components failed.

      Here is the motivation/use case email thread from users@glassfish.java.net reiterating as to why this is requested:

      http://java.net/projects/glassfish/lists/users/archive/2011-01/message/56

        Activity

        jbenoit created issue -

          People

          • Assignee:
            Bill Shannon
            Reporter:
            jbenoit
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: