hot to start a server through build.xml (ant) with https-connection - ant

I just configured standalone.xml of wildfly server for https-connection and everything works fine, while I start it as standalone.sh, but when I want to start it through ant build.xml it will be no any https recognised.
So, there is a row in build.xml
<socker server="{jboss.bind.address}" port="8080" />
I believe, it have to be anyway for https connection configured, while writing port="8443" instead of helps not, server will not be started.
Any suggestions?
In standalone.xml it looks so out:
<server name="default-server">
<http-listener name="default" socket-binding="http" proxy-address-forwarding="true"/>
<https-listener name="https" socket-binding="https" security-realm="UndertowRealm"/>
<host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
<single-sign-on path="/"/>
</host>
</server>

Related

How to deploy Dart server to IIS

I want to deploy a basic dart server that uses shelf to an IIS server.
I ran the command dart compile exe and tried to place the executable along with the web.config file in a file system. I set up the workpool with the settings I need. I have a DNS ready which is mywebsite.reu.po and set up the proper bindings for it. It gives me a 503 error something about handlers. The server host name is localhost and the port is whatever APSNET_PORT is. If nothing is found in that port, then it grabs port 4000.
Here is what I have in my web.config file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\server.exe" />
</system.webServer>
</configuration>
So I figured out the solution for this. I had to change the identifier for the pool since there are multiple admin accounts for the IIS. However, only one account has the ability to do hosting. Go to the pool, advance settings, and change the identifier with the right admin credentials.

Looks like you dont have any APM services installed. Lets add some

I am using elastic cloud. My Apm server is running on elastic cloud. But still in Kibana i can see the message "Looks like you don't have any APM services installed. Let's add some!".
My Elastic, Kibana and APM version is 7.8.1
I am trying to use APM in Kibana, and then i will add APM Agents into my Asp.net MVC application.
It's not clear in the question whether a .NET APM agent integration has been configured yet in an application that you wish to trace.
Assuming ASP.NET MVC is ASP.NET Full Framework integration
Reference Elastic.Apm.AspNetFullFramework nuget package in the application
Add ElasticApmModule to modules in web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<modules>
<add name="ElasticApmModule" type="Elastic.Apm.AspNetFullFramework.ElasticApmModule, Elastic.Apm.AspNetFullFramework" preCondition="managedHandler" />
</modules>
</system.webServer>
</configuration>
Configure agent settings in web.config app settings
<?xml version="1.0" encoding="utf-8"?>
<!-- ... -->
<configuration>
<!-- ... -->
<appSettings>
<!-- ... -->
<add key="ElasticApm:ServerUrl" value="<APM server in Elastic Cloud URL and port>" />
<add key="ElasticApm:SecretToken" value="<APM server secret token>" />
<!-- plus any other configuration -->
</appSettings>
<!-- ... -->
</configuration>
Once this is done, you should start to see APM data for the application in the APM section of Kibana.

Deploying a site as a role to Azure - DirectoryNotFoundException - approot / siteroot

I've been examining the event logs for the WebApp I'm trying to automatically deploy and the only problem I can find is this (Azure event log):
An unhandled exception occurred. Type: System.IO.DirectoryNotFoundException Process ID: 1784
Process Name: WaIISHost
Thread ID: 1
AppDomain Unhandled Exception for role Website_IN_0
Exception: Could not find a part of the path 'E:\approot'.
So I have a poke and sure enough, nothing lives there and the directory doesn't even exist. However I then realise the site exists in E:\sitesroot.... so why is it looking in approot?
This is my service definition:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="WebsiteAzure" xmlns="etc">
<WebRole name="Website" vmsize="Small">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="Diagnostics" />
</Imports>
</WebRole>
</ServiceDefinition>
Is that right?
For the record the deployment works fine with visual studio but i'm trying to automate with powershell which is where I'm getting the issue. I'm pretty sure it has all the .dlls it requires and the config and definition are correct so why is it choking on this directory?
I would suggest using New-AzureServiceProject and add-azure*webrole to scaffold the project locally, and using Publish-AzureServiceProject to package and publish to Azure.

Change Tomcat Address on my localhost

On my Tomcat, I have an HTML page.
I need to type the following address to make it run:
http://127.0.0.1:8080/BiddingSystem/BiddingSystem.html
but I want it to be accessed using this address: www.moribiz.com
Is this possible just by changing some setting on Tomcat?
I have Eclipse EE and Tomcat7, and I need to run my servlets not at localhost:8080, but on a pretty domain :)
I have made it this way:
In file %windows%\system32\drivers\etc\hosts add:
127.0.0.10 tomcat
In file %workspace%\Servers\Tomcat 7 at localhost-config\Server.xml
<Connector port="80" address="127.0.0.10" connectionTimeout="20000"
protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8" />
<Engine defaultHost="tomcat" name="Catalina">
<Host name="tomcat" appBase="webapps" autoDeploy="true" unpackWARs="true">
...
</Host>
</Engine>
Now my Apache Tomcat works fine (I hope) at http://tomcat/ and at same time my Apache2+PHP works at http://localhost/.
You can configure the host properties in Tomcat's server.xml, and can make an alias to the default localhost host:
<Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Alias>www.moribiz</Alias>
</Host>
For more information, see Tomcat's configuration manual.
Have a look at item 4 of O'Reilly's Tomcat tips:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"/>
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8443" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0" scheme="https" secure="true"/>
<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
clientAuth="false" protocol="TLS" />
</Connector>
<Engine name="Standalone" defaultHost="localhost" debug="0">
<!-- This Host is the default Host -->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="ROOT" debug="0"/>
<Context path="/orders" docBase="/home/ian/orders" debug="0"
reloadable="true" crossContext="true">
</Context>
</Host>
<!-- This Host is the first "Virtual Host": www.example.com -->
<Host name="www.example.com" appBase="/home/example/webapp">
<Context path="" docBase="."/>
</Host>
</Engine>
</Service>
</Server>
The relevant part is where the virtual host is defined (in the last <Host> tag).

Log4Net works on Dev machine, fails when deployed to shared host (using same db/connstring)

I have log4net configured and working fine on my local machine, however when I deploy to my host (godaddy) it fails silently. I am using the same database/config file on my dev machine, and on the host. My log4net reference is set to copy local, and the log4net.dll, .pdb, and .xml exist in the bin on the host. This is an asp.net mvc app.
Edit: No exceptions are thrown, and the application runs as expected (minus the logging)
This is running on SQL Server 2005
The webhost is IIS 7
salient details of my config are:
<root>
<level value="DEBUG" />
<appender-ref ref="AdoNetAppender" />
</root>
<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
Anybody have any ideas on things to check?
In my experience, log4net usually swallows any internal errors, simply resulting in log statements that do not produce any results.
What you may want to try is enable log4net's internal logging. You can do this by adding the following to your appSettings section:
<add key="log4net.Internal.Debug" value="true" />
This sets the property LogLog.InternalDebugging to true. log4net will now log to the standard output and error streams and to configured trace listeners.
You can use the following configuration to capture any messages logged to tracing:
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\TextWriterOutput.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
All messages logged by log4net internally will appear in TextWriterOutput.log. If you get a SecurityException when you add the trace listener to your configuration, then very probably the apppool identity does not have sufficient rights to create a file at the specified location (in the example: c:\). Try another location or give the apppool identity sufficient rights.
I've just been able to resolve this problem by downloading and using the latest build of log4net (revision 1072765) from SVN repository http://svn.apache.org/viewvc/logging/log4net/trunk/
Apparently this problem has been fixed long time ago but who knows when log4net 1.2.11 is going to be released.

Resources