IIS giving 503 errors - iis-7

I am running a Vista machine with IIS7. I believe (not 100% confident) IIS was working fine for me before I installed PHP from php-5.3.5-nts-Win32-VC9-x86.msi from official PHP website. I went ahead with the default install - did not cutomize anything. After the install, http://localhost gives me 503 Service Unavailable error. I have tried diagnosing using following links but can't find anything wrong. Please help me.
http://mvolo.com/blogs/serverside/archive/2006/10/19/Where-did-my-IIS7-server-go_3F00_-Troubleshooting-_2200_service-unavailable_2200_-errors.aspx
http://www.php.net/manual/en/install.windows.iis7.php
My apppools are running:
C:\Windows\System32\inetsrv>appcmd list apppools
APPPOOL "DefaultAppPool" (MgdVersion:v2.0,MgdMode:Integrated,state:Started)
APPPOOL "Classic .NET AppPool" (MgdVersion:v2.0,MgdMode:Classic,state:Started)
I don't see any errors in either the Application Log or the System Log.
The CGI, ISAPI Extensions, ISAPI Filters are all checked as in http://www.php.net/manual/en/install.windows.iis7.php
also set following values in php.ini
fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
cgi.force_redirect = 0
following mapping is set in IIS:
Request path: *.php
Module: FastCgiModule
Executable: C:[Path to PHP installation]\php-cgi.exe
Name: PHP_via_FastCGI
C:\Windows\System32\inetsrv>appcmd list config -section:system.webServer/fastCgi
gives:
<system.webServer>
<fastCgi>
<application fullPath="C:\Program Files\PHP\php-cgi.exe" activityTimeout="60
0" requestTimeout="600" instanceMaxRequests="10000">
<environmentVariables>
<environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000" />
<environmentVariable name="PHPRC" value="C:\Program Files\PHP\" />
</environmentVariables>
</application>
</fastCgi>
</system.webServer>

the solution provided here fixed the problem for me partly. It had nothing to do with PHP. I had added a url reservation sometime earlier when trying to experiment and self-host
some WCF services, and removing that url reservation solved the problem:
http://haacked.com/archive/2007/05/21/the-iis-7-team-rocks.aspx
netsh http show urlacl
The result showed that I had reserved http://+:80/ which takes precedence over all other URLs on port 80.
Reserved URL : http://+:80/
User: METAVERSE\Phil
Listen: Yes
Delegate: No
SDDL:
D:(A;;GX;;;S-1-5-21-1527697538-1582451445-1978546337-1000)
The solution was to run this command:
netsh http delete urlacl url=http://+:80/
Which removed the reservation.
My php scripts now run, but http://localhost/iisstart.htm is giving me a blank screen. Need to investigate it further...
The blank screen problem was fixed using this post: http://forums.iis.net/p/1158261/1906535.aspx
Control Panel->Programs and Features->Turn Windows features on/off->IIS->WWW Services->Common Http features->Static Content

Related

NCache - Failed to start my cache . ErrorL Specified cache is not registered

I am trying to use the NCache Open Source. I already installed it in my local machine. I already edited the config.ncconf file as instructed. Already restarted the service by using Restart-Service command.
<cache-config cache-name="myreplicatedcache">
<cache-settings inproc="False">
<logging enable-logs="True" trace-errors="True" trace-debug="False" log-path=""/>
<performance-counters enable-counters="True" snmp-port="0"/>
<cache-notifications item-remove="False" item-add="False" item-update="False"/>
<cleanup interval="15sec"/>
<storage type="heap" cache-size="1024mb"/>
<eviction-policy default-priority="normal" eviction-ratio="5%"/>
<cache-topology topology="replicated">
<cluster-settings operation-timeout="60sec"
stats-repl-interval="600sec" use-heart-beat="False">
<cluster-connection-settings port-range="1" connection-retries="2"
connection-retry-interval="10secs" cluster-port="7804"/>
</cluster-settings>
</cache-topology>
<client-death-detection enable="False" grace-interval="60sec"/>
</cache-settings>
<cache-deployment>
<servers>
<server-node ip="192.168.0.101"/>
</servers>
</cache-deployment>
</cache-config>
Still, I cannot start the new cache that I registered. I encountered - "Specified cache is not registered". I am not sure why it's happening for I am sure it is registered. Here is what it looks like:
Are the ports open and allows traffic? You can try by shutting down the windows firewall and if that works, define rules to allow traffic.
also you can try with partitioned cache configuration
<cache-config cache-name="myPartitionedCache" alias="" config-id="44fb997a-f6a7-433b-9439-7ef9de9f47c7" config-version="0">
<cache-settings inproc="False">
<logging enable-logs="True" trace-errors="True" trace-debug="False" log-path=""/>
<performance-counters enable-counters="True" snmp-port="0"/>
<cache-notifications item-remove="False" item-add="False" item-update="False"/>
<cleanup interval="15sec"/>
<storage type="heap" cache-size="1024mb"/>
<eviction-policy default-priority="normal" eviction-ratio="5%"/>
<cache-topology topology="partitioned">
<cluster-settings operation-timeout="60sec" stats-repl-interval="60sec" use-heart-beat="False">
<cluster-connection-settings port-range="1" connection-retries="2" connection-retry-interval="2secs" cluster-port="7801"/>
</cluster-settings>
</cache-topology>
<client-death-detection enable="False" grace-interval="60sec"/>
</cache-settings>
<cache-deployment>
<servers>
<server-node ip="yourIPHere"/>
</servers>
</cache-deployment>
</cache-config>

