Wildfly Server local server debug panel shows error "http connector is not enabled for server profile" - intellij-idea

I setup a local JBoss/Wildfly server launch configuraiton in Intellij Idea. When I attempt to start the server, the configuration panel pops up and shows following error.
Error: HTTP connector is not enabled for server profile
I could not find anything in the Idea help what this means and how to fix it. The server is a keycloak distro but is just plain wildfly 10 with an extra subsystem.
Has anyone seen this before and knows how to fix the error?

I can't reproduce this with fresh installation of keycloak 3.2.1 from here
IDEA looks for the 2 following xpath's searching for a HTTP connector settings:
"/ns:server/ns:profile/*[local-name()='subsystem']/*[local-name()='server']/*[local-name()='http-listener'][#*[local-name()='socket-binding' and .='http']]",
"/ns:server/ns:profile/*[local-name()='subsystem']/*[local-name()='connector'][#*[local-name()='socket-binding' and .='http']]"};
For me playing with the fresh keycloak distribution the first xpath hits at the following markup:
<subsystem xmlns="urn:jboss:domain:undertow:3.0">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
Please check your configuration around this place.
If this does not help, please attach your standalone.xml or at least the relevant part of it.

In my case changing of 'JRE' from 'Default' to explicit one (Even though it was the same as it was in parentheses in the default version) solved the problem.

Related

Visual Studio 2015. Failed to register URL for site access is denied IIS Express. Access denied 0x80070005

I enabled SSL in Visual Studio 2015 in order to implement Facebook and Google login locally.
I changed the project URL in the Web tab of the project's properties to https://localhost:44300/ and decorated the controller with the RequireHttps attribute - ref #msdn.
Everything worked fine locally.
I reverted settings to HTTP to test something else and that caused me a problem when I tried to get back to HTTPS.
I found this SO question and tried almost every suggested solution.
Error detail:
Failed to register URL "url" for site "site" application "path".
Error description: Access is denied. (0x80070005).
I had to issue this command in DOS to solve the problem in VS 2015:
netsh http add urlacl url=http://{ip_addr}:{port}/ user=everyone
Strangely this was only needed when I moved the project to a different PC. On the original PC I didn't need it.
Turned out this very answer on the same question thread by Cayne led me to the solution.
The port change didn't work because applicationhost.config file, located in .vs folder specific for VS2015, kept bindings combo of old port for Http and Https as a default setting. No matter how many times did I change port to something else while trying with Http (only got clogged with mass of new web site bindings in the config file) as soon as I wanted to switch back to SSL it ended up with the first bindings combo. The port it complained about that can't be registered any more.
Once I deleted that first bindings combo everything was fine.
I hope this will help someone in the future.
Go to C:\Users{username}\Documents\IISExpress\config and open the applicationhost.config file.
Search for the <sites> tag in the document. You will see some lines similar to the following.
<site name="WebSite1" id="1" serverAutoStart="true">
<application path="/">
<virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:8080:localhost" />
</bindings>
</site>
Replace the line <binding protocol="http" bindingInformation="*:8080:localhost" /> as follows.
<binding protocol="http" bindingInformation="*:{required_port_number}:*" />
I think you can even remove the * marks in bindingInformation.
Then restart IIS Server (remove all IIS server related operations using Task Manager and go to C:\Program Files\IIS Express folder and run iisexpress.exe: you might need to Run as Administrator).
A console will open and if all went well, following lines will be displayed.
Successfully registered URL "http://*:{required_port_number}/" for site "Website1" application "/"
...
Also check in browser whether the required URL works now.
Here's a very useful resource...

JBAS010153: Node identifier property is set to the default value. Please make sure it is unique

