I have published my web api app from visual studio to AWS Beanstalk, however I couldn't access my application and I got the error as showing in the image below.
The AWS Beanstalk is configured as below:
{
"comment" : "This file is used to help set default values when using the dotnet CLI extension
Amazon.ElasticBeanstalk.Tools. For more information run \"dotnet eb --help\" from the project
root.",
"profile" : "default",
"region" : "ca-central-1",
"application" : "eBookCatalog",
"environment" : "eBookCatalog-dev",
"cname" : "ebookcatalog-dev",
"solution-stack" : "64bit Windows Server Core 2016 v2.6.0 running IIS 10.0",
"environment-type" : "SingleInstance",
"instance-profile" : "aws-elasticbeanstalk-ec2-role",
"service-role" : "aws-elasticbeanstalk-service-role",
"health-check-url" : "/",
"instance-type" : "t2.micro",
"key-pair" : "eBookCatalog",
"iis-website" : "Default Web Site",
"app-path" : "/",
"enable-xray" : false
}
The environment status as showing below:
This is not EB issue, but your application. If you check it cerefully using curl for instance, you get response from your Microsoft-IIS/10.0 server. So connection works as expected. Maybe your application requires a path, ebookcatalog-dev.ca-central-1.elasticbeanstalk.com/api or it is invoked by some other non-default way.
curl -i ebookcatalog-dev.ca-central-1.elasticbeanstalk.com
HTTP/1.1 404 Not Found
Transfer-Encoding: chunked
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Related
I am trying to install sitecore without using SIA due some proxy and firewall security issues.I am following steps mentioned in below URL.
https://naveed-ahmad.com/2019/11/28/install-sitecore-9-3-using-3-simple-commands/
But I kept getting below error even if i have changed my SQL Server name and password for sa user in XP0-SingleDeveloper file.
Don't know why it is still trying to connect to localhost server.
[---------------------------------- XConnectXP0_InstallWDP : WebDeploy -----------------------------------------------]
[WebDeploy]:[Path] C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe
msdeploy.exe : Error Code: ERROR_EXECUTING_METHOD
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.3.0\Public\Tasks\Invoke-CommandTask.ps1:31
char:13
& $Path $Arguments | Out-Default
~~~~~~~~~~~~~~~~~~
CategoryInfo : NotSpecified: (Error Code: ERROR_EXECUTING_METHOD:String) [], RemoteException
FullyQualifiedErrorId : NativeCommandError
More Information: Could not deploy package.
Unable to connect to target server 'localhost'. Please verify the connection information such as the server name,
login credentials, and firewall rules for the target server.
Login failed for user 'sa'.
Lear
n more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.
Error: Could not deploy package.
Error: Unable to connect to target server 'localhost'. Please verify the connection information such as the server
name, login credentials, and firewall rules for the target server.
Error: Login failed for user 'sa'.
Error count: 1.
Install-SitecoreConfiguration : Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero
exit code - (-1)
At
1.1.1-r4)\XP0-SingleDeveloper.ps1:77 char:1
Install-SitecoreConfiguration #singleDeveloperParams *>&1 | Tee-Objec ...
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
[TIME] 00:01:31
Can someone please guide if we need to update any other file for this.
Did you change the $SqlServer variable in the XP0-SingleDeveloper.ps1 ?
It is possible that localhost value comes from the default value which is defined XP0-SingleDeveloper.json parameter file and your custom value is not passed to the install script. You may can try to modify the default in the json file directly too.
"SQLServer": {
"Type": "String",
"DefaultValue": "Localhost",
"Description": "The Sql Server where databases will be installed."
}
I am attempting to deploy a Flask app to AWS Elastic Beanstalk (single EC2 instance) with HTTPS enabled. I successfully deployed a version of my app without HTTPS, but then I followed this tutorial to terminate HTTPS:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-singleinstance-python.html
Following the documentation, I created a .ebextensions/https-instance.config file with the template code they provide (truncated here):
packages:
yum:
mod24_ssl : []
files:
/etc/httpd/conf.d/ssl.conf:
mode: "000644"
owner: root
... CERTIFICATES etc. etc. ...
Uploading this with my code, the deployment failed. Checking through the logs, the error was in the first part of the config file when yum attempts to install mod24_ssl:
No package mod24_ssl available
From my research (including here https://forums.aws.amazon.com/thread.jspa?threadID=222977), it seems that I may want to try installing a different package? I've attempted to replace mod24_ssl with mod_ssl orhttpd24-mod_ssl, but both return the same error (with their respective packages "not available").
Help much appreciated! Thanks.
Please double check your settings. The mod24_ssl is only for Amazon Linux 1. The package name for Amazon Linux 2 is mod_ssl. Maybe you misspell it and use modssl instead?
Amazon Linux 1 (mod24_ssl)
yum info mod24_ssl
Loaded plugins: priorities, update-motd, upgrade-helper
Available Packages
Name : mod24_ssl
Arch : x86_64
Epoch : 1
Version : 2.4.43
Release : 1.89.amzn1
Size : 122 k
Repo : amzn-updates/latest
Summary : SSL/TLS module for the Apache HTTP Server
URL : http://httpd.apache.org/
License : ASL 2.0
Description : The mod_ssl module provides strong cryptography for the Apache Web
: server via the Secure Sockets Layer (SSL) and Transport Layer
: Security (TLS) protocols.
Amazon Linux 2 (mod_ssl)
yum info mod_ssl
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Available Packages
Name : mod_ssl
Arch : x86_64
Epoch : 1
Version : 2.4.43
Release : 1.amzn2
Size : 115 k
Repo : amzn2-core/2/x86_64
Summary : SSL/TLS module for the Apache HTTP Server
URL : https://httpd.apache.org/
License : ASL 2.0
Description : The mod_ssl module provides strong cryptography for the Apache Web
: server via the Secure Sockets Layer (SSL) and Transport Layer
: Security (TLS) protocols.
I deployed my locally functioning django project with two apps to the GAE.
I also tested the MySQL DB at GCP by using the proxy tool provided by GCP.
Although I have successfully deployed the project to the App Engine, it is not working on the GAE.
I tested the URL with Chrome, IE and Safari.
This is what Chrome says:
This site can’t provide a secure connection <project-id>.oa.r.appspot.com sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
This is what curl says:
(ll_env)> curl https://<project-id>.oa.r.appspot.com
curl : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ curl https://<project-id>.oa.r.appspot.com
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
I tested following settings without success:
USE_X_FORWARDED_HOST = True on the settings.py
ALLOWED_HOSTS = ['*'] on the settings.py
I installed Wireshark and captured the connection setup. App Engine seems to reset my connection request.
I developed my web application with Angular 8. The backend is a rest api that I developed with django rest framework and it's viewed just in the localhost. I tested it and it works fine. For example the service http://127.0.0.1:8000/api/devices gives a list of devices. It gives a good results if I test it with browser or curl command.
I'm calling this service from my angular app. I executed the angular app with the command: ng serve --host 0.0.0.0 --port 4201
If I open the web application in the browser with http://127.0.0.1:4201/api/devices the service /api/devices is well called and I get the list of devices in my web page. but if I open the web application with my LAN IP address like that http://192.168.1.59:4201/api/devices, so I get HTTP 400 bad request error in my console.
And the same error is shown in django server traces: GET /api/devices/ HTTP/1.1" 400 26
After some searches in the internet I concluded that this error is frequently coming from angular app especially the proxy:
my proxy config file proxy.config.json is:
{
"/api" : {
"target": "http://localhost:8000",
"secure": false
}
}
I mad other searches and I found an answer to similar question Angular 6 call localhost API and after following the angular doc https://angular.io/guide/build in "Proxying to a backend server" section then I modified my proxy config file to:
{
"/api": {
"target": "http://localhost:8000",
"secure": false,
"pathRewrite": {
"^/api": ""
}
}
}
Has any one an idea what can be the main cause of the issue? and how I can fix it?
ng serve --host 0.0.0.0 --port 4201 --disable-host-check
I would like to disable login on my SAP Cloud Foundry app. Here is my xs-app.json
{
"authenticationMethod": "route",
"routes": [
{
"source": "/",
"target": "/",
"destination": "nodeBackend1",
"csrfProtection": false,
"authenticationType": "none"
}
]
}
And manifest.yml:
---
applications:
- name: appnode-demo
host: appnode-demo-pxxxxtrial
buildpack: https://github.com/cloudfoundry/nodejs-buildpack.git
memory: 128M
services:
- xsuaanode-demo
- connectivity-demo-lite
- destinationnode-demo-lite
I got this error message from the log file when accessing the page url (https://appnode-demo-pxxxxtrial.cfapps.eu10.hana.ondemand.com/)
msg":"GET request to /nodeBackend1 completed with status 500 - Error
while retrieving destination nodeBackend1 from destination service.
HTTP status code: 400"}
If I changed the authenticationType on xs-app.json to basic, it is working fine (I need to enter my credential).
nodeBackend1 is a simple Nodejs http server app running on-premise (on my machine) connected to SAP Cloud Foundry with SAP Cloud Connector.
How to disable the authentication so I can access the page without entering my credential (make it public) ?