Server respond with a status 403 (forbidden)

I'm using asp.net MVC. I have hosted my website on appharbor. Everything is working fine on localhost. On live website I'm getting error.
Server responded with a status of 403 (Forbidden)
To solve this issue. I added <modules runAllManagedModulesForAllRequests="true" /> in web.config but it didn't work.
Another solution is I need to You need to change permissions on the folder bootstrap/css. To change permission I have to type command sudo chmod 0777. But I cannot figure out where to type this command.
So where I have to type this command or what is the alternative to tackle this 403 issue.
I know this is a little old, but I had the same problem now with jstree.
I don't know if you realized, but this behavior is given to you by the EnableOptimizations.
Basead on Denis Ivin answer here, you probably have a jstree folder inside Content/plugins and IIS, instead of giving you the jstree.css, is trying to list the folder and that is, by default, forbidden.
In my case I had to do the following for the plugin work as intended:
BundleConfig.cs
bundles.Add(new StyleBundle(
"~/Content/plugins/jstree/jstree")
.Include("~/Content/plugins/jstree/style.css"));
View.cshtml
#section css{
#Styles.Render("~/Content/plugins/jstree/jstree")
}

IpRestrictionModule - HTTP Error 500.19 - Internal Server Error

After trying multiple configuration changes, I cannot seem to get past this error. This is a fresh install of Windows Server 2012R2, with all of the options selected under the ASP.NET/IIS modules and features selected. I'm using Visual Studio 2013, and the target framework is 4.5
I have also executed the following commands:
%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/handlers
%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/security/ipSecurity
%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/modules
Try adding
-commit:apphost
to the command, like this
%windir%\system32\inetsrv\appcmd.exe unlock config section:system.webServer/security/ipSecurity -commit:apphost
so that the unlocking is applied at the topmost (applicationhost.config) level instead of the lower web.config levels

tomcat7 jdbc issues

I have a problem in my application post moving to tomcat7. I am seeing the below issue when my app tries to connect to the "Oracle 11.2 DB".
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-12541: TNS:no listener
)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:382)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466)
The connection details in the server.xml and context.xml looks like below.
context.xml
ResourceLink global="jdbc/ctb" name="jdbc/ctb" type="oracle.jdbc.pool.OracleDataSource"/>
server.xml
<Resource name="jdbc/XXXX"
auth="Container"
scope="Shareable"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:oci8:#database"
username="username" password="pwd"
maxActive="30" maxIdle="3"
removeAbandoned="true" removeAbandonedTimeout="60"
testOnBorrow="true"
validationQuery="select 1 from dual"
logAbandoned="true" />
One observation i see is below:
The tomcat7 comes with a default jdbc driver in the "lib" folder called "tomcat-jdbc.jar". But in my app we are using spring-jdbc.jar from quite long.
Tried to remove each of them to make sure there wont be any conflict in the classes, but it never helped me.
tomcat6 workes fine with the same "context.xml" and "server.xml" and spring-jdbc.jar.
your help will be highly appreciated as this has become a blocker for our tomcat7 migration. Let me know if you need any further details.
==Benki
Oh Ghosh, pinned down the issue.
The setenv.sh script created never had the "ORACLE_HOME" path set for it which created in the above error. Also as i was using the init script was starting and stopping the tomcat, which loaded only the basic ENV variable required and set by setenv.sh script.
Everything is working fine now.

Apache 2.2.16: client denied by server configuration

I have problem with my server configuration. I use Apache 2.216, PHP 5.3.3 and wordpress 3.4.2 with Shopperpress. Time to time I receive error "client denied by server configuration: path/to/file" in apache log file. It is path to _tbs.php file, but it is not problem in rights of file, because this file is called 12 times on page for getting thumbs of photos and there is error only several times. I think that it has no connection to concrete photo, because once this photo is displayed corectly and next time same photo produce error.
Do you have any idea what can be reason?
Thank you for all advices.
Viktor
I think thats a problem by the configuration of MaxClients or MaxRequestsPerChild.
Try to restore the default configuration and try it again. If that not works, reinstall Apache and purge the old configuration.
You have given very little information. It is not clear under what conditions do you work (OS, installed modules, Log entrys,...).
WordPress 3.4.2 is very old and safety-relevant. Please update WordPress and your WP-Plugins.
Go to you VHOST-file and replace:
Deny from all
Allow from 127.0.0.0/255.0.0.0
with:
Require all granted
This cause for old Config-Files and newer Apache-Version. Since Apache 2.4.3 a new security feature is added.

Resources