Problem with Samples.
Hello.
I'm having some trouble with the samples from Web Server 7.0.
Currently, I'm working with the Simple example,and following the guide that comes with the installation, it says I must modifycommon.properties wih the appropiate values for these fields:
instance.name,
instance.host.name
instance.port
config.name,
vs.name and
passwordfile.path
Supposing that my FQDN would be abc.123.com, these values would be like follows:
instance.name:https-abc.123.com
instance.host.name: abc
vs.name: Whatever the name of the Virtual Server is.
So, the questions are:
1. So far, do I have the correct values in those variables?
2. Which are the values to
instance.port
config.name and
passwordfile.path ? (I'm guessing instance.port would be 8989, but I'm not sure...)
3. With the deployment done, and the .war, I could put the Simple sample online with the Administration GUI, right?
Well, I hope that you can help me, and forgive me if I wrote too much... I tend to do it.
Thanks in advance.
(PS: I guess info on the environment, like OS, and all that is not necessary, right? If it is, please let me know.)
[1310 byte] By [
jsvillava] at [2007-11-27 6:22:23]

# 1
It looks like the values you have are correct. The configuration name is something you usually give when creating a new configuration, but assuming you have a default install, and have not created a new configuration, the the config name is the fully qualified name of the host. You can verify this looking at the files in the installation directory. There you will find a directory like https-hostname. That directory name is the instance name and the past after "https-" is the config name.
The port can also be define by you when creating the configuration, but assuming you have the default values, it should be port 80. It is the instance port and not the admin port. You can see this value in the http-listener page in the GUI.
The passwordfile.path is the full location of the file where the admin password is kept, so it can be read automatically from there.
3. I don't exactly understand what you mean with putting the sample online with the Admin GUI. After you deploy the the web app, following the steps in the sample documentation, you should be able to have it running in the instance. No need to redeployed with the admin GUI.
# 2
Thanks for your post, it cleared me a lot of things...
But i still can't find the password file. I tried with a file called configurator.properties in "setup" folder, but it doesn't have the required format. As your assupmtion of me having default values was correct, could you tell me where this file is located in a default installation?
> 3. I don't exactly understand what you mean with
> putting the sample online with the Admin GUI. After
> you deploy the the web app, following the steps in
> the sample documentation, you should be able to have
> it running in the instance. No need to redeployed
> with the admin GUI.
So, are the steps of the sample documentation independent from the deployment with the GUI?
And, if that's true, and if I'd try to deploy a web-app from the GUI (and it can be done with the pre-compiled .war that all sample files have), 縲ouldn't I have to modify the common.properties file?
Thanks for your answer.
Message was edited by:
jsvillav
Message was edited by:
jsvillav
# 3
Yes the steps are independent from the GUI.
The password file you need to create yourself. To do this use the htpasswd utility in the bin directory of your webserver installation, for example
$ /sun/webserver7/bin/htpasswd
Usage: htpasswd [-c] passwordfile username [password]
-cCreate a new password file.
$ /sun/webserver7/bin/htpasswd -c wadmpasswd admin adminadmin
Put this file in a safe directory. Ex.~/.wadm.d
, and point the passwordfile.path value in common.properties to that file.
And you don't need to change common.properties if you deploy using the GUI Why do you think it needed?
# 4
Hello.
I created the file (assuming that in your example, wadmpasswd is the file name, admin is the login for the Webserver, and adminadmin is, well, the password).
But, when i tried to deploy the web-app, it told me:
Each line in the password-file must be of format wadm_<pswdname>=pswd
(The file is written like: admin:XXXXXX, and it asks me to put the file in a format like wadm_<pswdname>=pswd).
Then I, just as a proof, modified the password file to match the format that it asked (knowing that it would fail), and tried to deploy again, but it gave me a different error:
CLI104 Unable to communicate with the administration server: Received fatal alert: protocol_version
Result: 1
Is there a way to change the format of the password file generated by htpasswd?
> And you don't need to change common.properties if you
> deploy using the GUI Why do you think it needed?
Well, I thought I needed to change the file because I tried to get running a web-app with the Administration GUI (the caching one), but when I try to run it (like the example, http://Sun_Java_System_Web_Server_hostname:port/webapps-caching ) it says that the page is not available, and looking in the error logs of the WS instance, it just throws a warning:
for host xxx.xxx.xxx.xxx trying to GET /webapps-caching, send-file reports: HTTP4142:
can't find <install_dir>/<instance>/docs/webapps-caching (File not found)
Thanks for your help.
# 5
My bad. I am sorry for that. Don't use htpasswd. Just create the file manually and add an entry like this:wadm_password=adminpasswordAlso, can you post your common.properties file?
# 6
I did what you told me, and it works perfectly.
But I still can't get access to a web-app if I try to deploy with the Administration GUI, and that's supposed to be the easy way :P. I'd like to know if there's more to it than just selecting the .war.
Thank you very much for your help.
PD: I won't upload the common.properties, since that problem has just been solved. Thanks.
# 7
I tried this deployment manually, and it work well for me.
This is what I did, using the GUI
a ) started from anew by creating a new config
b ) to that new config, I added the webapp (I use the application in server option)
- path: /sun/webserver7/samples/java/webapps/caching/webapps-caching.war
- URI: /web-apps
c) deployed the configuration
d) start the configuration
e) access the web-app at http://hostname:port/web-apps
Page shows app, and application works
# 8
Well, I did steps a and b, but I don't know where to do the next steps. Do I have to do them from a console, or are they done in the GUI?Thanks for your answer.
# 9
I did everything from the GUI. After you add an app to your config, you will see a message in the right-top of your page that says "deployment pending" Click on there to deploy.
Then go back to the configurations tab, select the one with the web-app in click on the start button.
The reason why you will have to deploy a config after doing changes to it (like adding a new web app), is because you could be doing a lot of changes to your config, and might not want them to be deployed automatically everytime, because they are either incomplete, or depending of other changes, or because you might have a large setup, with several nodes, in which each deployment takes some time.
Oops. that is me, nsegura. I just signed with my old SDN account
# 10
Thanks, it worked perfectly.