kobo / groovyserv

Groovy's startup acceralator.
http://kobo.github.io/groovyserv/
Other
98 stars 10 forks source link

groovyclient(.sh) installed by GVM causes an error #48

Closed nobeans closed 11 years ago

nobeans commented 11 years ago
$ ./groovyclient
Invoking server: '/Users/ynak/.gvm/groovyserv/0.12/bin/groovyserver' -p 1961
Groovy home directory: (none)
Groovy command path: /Users/ynak/.gvm/groovy/current/bin/groovy (found at PATH)
GroovyServ home directory: /Users/ynak/.gvm/groovyserv/0.12
GroovyServ work directory: /Users/ynak/.groovy/groovyserv
Original classpath: (none)
GroovyServ default classpath: /Users/ynak/.gvm/groovyserv/0.12/lib/*    <--- ** this takes some seconds **
WARN: groovyserver is already running as 98300(1961)
./groovyclient: connect: Connection refused
./groovyclient: line 323: /dev/tcp/localhost/1961: Connection refused
./groovyclient: line 327: 5: Bad file descriptor
./groovyclient: line 331: 5: Bad file descriptor

usage: groovyclient [options]
options:
  -Ch,-Chelp                       show this usage
  -Cs,-Chost                       specify the host to connect to groovyserver
  -Cp,-Cport <port>                specify the port to connect to groovyserver
  -Ca,-Cauthtoken <authtoken>      specify the authtoken
 (-Ck,-Ckill-server                unsupported in limited script)
 (-Cr,-Crestart-server             unsupported in limited script)
  -Cq,-Cquiet                      suppress statring messages
  -Cenv <substr>                   pass environment variables of which a name
                                   includes specified substr
  -Cenv-all                        pass all environment variables
  -Cenv-exclude <substr>           don't pass environment variables of which a
                                   name includes specified substr
  -Cv,-Cversion                    display the GroovyServ version

********************************** NOTE ***************************************
  This client scirpt is LIMITED EDITION. So following features are unavailable:
    * Transparent server operations (only starting server is available)
    * Signal handling on client side (Ctrl+C)
    * System.in from client
    * Distinguishable stdout from stderr on client (all responses to stdout)
    * Status code from server ($?)

  If you want to use a client of FULL EDITION:
    * Use a ruby client 'groovyclient.rb'
    * Download a native client for your environment:
        http://kobo.github.io/groovyserv/download.html
    * Build a naitive client on your own:
        http://kobo.github.io/groovyserv/howtobuild.html
*******************************************************************************
nobeans commented 11 years ago

This issue occurs when using groovyclient.sh named as groovyclient.

WORKAROUND: deleted pid-* and authtoken-* files under $HOME/.groovy/groovyserv/ before invoking groovyclient(.sh)

$ rm $HOME/.groovy/groovyserv/authtoken-*
$ rm $HOME/.groovy/groovyserv/pid-*
$ groovyclient -v
-> It would work well.
nobeans commented 11 years ago

Or else, simply you can use groovyserver without deleting files:

$ groovyserver -r
$ groovyclient -v

This is the easiest way.

Dierk commented 11 years ago

works ok for me. can be closed as far as I am concerned. Cool stuff!

nobeans commented 11 years ago

fixed at v0.13