I am getting the following WARN message while I start my host which is one of the Host Controller (HC) that is attached to the Domain Controller(DC).
[Server:server-two] 14:06:13,822 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 33) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
And my host-slave.xml has the following config...
<server-identities>
<!-- Replace this with either a base64 password of your own, or use a vault with a vault expression -->
<secret value="c2xhdmVfdXNlcl9wYXNzd29yZA=="/>
</server-identities>
I hope this config is the reason...... maybe I didn't understand..... but I couldn't find node identifier property rather this is the default secret value which I hope could be the cause of this WARN message.
However, I didn't mention HC to lookup host-slave.xml..... the command which I ran to start my HC is.....
[host-~-\-\-\bin]$./domain.sh -Djboss.domain.master.address=nnn.nn.nn.88 -b nnn.nn.nn.89 -bmanagement nnn.nn.nn.89 &
nnn.nn.nn.88 is my DC
Else please advise what's cause of the WARN message.
And please let me know the implication of this WARN message and advise us on the required config to overcome and sort out any consecutive consequences that would've been bound for this WARN.
I'm new to wildfly, and noticed this warning when I started it standalone from eclipse (I'm doing the following tutorial: https://wwu-pi.github.io/tutorials/lectures/eai/020_tutorial_jboss_project.html)
The fix was to add a node-identifier to the core-environment in the subsystem:
<subsystem xmlns="urn:jboss:domain:transactions:2.0">
<core-environment node-identifier="meindertwillemhoving">
<process-id>
<uuid/>
</process-id>
</core-environment>
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
</subsystem>
This is in file [wildfly]\standalone\configuration\standalone.xml.
This is the same answer as https://developer.jboss.org/message/880136#880136
According to WFLY-10541 if you are using WildFly v14.0.0 or newer you can pass the following to the startup script to set the transaction node identifier:
-Djboss.tx.node.id=<some-unique-id>
Setting the node identifier to an unique value is only required for proper handling of XA Transactions.
You can set it as follows in your XML configuration:
<subsystem xmlns="urn:jboss:domain:transactions:6.0">
<core-environment node-identifier="${jboss.tx.node.id}">
It needs to be a unique value up to 23 bytes long.
More about this here: http://www.mastertheboss.com/jboss-server/jboss-configuration/configuring-transactions-jta-using-jboss-as7-wildfly
Building on #kaptan's answer I added the following to the bottom of
bin/standalone.conf:
JAVA_OPTS="$JAVA_OPTS -Djboss.tx.node.id=`hostname -f`
This way I don't have to remember to add the "-Djboss.tx.node.id=" when running up wildfly by hand.
For this <server-identities> is not the issue. In fact, it shouldn't be touched at all.
When JBoss is started in domain mode by domain.sh, by default there will be three servers server-one server-two server-three. When you are running one more HC attached to the DC.... the defaulted server which is in auto-start mode will get clash when we start HC attaching to DC,- by the following command.
[host-~-\-\-\bin]$./domain.sh -Djboss.domain.master.address=nnn.nn.nn.88 -b nnn.nn.nn.89 -bmanagement nnn.nn.nn.89 &
Or by having the host configuration at HC (default host.xml... until unless we choose a different one....).
<domain-controller>
<remote host="${jboss.domain.master.address:nnn.nn.nn.88}" port="${jboss.domain.master.port:9999}" security-realm="ManagementRealm"/>
<domain-controller>
In order to solve this, we need to turn auto-start to false..... And we need to create a new server-group...... To that group we need to add dc-created-server and hc-created-server..... we can choose the appropriate same profile either full-ha or full for both created servers across DC and HC.
SO when we start the group by configuring the required HEAP size including permgen space... You could start both DC and HC.... and in DC you could see both of your-created-servers are started in the created server-group.
DC- Domain Controller
HC- Host Controller
To deploy you need to upload .ear or web-archive in the Application Console. You cannot place it in the deployments folder as how you do in standalone mode with .dodeploy file.
If you upload the same .ear next version do the Replace option instead of the Remove & Add option in the upload process.

RavenDB on a port other than 8080

