Liferay Webservices not starting - liferay

I'm trying to use Liferays webservices (viewable at /api/jsonws), but my Liferay installation is not starting any of this services. I'm running Liferay 6.1.3 on JBoss 7.2. This problem occures on three different servers. Same Liferay & JBoss setup on all 3. Only difference is that one of those servers had Liferay 6.2 running briefly. 6.2 allowed access to all webservices from /api/jsonws. Sadly I cannot switch back to 6.2 for several reasons.
Got a log entry stating that no service is configured.
16:36:03,291 DEBUG [ServerService Thread Pool -- 268][JSONWebServiceConfigurator:221] Configure JSON web service actions
16:36:03,299 DEBUG [ServerService Thread Pool -- 268][JSONWebServiceConfigurator:236] Configured 0 actions in 7 ms
Same liferay on a local tomcat works pretty fine and starts all webservices. So my question is if there is any kind of global on/off switch or if I have to set any special settings? I'm running out of ideas right now ...
Thanks in advance and regards, Sebastian

It may be worth checking portal-ext.properties file in your server.
There is a setting to turn JSON web services on/off. I guess it may be set as "false" in your case.
#
# Set this property to true to enable JSON web services. Note that setting
# this to false will cause portlets that make JSON web service calls from
# working.
#
json.web.service.enabled=true

Related

Why is w3wp.exe looking through my dotnetcore api path to find web.config?

