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) ?
Related
I want to setup developer environment for Kiali-ui. I am following Kiali guide to do this.
But while accessing Kiali on browser(http://localhost:3000) i am getting following issue:
Not Found
Cannot GET /api/auth/info
From console logs I am getting following issue:
Failed to load resource: the server responded with a status of 404 (Not Found)
I am using this link to setup proxy for the API requests:
"name": "#kiali/kiali-ui",
"version": "1.49.0",
"proxy": "http://{IP-OF-KIALI}:20001"
Is there any pre-requisite to setup development environment for Kiali-ui?
I was giving wrong url of Kiali in package.json.
Following url works for me:
"proxy": "http://{IP-OF-KIALI}:20001/kiali"
This url is of Kiali which running inside k8s pod.
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
I have a Google cloud Postgres server set up, and under the production environment I am able to connect to the server correctly. However, when I try to connect to the same cloud server in my local server, it doesn't seem to work. Here's the configuration for my database.js
module.exports = ({ env }) => {
return {
defaultConnection: "default",
connections: {
default: {
connector: "bookshelf",
settings: {
client: "postgres",
host: `/cloudsql/${env("INSTANCE_CONNECTION_NAME")}`,
database: env("DATABASE_NAME"),
username: env("DATABASE_USERNAME"),
password: env("DATABASE_PASSWORD"),
},
options: {},
},
},
};
};
I also have the app.yaml set up as normal. I have also created the .env file to store the relevant env information.
The error I am getting is
error Error: connect ENOENT /cloudsql/my-app-286221:us-central1:blm-resources/.s.PGSQL.5432
Does Strapi in local development support connection to cloud database? Or am I doing something wrong here.
This shouldn’t be a strapi issue. First you need to have an access from outside to google cloud postgres database. I’m not familiar with google cloud services, but from documentation there seem to be a couple of things to do to grant access to database.
More info from documentation:
https://cloud.google.com/sql/docs/postgres/connect-external-app#appaccessIP
Basically you grant access for connection from outside and then you add that connection information to your strapi config file.
I noticed your host: is not pointing to http:// or https:// but to some google server’s local address.
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 want to deploy my website using meteor-up. I want to deploy it to a EC2 instance on AWS. I have created my mup.json file and configured it as follows:
{
// Server authentication info
"servers": [
{
"host": "ec2-52-24-95-147.us-west-2.compute.amazonaws.com",
"username": "ubuntu",
//"password": "password"
// or pem file (ssh based authentication)
"pem": "C:/Users/username/meteor.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.35",
// Install PhantomJS in the server
"setupPhantom": false,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "Homepage",
// Location of app (local directory)
"app": "C:/website",
// Configure environment
"env": {
"ROOT_URL": "ec2-52-24-95-147.us-west-2.compute.amazonaws.com",
"PORT": 80,
"METEOR_ENV": "production"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
Unfortunately this is not working and I am getting the following error:
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT {public IP from AWS}:22
at Object.exports._errnoExcpetion (util.js:837:11)
at exports._excpetionWithHostPort (util.js:860:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
Per the https://github.com/arunoda/meteor-up, try setting the DEBUG environment variable:
Verbose Output
If you need to see the output of meteor-up (to see more precisely where it's failing or hanging, for example), run it like so:
DEBUG=* mup <command>
where is one of the mup commands such as setup, deploy, etc.