We are trying to install NServiceBus 4.2.0.0 with RavenDB via the following command:-
nserviceBus.host.exe -install serviceName="xxxx.Server" -displayname="xxxx.Server" -username="domainName\serviceAccountName" -password="serviceAccountPassword"
NServiceBus seems to install however the RavenDB install fails - note we are trying to install under a port other than 8080 - as a result we have placed the line:-
<add name="NServiceBus/Persistence" connectionString="Url = http://localhost:9090" />
...in our config
The error message we receive is:-
[1] WARN NServiceBus.ConfigureRavenPersistence [(null)] <(null)> - Raven could not be contacted. We tried to access Raven using the following url: http://localhost:9090.
If I leave at the default port (8080), everything installs correctly, however I need to change the port because 8080 is already in use
Does anyone have any ideas ?
RavenDB installation is separate from NServiceBus host installation.
To install RavenDB either follow the instructions on RavenDB website or you can install Raven server by using the NServiceBus Powershell cmdlets, see http://docs.particular.net/nservicebus/managing-nservicebus-using-powershell for instructions on how to load the cmdlets.
If you choose to use the cmdlets, you need to execute Install-NServiceBusRavenDB -Port 9090
If you just want to change the RavenDB port, you can do the following:
Note: The paths defined here are from the NServiceBus 4.3.2 installer with default paths
To download the installer, you can visit here: https://github.com/Particular/NServiceBus/releases/download/4.3.2/Particular.NServiceBus-4.3.2.exe
Launch the services management window (i.e. Run services.msc)
Stop service RavenDB
Navigate to the following path: "C:\Program Files\NServiceBus.Persistence.v4"
Edit the Raven.Server.exe.config: <add key="Raven/Port" value="<your port here>" />
Save the config
Start the service
Hit localhost on your new port
You should now be able to hit the RavenDB web on the new port!
Maybe try to change local.config in RavenDB folder.
<?xml version="1.0" encoding="utf-8"?>
<LocalConfig Port="9090" />
then restart raven
To change the port of RavenDb,
IIS
Change the port in IIS :)
here's where mine is set (under bindings)
Development Console
Find the config file of the ravenDb exe or dll (depends if you're running it as an IIS website, windows server or just the console window).
<Root RavenDb folder>\Server\RavenDb.server.exe.config
Set the port, manually in the file. Change the following ...
<add key="Raven/Port" value="*"/>
to
<add key="Raven/Port" value="6969"/>
or whatever port you need/require.
Windows Service
No idea! i've never used it.
Good luck!

SSL Connection / Connection Reset with IISExpress

I'm using the new Visual Studio 2013 with IISExpress for the first time (previously used ASP.net Development server on VS2010). I'm running into issues trying to debug my project.
This is what I see in Chrome:
Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
Error code: ERR_SSL_PROTOCOL_ERROR
I updated my Properies -> web file so that the Project Url uses a https URL now. However, after doing that, I now get a new error when launching:
The connection to localhost was interrupted.
Error code: ERR_CONNECTION_RESET
Thanks
I was getting ERR_CONNECTION_RESET because my Visual Studio 2013/IIS Express configured app port number was NOT in the range :44300-:44398. (I don't recall having to dismiss any warnings to get out of that range.) Changing the port number to something in this range is all I had to do to make it work.
I noticed this after reviewing the netsh http show sslcert > sslcert.txt output and something clicking with stuff I read recently about the port numbers.
Make sure to remove any previous 'localhost' certificates as those could conflict with the one generated by IIS Express. I had this same error (ERR_SSL_PROTOCOL_ERROR), and it took me many hours to finally figure it out after trying out many many "solutions". My mistake was that I had created my own 'localhost' certificate and there were two of them. I had to delete both and have IIS Express recreate it.
Here is how you can check for and remove 'localhost' certificate:
On Start, type → mmc.exe
File → Add/Remove Snap-in...
Select Certificates → Add> → Computer account → Local computer
Check under Certificates > Personal > Certificates
Make sure the localhost certificate that exist has a friendly name "IIS Express Development Certificate". If not, delete it. Or if multiple, delete all.
On Visual Studio, select project and under property tab, enable SSL=true. Save, Build and Run. IIS Express will generate a new 'localhost' certificate.
Note: If it doesn't work, try these: make sure to disable IIS Express on VS project and stopping all running app on it prior to removing 'localhost' certificate. Also, you can go to 'control panel > programs' and Repair IIS Express.
If you're using URLRewrite to force SSL connections in your web.config, it's probably rewriting your localhost address to force https. If debugging with SSL enabled isn't important to you and you're using URLRewrite, consider adding <add input="{HTTP_HOST}" pattern="localhost" negate="true" /> into your web.config file's rewrite section. It will stop the rewrite for any localhost addresses but leave it in place in a production environment.
If you're not using URLRewrite or need to debug using SSL, http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx might help. It's for VS2010, but should suffice for VS2013 as well.
I am summarizing the steps that helped me in resolving this issue:
Make sure the SSL port range(used by IIS express) is between
44300-44398
During installation, IIS Express uses Http.sys to reserve ports 44300
through 44399 for SSL use. This enables standard users (without
elevated privileges) of IISExpress to configure and use SSL. For
more details on this refer here
Run the below command as administrator in Command prompt. This will output the SSL Certificate bindings in the computer. From this list, find out the certificate used by IIS express for the corresponding port :
netsh http show sslcert > sslcert.txt
Look for the below items in the sslcert.txt (in my case the IIS
express was running at port 44300)
IP:port : 0.0.0.0:44300
Certificate Hash : eb380ba6bd10fb4f597cXXXXXXXXXX
Application ID : {214124cd-d05b-4309-XXX-XXXXXXX}
Also look in the IIS express management console (RUN (Ctrl+R) -> inetmgr.exe)
and find if the corresponding certificate exists in the Server Certificates
(Click on the ServerRoot -> under section IIS () -> Open the Server
Certificates)
If your localhost by default uses a different certificate other than the one listed in Step 3, continue with the below steps
netsh http delete sslcert ipport=0.0.0.0:44300
netsh http add sslcert ipport=0.0.0.0:44300 certhash=New_Certificate_Hash_without_space appid={214124cd-d05b-4309-XXX-XXXXXXX}
The New_Certificate_Hash will be your default certificate tied-up with your localhost (That we found in step 4) or the one which you want to add as a new certificate.
P.S. Thank you for your answer uosɐſ (which helped me in resolving this issue)
The problem that I was experiencing had to do with me, at some point in time, enabling HSTS for localhost and not realizing that this would break my http://localhost:someport in IIS Express.
HSTS tells the browser (Chrome in my case) to ALWAYS request a URL using HTTPS. So therefor even though I hadnt even enabled SSL for my MVC 5 app, the browser would still try to access my site using HTTPS in the URL instead of HTTP.
The fix?
Surf to chrome://net-internals/#hsts
In the delete section, enter "localhost" and delete the record from Chrome.
None of the above options worked for me. I had to do the following:
Uninstalled IIS Express 8.0
Deleted all the configurations in my Documents directory for IIS Express
Reinstalled IIS Express 8.0
Deleted the project on my local machine and downloaded a clean version for TFS
Ran the project - it then ran over SSL and I am able to debug
I got the steps from this thread.
Hope this helps.
The issue that I had was related to #Jason Kleban's answer, but I had one small problem with my settings in the Visual Studio Properties for IIS Express.
Make sure that after you've changed the port to be in the range: 44300 to 44399, the address also starts with HTTPS
In my case, I created a self-signed certificate and had it working, except I was getting an error in the browser because the certificate was untrusted. So, I moved the cert into the Trusted Root Certification Authorities > Certificates folder in the Certificates snapin. It worked, and then I closed Visual Studio for the day.
The following day, I started my project and I received the error mentioned in the original question. The issue is that the certificate you configured IISExpress with must exist in the Personal > Certificates folder or HTTPS will stop working. Once IIS Express successfully starts, you can drag the cert back to the trusted location. It'll continue to work until you restart IIS Express.
Not wanting to fuss with dragging the cert back and forth every time, I just place a copy of the certificate in both places and now everything works fine.
I have a same problem in Visual Studio 2015. Because I use SSL binding in web.config
<rewrite>
<rules>
<rule name="HTTP to HTTPS Redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
</rule>
</rules>
</rewrite>
And I can fix the problem with the answer of Mr.djroedger. By replacing
<add input="{HTTPS}" pattern="off" />
with
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
into my web.config, so my code is
<rewrite>
<rules>
<rule name="HTTP to HTTPS Redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
</rule>
</rules>
</rewrite>
Removing IISExpress and vs directories and using ssl port range of 44300 to 44399 (inclusive) from this article worked for me
In my case, I was getting this exact error running on port 443, and (for reasons I won't go into here) switching to a different port was not an option. In order to get IIS Express to work on port 443, I had to run this command...
C:\Program Files\IIS Express>IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:443/ -UseSelfSigned
Much thanks to Robert Muehsig for originally posting this solution here.
https://blog.codeinside.eu/2018/10/31/fix-ERR_CONNECTION_RESET-and-ERR_CERT_AUTHORITY_INVALID-with-iisexpress-and-ssl/
I was having this problem, I had configured my site for global require https in FilterConfig.cs.
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
filters.Add(new RequireHttpsAttribute());
}
I had forgotten to change the project url to https: from this tutorial http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/ under ENABLE SSL part 4. This caused the errors you were getting.
Another problem that happened me twice:
In IIS Express's applicationhost.config the order of the bindings does matter. One binding could take precedence over your SSL binding, making it not working.
Example:
<site name="MySite007" id="1">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\myuser\projects\mysolutionfolder\MyProject.Service" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":8081:localhost" />
<binding protocol="http" bindingInformation=":8080:" /><!-- evil binding -->
<binding protocol="https" bindingInformation="*:44327:localhost" />
</bindings>
</site>
You may have added a binding similar to the second one to be able to access your WebService from outside localhost. Because this binding listens on any adress, it seems to override the SSL binding although a different port was used.
Remove the evil binding or move it down.
For me it worked using the solution provided in the blog here.
C:\Program Files (x86)\IIS Express\IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44387/ -UseSelfSigned
use the port that your project uses for https.
This is anecdotal as overheard from a co-worker, but allegedly this is an issue with chrome forcing https. I usually launch in firefox so i hadn't seen this problem before. Using firefox or ie worked for my co-worker.
If you need to use a port outside of the 44300-44399 range, here's a workaround:
Create a new site in IIS (not Express)
Bind HTTPS to the port you need
For SSL Certificate, choose IIS Express Development Certificate
Once the site is created, stop it, since it doesn't actually need to be running
This registers the IIS Express Development certificate with that port and is the easiest way I've found to get around the 44300-44399 range requirement.
My problem was caused by Fiddler. When Fiddler crashes it occasionally messes with your proxy settings. Simply launching Fiddler seemed to fix everything (perhaps it repairs itself somehow).
To follow on to other answers about setting the SSL port between 44300 and 44399, I was unable to change the SSL Enabled property in Visual Studio, nor set a specific SSL URL. Other answers, like repairing IIS Express did not help. The solution was to go into the .vs folder parallel to the sln file, open the config subfolder, and then edit the applicationhost.config file. Then, I added the https line manually and restarted VS.
<binding protocol="http" bindingInformation="*:24941:localhost" />
<binding protocol="https" bindingInformation="*:44301:localhost" />
The 'Digicert certificate installation checker' is often helpful in situations like this.
I was able to verify the SSL cert being attempted was the one I was expecting by comparing the serial number.
For me #Jason Kleban answer was the actual problem, but this can be a very useful utility to check your basic assertions about what certificate is being loaded.
In my case after trying everything for three days, solved by just starting Visual Studio by "Run as Administrator."
KASPERSKY ISSUE!! I'd tried everything, localhost with SSL worked if I ran VS2019 as Administrator, but the connection was lost after a while of debugging, and I had to re-run the app. The only worked for me was uninstall Kaspersky, unbelievable, days ago I'd tried to pause Kaspersky protection and it didn't solve the problem, so I had discarded antivirus issues, after days of trying solutions, I resumed antivirus matter, uninstalled Kaspersky V 21.1 ..., tried and worked, installed V 21.2 ... and it works fine also without running VS as Administrator
I had the same issue running Rider/VS, both were using IIS Express to run it. I was having the issue with Postman, Chrome, Firefox and front end application calling it.
Turns out that because my laptop was appropriated for me when i started working for this company the previous developer had clicked No when asked if he wanted to use the Developer Cert the first time he ran IIS Express.
This was fixed on Windows 10 by going to Add Remove Programs (from the new UI there is a link on the right to launch the classic application for Adding and Removing Programs) then Repair IIS 10.0 or 8 or whatever version you are running.
Then try running the application again (I did this in VS but assume that Rider would do the same) and when asked whether you would like to use the Developer Certificate you click YES.
Hours wasted on this, but all sorted after that!
I'd just rebuilt my computer. This thread gave me the clues, where I realized in the project settings>Web, the project was configured to use HTTP and the HTTP port. By updating it to HTTPS and the correct HTTPS port, everything started to work again.
In my case I'd simply forgotten I had a binding set up for (in my case) https://localhost:44300 in full IIS. You can't have both!
In my case, the localhost url was redirected to https://localhost when I was debugging. This happened from one moment to other, without changing anything. I solved this by making a hard reload to the browser. Here the link
I had similar issue where my application's swagger(running on SSL port 44319) stopped working suddenly and I got ERR_CONNECTION_RESET error.
After doing a little research, I found that port 44319 was removed from the list of allow ports for SSL connection - found using this command netsh http show sslcert > sslcert.txt.
I then had to add back port 44319 to SSL allowed ports using netsh http add sslcert ipport=0.0.0.0:44319 certhash=YOUR_CERT_HASH appid={YOUR_APP_ID}.
To find the certhash and appid, you can use output of first command. This worked for me!

Getting request and creating HTTP response using Tomcat

I am currently trying to use embeded Tomcat for my application and am trying to set it up to get the URL of the http request.
Some Background:
I am using the same code as in the first answer for the post here : Howto embed Tomcat 6?
The only change I have made is :
private String catalinaHome = "/home/xyz/tomcat"; // This dir is created and has full access permissions
Also , I am looking at: http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/startup/Embedded.html
There are no server.xml and tomcat-users.xml that I could find, so I created a tomcat-users.xml since I was getting an exception :Memory database file /home/xyz/tomcat/conf/tomcat-users.xml cannot be read .
tomcat-users.xml:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
The code uses container.setRealm(new MemoryRealm());
It appears from here : http://tomcat.apache.org/tomcat-4.1-doc/catalina/funcspecs/fs-memory-realm.html that I should have a server.xml file and there should already be one created by default.
1] Do I need to create a server.xml, what should be the default in it ?
I have put a file with default from here : http://www.akadia.com/download/soug/tomcat/html/tomcat_server_xml.html , but just want to know what is the right thing to do ?
2]When I access http://localhost:8089/mywebapp/index.html, all i get is The requested resource () is not available, though I have an index.html page at the "webappDir" in the code
3] My only need from the embedded tomcat is to intercept so as to get the URL passed to tomcat in my code. I can then parse the URL [do my stuff] and then create a http payload and send an http response back.
I would appreciate any pointers, especially for 3] ?
Thanks!
Ok, for your first question, yo do not need server.xml. If you check the code of your initial post they are setting the parameters there. So that is what server.xml would encapsulate. In reality what happens is that Tomcat will parse server.xml for the properties you are defining on your java file where you instanciate the catalina call to start. But since it is embedded you are setting all those parameters on you class instead.
For your second question, check your logs directory and see what is being parsed. Something is happening after your service starts because it should already redirect you once you call the port. either way, just try http://localhost:8089 and see what you get back in return from tomcat. It should give you some kind of response back from the server itself.
if you do it like this "http://localhost:8089/mywebapp/index.html" you are trying to access a created context, and that might not be configured correctly, but that is just a guess right now.
Try this first and tell me what you get back. we can troubleshoot from this point and see if I can help more in that sense.
Quick question, is this windows or linux you are installing on?
If it is linux the configurations filea are located usually on /etc/tomcat6. (at least on ubuntu they are). Reply back with the version you have installed. I might be able to help you out.
I guess I should also elaborate here a little more. Tomcat is a service in linux as well, so in ubuntu you have to start tomcat in order to access it.
$: sudo service tomcat6 start
then it starts tomcat on port 8080 (usually if not changed) of your localhost. hence you type localhost:8080 to access the website for configuration of tomcat that gives you a It works prompt for you.
Let me know if you have more questions, I will try to respond to the best of my knowledge