Mantis - Resin
Viewing Issue Advanced Details
5005 minor always 03-29-12 11:38 06-15-12 16:50
cowan  
ferg  
normal  
closed 4.0.27  
fixed  
none    
none 4.0.29  
0005005: Resin fails to start on Windows with empty server id
Using a resin.xml with a single server configured as shown below, where server id="":

    <server id="" address="127.0.0.1" port="6800">
      <http address="*" port="8080"/>
     </server>

The startup fails on Windows 7 with the following message:

unknown argument '52729'

(52729 is the argument passed to '-socketwait")

The issue appears to be related to command line parsing on Windows and does not appear to be a Resin problem, rather a JVM issue. With the help of a debugger, the argsv[] array to the Main method of Resin is as follows:

argv String[9] (id=37)
    [0] "--root-directory" (id=40)
    [1] "/C:/resin-pro-4.0.27/" (id=41)
    [2] "-conf" (id=42)
    [3] "C:\\resin-pro-4.0.27\\conf\\resin.xml" (id=43)
    [4] "-server" (id=47)
    [5] "-socketwait" (id=48)
    [6] "52786" (id=49)
    [7] "-verbose" (id=51)
    [8] "console" (id=52)


Notice above, -socketwait immediately follows -server.

Now, below is the argsv array from the same palce but on OSX:

argv String[10] (id=38)
    [0] "--root-directory" (id=57)
    [1] "/Users/paul/resin-pro-4.0.27/" (id=58)
    [2] "-conf" (id=59)
    [3] "/Users/paul/resin-pro-4.0.27/conf/resin.xml" (id=60)
    [4] "-server" (id=61)
    [5] "" (id=62)
    [6] "-socketwait" (id=63)
    [7] "53863" (id=64)
    [8] "-verbose" (id=65)
    [9] "console" (id=66)

The command line work properly on OSX because there is another argument there, and blank after the -server.



Notes
(0005723)
cowan   
03-29-12 11:38   
Rep by K. Ding
(0005735)
alex   
04-05-12 14:52   
Is this with java 6 or 7?
(0005736)
cowan   
04-05-12 15:46   
I produced the issue on Windows 7 with JDK 7.

It did not appear on OSX with JDK 6.
(0005865)
ferg   
06-15-12 16:50   
rewrite to -server default internally to avoid the empty string entirely.