I’m trying to connect my database mysql (RDS Aurora serverless) and Mulesoft. But I have to setup an SSH tunnel with an EC2 instance (AWS restrictions) So I try an ssh connection from Mulesoft to my EC2 instance, all tutorials I have found talk about sshmultiplexedconnector or SSH Connecter - Mule 3, and they seems to be deprecated.
Did you had the same problems, and do you have solutions or other methods ?
PS, I’m using : Mule server 4.2.0 Anypoint Studio 7.3.4 EC2 instance run Ubuntu 18.04
Tutorial : https://blogs.mulesoft.com/dev/connectivity-dev/mule-in-a-shell-new-ssh-connector/
Thanks and regards.
mule-code
mule-error
There is no out of the box connector for Mule 4 that implements an SSH tunnel. The connector you mentioned is for Mule 3, so it is not compatible, and hasn't been maintained for some years. You could attempt to build a connector for Mule 4 to do it, however I would argue that a communication tunnel, same as a VPN, is task better implemented at the server level. Just do it from your operating system and to the Mule application it should be transparent.
Related
I'm looking for the advice of how to manually (i.e. without using Runtime Manager - RM) deploy a mule application package on the on-premises Mule cluster. The official documentation suggests using the RM for the purpose either via the gui or cli or api. However, the RM is not available on our environment.
I can manually deploy the package on a single node by copying it to the /apps folder. But this way the application is only deployed on a single node, not on the cluster.
I've tried using the AMC agent rest API for the purpose with the same result - it only deploys on a single node.
So, what's the correct way of manually deploying a mule application on the Mule servers cluster without using Anypoint RM?
We are on Mule 4.4 EE.
Copy the application jar file into the apps directory of every node. Mule clusters do not transfer applications between nodes.
Alternatively ou can use the Runtime Manager Agent instead however it also works in a per node basis. You need to send the same request to each node to deploy.
Each connector may or may not be cluster aware. Read each connector documentation to understand how they behave. In particular the documentation of the VM connector states:
When running in cluster mode, persistent queues are instead backed by the memory grid. This means that when a Mule flow uses VM Connector to publish content to a queue, Mule runtime engine (Mule) decides whether to process that message in the same origin node or to send it out to the cluster to be picked up and processed by another node.
You can register the multiple nodes through AMC agent on the cloudhub control plane and create a server group and deploy code through control plain runtime manager it does the job of deployment to same app in n nodes
How do you connect a JMX agent to a Mule 4 project running locally? When I launch JConsole I see two mule-related processes called org.mule.runtime.module.reboot.MuleContainerBootstrap but I cannot connect to either.
I've tried running my project with the following flags and connecting remotely:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1096
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.host=localhost
But no luck.
I had no problems connecting to (localhost:1096) using just these properties:
-Dcom.sun.management.jmxremote.port=1096
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
JConsole gave me a warning about the insecure connection (no SSL). I accepted to connect insecurely and that was enough.
However when adding -Dcom.sun.management.jmxremote.host=localhost is keeps failing to connect. This looks like a Java issue.
If you only want to ensure local connections you can replace it with -Dcom.sun.management.jmxremote.local.only=true which should give you the expected result.
Having said that, this is all a pure Java JMX topic. Mule 4 doesn't expose any MBeans over JMX like Mule 3 did so there is no specific reason to connect with JMX.
I'm not sure why you are using jconsole given that VisualVM is a much modern and powerful alternative, unless you are just testing the local JMX connectivity ;-)
So I am currently trying to deploy the Redis CF service onto Cloud Foundry which is on an Openstack IAAS and getting stuck with deploying the Redis Service Broker. Cloud Foundry is all set up (deployed using BOSH), but how to I deploy the broker? Is it pushed like an application? Do I need to change any files/manifests manually?
The documentation seemed a little light on how I would do this.
Googling "Cloud Foundry Redis service broker", the first result I find is https://github.com/pivotal-cf/cf-redis-release. This appears to document the deployment and configuration steps pretty well in its README. You will deploy the Redis service as a BOSH deployment, and this service includes the broker. You can drive that broker to register it with the Cloud Foundry service broker API as documented in that same README.
There are a couple ways to handle this.
Run open source Cloud Foundry on top of Openstack and then deploy open source Redis (or Redis Cloud, Redis Enterprise, etc.) and connect to it using User-Provided Service Instances
The easiest way is with a Service Broker (aka Pivotal Tile) as Amit describes in the previous answer. Run Pivotal Cloud Foundry on top of Openstack and then deploy a Redis Service Broker, such as Redis Enterprise Service Broker for Pivotal Cloud Foundry and connect to it as documented.
There are other Redis service providers in the The Foundry: such as a9s, IBM, Redis Labs, Pivotal and Swisscom
I created 2 gears, php-5.4 and nodejs+redis.
How do I connect with Redis from my PHP gear? Where do I change the configuration?
I am using this redis cartridge:
https://github.com/smarterclayton/openshift-redis-cart
You need to create your nodejs + redis application as a scaled application, that way redis will be on it's own gear, then you can use the supplied connection credentials to connect to it from your php gear.
I am new to cloud foundry and investigating possible ways for our legacy Java EE application to communicate asynchronously with an application running on cloud foundry.
We are doing a lot of asynchronous work already and are publishing events to Active MQ.
I know that cloud foundry has a possibility to bind with Rabbit MQ and my question is with the possibility for a cloud foundry running application to connect (listen) to an existing out of CF platform Rabbit MQ?
Any idea on other alternatives to achieve this?
Yes, that is possible. You can use a user provided service.
That allows you to inject the environment variables into your app, that are needed to connect to RabbitMQ (like host, port, vhost, username, password).
Once you create that service, you can bind it to your app. Inside your app code, you then can read the environment variables exactly the same way as you would do it, if you had used a RabbitMQ service provided by CloudFoundry.