Using IIS 7 with a deployed dotnetcore 2.1 or 3.1 web API alone in an application pool, we discovered while looking at Process Monitor on the server, the w3wp.exe workers were logging many errors where they were apparently looking for a web.config. They checked every route in the api's route. The expected behavior was that the w3wp.exe (an IIS worker) would "hand off" the request to the dotnetcore application's routing, which would find the endpoint, but instead, it appeared to be also checking for a web.config. The process monitor revealed w3wp.exe QueryOpen NAME NOT FOUND and PATH NOT FOUND errors.
I looked at a few articles and concluded it was a problem with web.config inheritance, and there must be some setting in IIS or a dotnetcore configuration that was dictating the behavior of checking each API route path as if it were a virtual directory folder system that might contain a new web.config. The benefit would be that you could have a different web.config in a sub-application, but we didn't want that benefit and we didn't want these IIS workers blowing up the logs with thousands of these errors throughout the day. We found an insanely simple solution that an IIS admin might say "duh" but will hopefully save someone out there some time.
We found the answer on an old blog.iis.net post about web.config inheritance (https://blogs.iis.net/steveschofield/control-web-config-inheritance-with-iis-7-asp-net-options). There is a configuration called allowsubdirconfig that directs the w3wp.exe worker to check subdirectories for a web.config file. Here's how you change it in IIS applicationhost.config that can be found through IIS Manager:
Go to configuration editor
Go to system.applicationHost => sites => virtual directory defaults
Set allowSubDirConfig to False
We also discovered that Microsoft recommends you use this setting for hosting dotnetcore applications on IIS
Skipping the additional file operations can significantly improve
performance of websites that have a very large set of randomly
accessed static content.
https://learn.microsoft.com/en-us/previous-versions//dn529134(v=vs.85)?redirectedfrom=MSDN
Keep in mind, if you use this setting, you'll need to come up with a solution to separate applications that use or don't use the setting.
Related issue with MVC:
ASP.NET MVC security and IIS allowSubDirConfig configuration

IIS 6 to IIS 8 Migration Errors after using Microsoft Web Deploy

I have recently been trying to migrate some websites from a 2003 server with IIS 6 to a 2012 server with IIS 8 installed. I am using Microsoft's Web Deploy tool and have been successful in copying a few web sites one at a time using the following command (changing the site identifier # for each site).NOTE: The reason the mumbo jumbo with replacing the drive exists is because our new server has a different data drive on it, and MSDeploy didn't like that. Could that be breaking things as well?
msdeploy -verb:sync -source:metakey=lm/w3svc/#,computername=SourceServerNameHere -dest:metakey=lm/w3svc/# -replace:objectName=metaProperty,scopeAttributeName=name,scopeAttributeValue=Path,targetAttributeName=value,match="F:",replace="E:" -enableLink:appPoolExtension > migration.log
The main issue is that when I try to navigate to any site one of three errors happens..
1. 503 Service Unavailable
2. 401.2 Unauthorized
3. 404.17 Not Found
These errors start from 1, and progress to 3 as I am trying to troubleshoot the IIS configurations. But this kind of defeats the purpose of using the Web Deploy Tool. Has anyone had any luck migrating sites being completely successful, or does the tool not actually support "IIS 6.0 or higher migration?"
Thanks in advance.
EDIT: So I have been able to get the main page of my site working by reverting the Handler Mappings and Default Documents to their parent configurations, and making sure that the AppPools don't conflict with versions, etc. The problem with this, is that I have to figure out how to do this for every app and app pool under the sites... Does anyone else have a similar problem?
Try using the iisApp provider instead of the MetaKey provider. For example,
msdeploy -verb:sync -source:iisApp=Site1/ContosoApp,computerName=Server1 -dest:iisApp="Site1/ContosoApp",computerName=Server2
https://technet.microsoft.com/en-us/library/dd569054(v=ws.10).aspx
I ended up contacting Microsoft Support to get this sorted out and ended up spending 3 hours on the phone with them...There were multiple issues that came up during the deploy tool's migration.
The bulk of the issues were corrected by changing the application pools to 64-bit and commenting out abomappercustom handlers in the applicationhost.config.

How can I change the Start Automatically setting in IIS 8.5

I have a problem with a web site running on an IIS 8.5 server that is not started automatically when the server reboots. The site is originally installed through ServerManager, where there is this line of code:
site.ServerAutoStart = false;
Now I would like to change this setting through the IIS Manager interface.
In IIS 7.5 i can set a web site to start automatically by setting the Start Automatically property under Advanced settings. But this setting is gone in IIS 8.5.
I found a solution to my problem inspired by this question:
How to config application pool in IIS 7.5 automatically re-start when it was stopped?
It is possible to access and edit all the detailed settings through the Configuration Editor, which can be accessed through the Features View in IIS Manager. I realize that in the link Mr Mo sent, the Configuration Editor was used, but it is not specified very clearly how to access it.
Check it out:
http://blogs.msdn.com/b/benjaminperkins/archive/2014/01/07/configure-the-iis-application-initialization-module.aspx
I think it will solve the issue.

IIS Error - It is not possible to run two different versions of ASP.NET

I'm getting this error thrown repeatedly on my IIS 6.0 server:
It is not possible to run two different versions of ASP.NET in the
same IIS process. Please use the IIS Administration Tool to
reconfigure your server to run the application in a separate process.
However, I ran an IIS MetaBase Analyzer to view all AppPools and AspNetVersions they're running and do not see any AppPools running different versions of AspNet. Is this a bug in IIS or is there definitely an AppPool running multiple versions of AspNet?
Thanks
Although it's an old question, for the benefit of future users who visit this yet unanswered question, here is the solution that worked for me.
In my case, the following worked.
Symptom :
The ASP.NET tab, for the "Default Website" node of the IIS Admin was showing a version of 1.1.
The ASP.NET tab, for my virtual directory application, was showing a version of 2.0 (which is the right one for my application).
Solution :
I changed the first one from 1.1 to 2.0. The application worked.
Cause :
The cause, however, seems "mysteriously unrelated", as it often happens in Windows. It was working fine with the same old (different) settings until a week back. What happened during the week, was that the machine A running the web server for my web application, had to unjoin a domain B and join another domain C, because the primary domain controller on B failed and had to be replaced with C. Why on earth would that affect IIS Admin or the web application hosted on A, and why it should generate this particular error is beyond me. Such a cause for this error seems undocumented.
It is not possible to run two different versions of ASP.NET in the same IIS process. This would mean you have multiple applications (either sites or virtual directories) using the same appPool, but one of these sites/applications has a different .NET version setting in the .NET tab. You would have to create another appPool to use different .NET versions.
To create another appPool and associate it to your application do (Windows Server 2003):
1.Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
2.In Internet Information Services (IIS) Manager, expand , right-click Application Pools, point to New, and then click Application Pool
3.Right-click on application that uses a different .NET version and click on Properties
4.On menu Virtual Directory choose in the item Application Pool the application pool that you created in point 2.
Regards!

IIS -> Isapi_Redirect -> Tomcat

I've been trying for days to get Tomcat up and running through IIS via the Jakarta Connector.
I've followed all of Microsoft's instructions -- put the connector .dll in %tomcatdir%\bin\win32\i386\, added the registry entry, added a filter (pointing to the .dll) to the default web site... and yet, any time I try to access a Tomcat web app, I get the "You are not authorized to view this page" error.
Has anyone experienced this? Help!
Thanks,
-Dan
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.14/isapi_redirect-1.2.14.exe
I use this redirect with Tomcat 5.5 and IIS 5 or 6. I haven't tried it with IIS 7.
You have to modify the uriworkermap.properties file to choose which paths to redirect, but besides that it works pretty much straight up. It adds all the registry garbage for you.
Ah, except on IIS 6 you have to add the isapi redirect.dll into its application whitelist.
Try this mate, it can help you.
http://itgration.blogspot.com/2016/04/configuring-tomcat-connector-for-iis-8.html
It tells you how to configure access to tomcat website via IIS and the necessary to set up tomcat server as a windows service and then forward the website to IIS via port 80. You will do this by installing a custom ISAPI filter in IIS that understands how to use the AJP protocol (Apache JServ Protocol) to communicate with tomcat. The main idea is to use Tomcat Connector ISAPI available to download from apache web site.
I used it with IIS 8 and 7

Resources