Azure Service Fabric: Where is the port for my cluster? - azure

I was using SoapUI to hit an Azure Service Fabric service, but I was using the Client connection endpoint for my cluster. I suspected I was hitting the wrong port due to this error:
Error getting response; org.apache.http.NoHttpResponseException: The target server failed to respond
Where do I find the port for my cluster?

Where do I find the port for my cluster?
1) The port may be found in the ServiceManifest.xml file:
<Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="1234" />
2) The port may also be found in the Azure portal: load balancer > Frontend IP configuration > LBAppRule > Port

Related

Spring Boot App deployed on Azure App Service port 8080

I'm trying to deploy a Spring Boot Rest Api (Gradle) to an Azure app service. There is an executable jar in the /home/site/wwwroot folder and a startup command (java -jar /home/site/wwwroot/app.jar). When I execute this script, the spring api starts but throws the following error: "The Tomcat connector configured to listen on port 80 failed to start. The port may already be in use or the connector may be misconfigured."
I can't run the app on another port because the Azure App Service only allows inbound HTTP traffic on port 80 and 443 for SSL. I tried killing the process that is running on port 80 but that kills my ssh terminal.
Is there a solution to 'clear' the proces running on port 80 and actually run my Spring application on it?
"The Tomcat connector configured to listen on port 80 failed to start.The port may already be in use or the connector may be misconfigured."
The error is because another process is running on the same port. To solve this, you have two options.
Try to run the application on a port other than 8080.
Identify and stop the process running on that specific port.
Check this post on how to change the default tomcat port number.
See: how the spring boot configuration works.
Check this blog and SO thread might be helpful. Tomcat Server Error - Port 8080 already in use

Bad request - Invalid Hostname IIS express when using VPN

