I have documented what I have tested on Windows on the following wiki
page:
http://wikis.sun.com/display/GlassFish/GlassFishProvisioning
It seems that the default directory names have changed with Windows 7.
There the home directory is /Users/<username> where previous versions of
Windows it was /Documents and Settings/<username> So yes depending on
which version you are on you will have different directories to deal
with. I have been testing with Windows 7 and Windows XP machines and
username is cmott and I have documented how things work and what the
user needs to do.
The environment on the remote machine must include Java bin dir in it's
path. I think you are running into a bug that I think Yamini is
fixing. If there is a failure during install-node (like the can't find
the jar command failure) and the zip file is left behind then it will
cause problems the next time install-node tries to zip the installation
of glassfish. Look for the glassfish.zip file and remove it. That
should fix your hang until the fix goes in.
Carla
Elena Asarina wrote:
> Hi Yamini,
>
> I don't think that you've used Win 2008. At least on Win 2008, if ssh
> without password was preconfigured, then ssh home directory became
> C:\cygwin\home\<user_name> and .ssh directory there. I've copied .ssh
> to C:\Users\<user_name> because I dis not want to enter a password.
> setup-ssh did not work without --instaldir. Following your advice,
> I've added --installdir and --archive. Then I saw such messages:
> ===========================================================
> C:\aroot\glassfish3\glassfish\bin>asadmin install-node --archive
> C:\aroot\glassf
> ish.zip --installdir C:\aroot\glassfish3 bigapp-oblade-2
> Created installation zip C:\aroot\glassfish.zip
> Successfully connected to aroot_at_bigapp-oblade-2 using keyfile
> C:\Users\aroot\.ss
> h\id_rsa
> Copying C:\aroot\glassfish.zip (1030556413 bytes) to
> bigapp-oblade-2:C:/aroot/gl
> assfish3
> Installing glassfish.zip into bigapp-oblade-2:C:/aroot/glassfish3
> jar command failed while installing glassfish on host bigapp-oblade-2.
> Command output bash: jar: command not found
>
> Remote command output: bash: jar: command not found
>
> Command install-node failed.
> =========================================================
>
>
> On the second machine I've added java bin directory in a path in the
> user's environment, so when I've executed on second machine:
>
> C:\cygwin\bin>which jar
> /cygdrive/c/aroot/jdk1.6.0_22/bin/jar
>
> But if to execute ssh bigapp-oblade-2 which jar, it will not find jar,
> until a link to the jar will be created in C:\cygwin\bin
>
> C:\cygwin\bin>ln -s /cygdrive/c/aroot/jdk1.6.0_22/bin/jar jar
>
>
> Then with --installdir , with --archive and with jar link, setup-ssh
> started to work.
> C:\aroot\glassfish3\glassfish\bin>asadmin install-node --archive
> C:\aroot\glassf
> ish.zip --installdir C:\aroot bigapp-oblade-2
> Created installation zip C:\aroot\glassfish.zip
> Successfully connected to aroot_at_bigapp-oblade-2 using keyfile
> C:\Users\aroot\.ss
> h\id_rsa
> Copying C:\aroot\glassfish.zip (1030556413 bytes) to
> bigapp-oblade-2:C:/aroot
> Installing glassfish.zip into bigapp-oblade-2:C:/aroot
> Removing bigapp-oblade-2:C:/aroot/glassfish.zip
> Fixing file permissions of all files under bigapp-oblade-2:C:/aroot/bin
> Command install-node executed successfully.
>
> =========================================
>
> Also I want to mention that when an archive was creating, it takes
> long time and was a full illusion that a command hung up, because
> there were no messages for a long time.
>
> Then I've tried with --installdir, but without --archive. I've waited
> during 15 minutes and did not see any response. I don't know is it
> really hung up or made an impression that it hung up.
>
> Thank you,
>
> Elena
>
>
> Yamini K B wrote:
>> Hi Elena,
>>
>> I generally follow the instructions on this page and have not run
>> into any issues so far:
>>
>> http://wikis.sun.com/display/GlassFish/3.1SSH+-+Installing+Windows+Cygwin+sshd
>>
>>
>> I'm able to run setup-ssh also without any issues. I have 2 windows
>> machines with non-admin user and cygwin installed. Just to show you,
>> I deleted the .ssh folder under windows user home as well as cygwin
>> user home on both machines:
>>
>> $ ./asadmin.bat setup-ssh --sshuser Yamini 10.12.152.46
>> SSH key not found for user Yamini
>> Would you like to generate a SSH key pair (without a key passphrase)
>> for Yamini
>> to access [10.12.152.46]? [y/n]: y
>> Enter SSH password for Yamini_at_10.12.152.46>
>> Created directory C:\Documents and Settings\Yamini\.ssh
>> ssh-keygen successfully generated the identification C:\Documents and
>> Settings\Y
>> amini\.ssh\id_rsa
>> Copied keyfile C:\Documents and Settings\Yamini\.ssh\id_rsa.pub to
>> Yamini_at_10.12.
>> 152.46
>> Successfully connected to Yamini_at_10.12.152.46 using keyfile
>> C:\Documents and Set
>> tings\Yamini\.ssh\id_rsa
>> Command setup-ssh executed successfully.
>>
>> Yamini_at_crux /home/yamini/gf/glassfish3/glassfish/bin
>> $ ssh Yamini_at_10.12.152.46 ls
>> The authenticity of host '10.12.152.46 (10.12.152.46)' can't be
>> established.
>> RSA key fingerprint is 1b:41:35:ec:55:fc:3b:15:91:51:9f:24:e6:eb:9d:43.
>> Are you sure you want to continue connecting (yes/no)? yes
>> Warning: Permanently added '10.12.152.46' (RSA) to the list of known
>> hosts.
>> Yamini_at_10.12.152.46's password:
>>
>> Yamini_at_crux /home/yamini/gf/glassfish3/glassfish/bin
>> $ pwd
>> /home/yamini/gf/glassfish3/glassfish/bin
>>
>> Yamini_at_crux /home/yamini/gf/glassfish3/glassfish/bin
>> $ ls ~/.ssh
>> known_hosts
>>
>> Yamini_at_crux /home/yamini/gf/glassfish3/glassfish/bin
>> $ cp /cygdrive/c/Documents\ and\ Settings/Yamini/.ssh/id_rsa ~/.ssh
>>
>> Yamini_at_crux /home/yamini/gf/glassfish3/glassfish/bin
>> $ ssh Yamini_at_10.12.152.46 ls
>> gf
>>
>> setup-ssh will generate the key pair under windows user home since it
>> is not aware of cygwin home. Hence, I manually copy the key to the
>> cygwin home folder. You can also see that setup-ssh was able to
>> verify the connection and also the the last command above succeeds
>> with key auth. On remote host, I didn't do any manual step.
>>
>> Regards,
>> -Yamini
>>
>> Yamini_at_crux /home/yamini/gf/glassfish3/glassfish/bin
>>>
>>> Hi Joe,
>>>
>>> I've tried to run many times ssh-host-setup not under Administrator
>>> user, but under another user with administrator privileges. It
>>> doesn't work. First passwd command doesn't allow to setup a
>>> password. Second service creation always failed. But it works fine
>>> under Administrator user, and then the created service is available
>>> for other users. But anyway, if would C:\cygwin\home\<user_name>
>>> directory would be created, it would not help setup-ssh, because
>>> setup-ssh is looking for C:\home\<user_name> directory.
>>>
>>> Thank you,
>>> Elena
>>>
>>>
>>> Joe Di Pol wrote:
>>>>
>>>> Elena,
>>>>
>>>> It is a prerequisite that the SSH account is configured for the
>>>> user before you run setup-ssh. So you must have ssh working
>>>> to the point where you can SSH into the system as the user you want
>>>> (using username/password) before running setup-ssh. When setting
>>>> up an account with the cygwin tool's the user's home directory
>>>> should be created.
>>>>
>>>> Joe
>>>>
>>>>
>>>> Elena Asarina wrote:
>>>>> Hi All,
>>>>>
>>>>> I want to share my last experience with using setup-ssh command
>>>>> on pure cygwin machines. In general, the command proved again
>>>>> that it is useless. I've executed ssh-host-config under
>>>>> Administrator user, because only under Administrator can be
>>>>> executed passwd command and service can be created. Then I've
>>>>> logged in as another user (aroot) , checked that ssh service
>>>>> started and tried to configure ssh without password, using
>>>>> setup-ssh. It failed immediately telling that a directory
>>>>> /home/aroot doesn't exist. I've created C:\home\aroot (on both
>>>>> machines), then was created C:\home\aroot\.ssh dir with
>>>>> correspondent files, but connection - failed.
>>>>>
>>>>> Then I've executed ssh-keygen, that command first reported that
>>>>> /home/aroot doesn't exist. After that I understood that really has
>>>>> to be used C:\cygwin\home\aroot dir, so I've created aroot dir
>>>>> under C:\cygwin\home\, then ssh-keygen was executed successfully
>>>>> and I was able to configure ssh without password, using
>>>>> C:\cygwin\home\aroot\.ssh directories.
>>>>>
>>>>> Bottom line, because ssh-host-config was executed under
>>>>> Administrator, then only Administrator subdirectory was created
>>>>> under C:\cygwin\home\, to be able to execute successfully
>>>>> ssh-keygen I was need to create aroot dir manually, then
>>>>> everything went smoothly. But setup-ssh tried to configure
>>>>> everything under C:\home\aroot and it did not work.
>>>>>
>>>>> I believe I had absolutely typical cygwin installation and
>>>>> probable setup-ssh would work the same way for other cygwin users.
>>>>>
>>>>> Thank you,
>>>>> Elena
>>>>>
>>>>>
>>>>