Unable to connect redis (Memorystore) from app engine flex SSH - redis

I have deployed an application build on .Net Core 2.1 and deployed to GCP. I am using ServiceStack to connect the Memorystore instance. But I am unable to connect the redis instance using redis-cli after opening SSH of my app engine flex service. Could you please help me in this regard?

Related

Apache webgate integration with docker application

My application is working in a docker container in port 80. I'm planning to integrate SSO with this application, we are using OAM apache webgate to integrate SSO. I need help in structuring this integration.
I previously integrated apache webgate with my docker container directly and got into a state like, i cannot rebuild my image anymore.
Can i integrate apache webgate on my host and still integrate SSO with application inside docker?
Yes you can. OAM WebGate is just like any other apache plugin/module and can work inside the docker container.

OpenShift v3 connect app with redis. Connection Refused

I have created a redis 3.2 application from the default image catalog.
I'm trying to connect a python app that runs inside the same project with the redis db.
This is what the Python application uses to connect to redis:
REDIS_HOST = 'localhost'
REDIS_PORT = 6379
REDIS_PASSWORD = os.environ.get('REDIS_PASSWORD') or 'test'
redis = aioredis.create_redis_pool(
(REDIS_HOST, int(REDIS_PORT)),
password=REDIS_PASSWORD,
minsize=5,
maxsize=10,
loop=loop,
)
The deployment fails with an ConnectionRefusedError: [Errno 111] Connection refused.
My guess is that I need to use another value for REDIS_HOST, but I couldn't figure what to use.
Does anyone know how to fix this?
After you deployed from the image catalog a number of objects will have been created for you. One of those objects is a service, which is used to load balance requests to the Pods it fronts. Service names for a project can be retrieved using the client tools via oc get svc.
This service name should be used to connect to your redis instance. If you deploy redis before your Python application, some environment variables should already be populated which can be used, for example REDIS_SERVICE_HOST and REDIS_SERVICE_PORT.
So from your application you can connect via the service ip or service name, where service name is redis then redis.StrictRedis(host='redis', port=6379, password='secret')
The redis password may have been generated for you. In that case it is retrievable from the redis secret which could also be mounted from your python app
Databases in general do not use standard HTTP, but custom TCP protocols. This is why in Openshift we need to connect directly to the service using Openshift's Service hostname or IP address (caution: only Service hostname is predictable), instead of the usual Route, and this applies also to Redis. Bypassing the Routes in Openshift is like bypassing a reverse proxy such as nginx and directly connecting to the db backend.
There is need to use env variables, because service hostnames are auto-generated by Openshift using this predictable pattern:
container_name.project_name.svc , e.g:
redis.db.svc
More info
"When a web application is made visible outside of the OpenShift cluster a route is created. This enables a user to use a URL to access the web application from a web browser. A route is usually used for web applications which use the HTTP protocol. A route cannot be used to expose a database, as they would typically use their own distinct protocol, and routes would not be able to work with the database protocol."
[https://blog.openshift.com/openshift-connecting-database-using-port-forwarding/ ]

How to setup mobile-first-cli to deploy on bluemix behind a corporate proxy

I'm using Mobile Foundation on IBM Bluemix and I'm facing problems in setup IBM MobileFirst-CLI to deploy adapters and apps throw my corporate proxy.
In time, I'm on a macOS with the CLI version below:
mfpdev -v
8.0.0-2016070716
At this time, every time I have to interact with the server in have to connect to it using my phone tethering. Please help, I'm running out of all my data plan.
The actual error:
$ mfpdev adapter deploy
Error: Cannot connect to server 'mfp-bluemix-dev' at 'https://xxxx-server.mybluemix.net:443'.
Reason: Missing runtime configuration details.: connect ECONNREFUSED 158.99.999.99:443
ps: address and ip of server obfuscated.
Best regards,
Bernardo Baumblatt.
At the moment, MFP Dev CLI does not have the feature to configure a proxy. However, if all communications in your enterprise are routed through the corporate proxy, and the proxy can connect to IBM Bluemix, there should not be a problem.
You can submit a Request for Enhancement to add proxy feature to MFP Dev CLI.
What Pat said in his comment is correct. I suspect that you have two issues to address:
Your corporate proxy must allow access to your server's HTTP and HTTPS endpoints (9080 and 9443). I've also heard of cases where the personal firewall on the individual's workstation has interfered.
You are running a VERY old version of the CLI. Assuming your instance of Foundation Server on Bluemix isn't that old, you'll need to upgrade to interact with it properly. I strongly suggest that you upgrade to the latest version via npm -g install mfpdev-cli.

Glassfish 3.1 remote instance cant connect to database

in glassfish 3.1 I have two instance on two ssh node and they work fine in a cluster. I created the third ssh node and add the instances in a cluster. SO the cluster has three instances on three remote ssh node.
Web service running on the third node but web service cant connect to database. I believe the new instances has same connector and configuration, resources as other two since the instance is added into the cluster. So all sharing same cluster config.
I am new in glassfish, please help me out.
Thanks

node agent in glassfish v4.1.1

I want to migrate an application from glassfish 2.1 to glassfish 4.1.1.
But not able to create node agent in glassfish 4.1.1
Already checked in admin console and also tried with command prompt as well with
command : create-node-agent-na
OUTPUT: CLI194: Previously supported command: create-node-agent is not supported for this release.Command create-node-agent failed.
Does anyone have any idea on how to create node agent in glassfish 4.1.1 or is there any replacement provided in GF v4.1.1
[glassfish 4.1.1 error:]
GlassFish 3.x and higher no longer has a node agent. Administration works slightly differently; nodes are simply representations of the hosts where server instances reside. You can create a new SSH, DCOM or CONFIG node which governs how the DAS communicates with server instances on that node. The rest of the node configuration just identifies the IP address or hostname of the node.
If you create an SSH node (or DCOM node in Windows only), then you will be able to communicate with the server instances on the remote machine directly and start and stop them from the DAS.
If you create a CONFIG node, then the DAS has no way of communicating with server instances which are not running. When a server instance on a CONFIG node starts, it contacts the DAS to register itself as running, and then the DAS will be able to administer the instance over HTTP.
There is more information on how to do this in this Payara Server blog post. Payara Server is derived from GlassFish, so all these instructions are valid on GlassFish 4.x as well.