I'm working on a ASP.net web application and I want to bind it so it can be used from a remote network through OpenVPN. I already have the connection with the network and I can ping my device from the other devices inside the network. This is the configuration I used for OpenVPN
client
dev tap
proto tcp
dev-node openvpn
remote 86.89.135.168 443
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
cipher AES-128-CBC
comp-lzo
verb 5
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
#ifconfig 192.168.201.221 255.255.255.0
#route-gateway 192.168.201.1client
In the applicationhost.config I'm binding this:
<bindings>
<binding protocol="http" bindingInformation="*:52022:*" />
<binding protocol="http" bindingInformation="*:52022:192.168.201.68" />
<binding protocol="http" bindingInformation="*:52022:localhost" />
</bindings>
I can access the application by localhost or by the local ip adress. But when I try to access it with the vpn ip from a device in the network I get this:
My firewall is off and even though it doesn't work. And like I said it works in other devices in my local network and in the host machine but it doesn't work with devices from the remove network.
Can someone help me solving this? I'm new at this.
I solved my problem by:
1.Adding my VPN executor as an Exclusive in the 'virus and threat protection settings'.
2.Adding it to “Allow an app or feature through Windows defender Firewall” (if its not in the list you got to click on "allow another app"
3.Add a TCP Inbound rule in the "Windows Defender Firewall with Advanced Security” to the port that you VPN will be using for communication. In my case it is 443.

Does Azure Web App for containers support ssh access when running a multi-container app?

I'm running an Azure Web app (containers) with custom container images. I've followed the steps to enable ssh into a container image and it works great when I'm only running a single container. But when I run the app as a multi-container app (with docker-compose file) with more than one container image I get the error below. For additional context this is a small python web app that using nginx and redis hence the need for more than one container. Only one of my custom images has ssh enabled and running and exposing port 2222.
Is this even possible? If not then I'm not sure how feasible it is to run a web app multi-container if I have no way to access a container for support purposes.
az webapp remote-connection create -g GROUPNAME -n APPNAME -p 2222 --verbose
Configured default 'GROUPNAME' for arg resource_group_name
remote-connection is deprecated and moving to cli-core, use `webapp create-remote-connection`
Port 2222 is open
Creating a socket on port: 2222
Setting socket options
Binding to socket on local address and port
Finished initialization
Status response message: FAILURE:2222:Unable to connect to WebApp
WARNING - Remote debugging may not be setup properly. Reponse content: FAILURE:2222:Unable to connect to WebApp
SSH is available { username: root, password: Docker! }
Start your favorite client and connect to port 2222
I also tried the create-remote-connection command but got similar results.
az webapp create-remote-connection -n APPNAME -g GROUPNAME --verbose &
Error I receive is:
Auto-selecting port: 52661
Finished initialization
Status response message: FAILURE:2222:Unable to connect to WebApp
WARNING - Remote debugging may not be setup properly. Reponse content: FAILURE:2222:Unable to connect to WebApp
Connection is not ready yet, please wait
.
Status response message: FAILURE:2222:Unable to connect to WebApp
WARNING - Remote debugging may not be setup properly. Reponse content: FAILURE:2222:Unable to connect to WebApp
Looks like its not supported :(
see...
How to SSH in to different containers in Multi Container Azure App Service
and...
Support SSH to specific container in multi-container setup

Azure Cloud App ERR_CONNECTION_TIMED_OUT

I would like to deploy a container based app in azure container service, and followed this tutorial.
https://learn.microsoft.com/en-us/azure/container-service/dcos-swarm/container-service-mesos-marathon-ui
Everything went well except that the public url is showing
ERR_CONNECTION_TIMED_OUT in browser.
When pinging the url, able to get the IP address but pings are showing as timed out.
I have verified agents LB with port 80 as allowed in the rules list.
How to access the application through public web ?
When pinging the url, able to get the IP address but pings are showing
as timed out.
Azure disable ICMP package, so you could not ping Azure public IP address. You could use telnet or tcping to check whether your service is listening.
Do you bind port 80 of the container to port 80 of the DC/OS agent? If I don't do this, I get same error log with you. Please refer to this link.
Note: I test in my lab, if I did not do this, nginx service will listen on other port. I ssh to the agent VM.
root#dcos-agent-public-65818314000001:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7e8091548413 nginx "nginx -g 'daemon off" 14 minutes ago Up 14 minutes 0.0.0.0:4912->80/tcp mesos-d7be0314-6be2-467b-8376-433a05033b17-S1.42edeac0-2aa3-4ecd-acaa-17d5f2f4ac19
The service is listening on port 4912 not 80.
If you do this step, I suggest you also could ssh to agent VM(same user name and private key) and execute docker ps .

The jboss server is not connecting

While I use the connect statement, it shows the following error
The controller is not available at localhost:9999: java.net.ConnectException: JBAS012174:
Could not connect to remote://localhost:9999. The connection failed: JBAS012174: Could not
connect to remote://localhost:9999. The connection failed: Connection refused
[disconnected /]
I had the problem with connecting to the native management interface on port 9999 and all I ended up needing to do was enable the interface by adding the following to the standalone.XML file:
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket-binding native="management-native"/>
</native-interface>
:
<management-interfaces>
The actual native management binding (HOST:PORT) is defined in JBoss configuration file as interface name="management" and socket-binding name="management-native". By default they use localhost and 9999.
When install system service, it is necessary to specify the correct /controller host:port values if management binding has been updated.
The error below in the log indicates the CLI command line cannot connect to the management interface when shutting down:
Could not connect to remote://localhost:9999. The connection failed
Confirm the /controller parameter used when configuring system service matches the management interface and socket binding definition in JBoss configuration file (standalone.xml / domain.xml and host.xml).
When configuring system service, if not specified, the default configuration for controller is :
/controller HOST:PORT The host and port of the management interface. If omitted, the default is localhost:9999.
Change this parameter to match the management interface and socket binding settings in the JBoss configuration file:
<interfaces>
<interface name="management">
<inet-address value="192.168.0.1"/>
</interface>
......
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
With such configuration above you need to specify /controller as below to install the system service
service.bat install /startup /controller=192.168.0.1:9999 /config standalone-customized-1.xml
If jboss.socket.binding.port-offset is set, confirm actual port number (after offset) is passed in /controller parameter. For example, if jboss.socket.binding.port-offset is set as 300 in standalon.xml, you need to use 10299 (default 9999 + 300) as PORT number to install system service:
service.bat install /startup /controller=192.168.0.1:10299 /config standalone-customized-2.xml

Resources