Publishing messages to a JMS server on another machine - configuration

I need to publish messages to a topic on a JMS server running on a different machine. The server on the remote machine is Glassfish v3 (OpenMQ). From reading other posts here, I think I need to tell the remote broker to accept JMS messages from a different IP than his own i.e not localhost. Actually, I'd like that remote broker to accept message from remote as well as the local machine.
Problem is, I can't figure out how to configure the remote machine's embedded broker, OpenMQ. I think it is possible from the Glassfish console, but can't figure it out. In jboss you'd execute with a -b 0.0.0.0, but the remote machine is not running jboss. It's Glassfish/OpenMQ. I'm new to all this as you can tell.
I think I know how to set up the JNDI context on the "local" machine that is publishing the messages to the other, remote machine. I've seen examples.

When you start the Message Broker (OpenMQ) by your self and not through GlassFish, you can connect to it (have his own jvm)
In Windows, you can start the GlassFish integrated OpenMQ inside the GlassFish Directory (in windows you can start it by:
glassfishv3\mq\bin\imqbrokerd
In the GlassFish Configuration you can set up the JMS Service Type to
REMOTE
(http://localhost:4848/common/index.jsf -> Configuraiton -> Java Message Service)
The other (maybe easier) option is to change the JMS Service Type to LOCAL. So, the GlassFish "manage" the JMS broker, but in an other jvm, which should be reachable by others

Related

Deploy war file in apache-tomcat on google compute engine

I have created instance on google cloud platform (allowed http traffic). Used Ubuntu 14.04 OS. Installed oracle java8 and apache-tomcat.Placed war file in tomcat webapps and started server. Server started successfully.
Question is how to access my application, tried accessing external ip of instance from web browser but no response.
Can anyone tell me the process or missing things I have not done.
Thanks in advance.
I had the same issue and eventually solved it
In my case the solution was simple.Check the firewall rule is really tcp:8080 and not tcp:80 as created by default.
Changed this and finally saw my tomcat welcome page.
1)Added http port (8080) in firewall rules in Networking section
2)Refreshing VM instance by click refresh option before accessing with external ip followed by http server port(8080)
I hope after following first step, need to refresh VM instance to access web serve with external IP

Connection to AWS Database fails with Mule app in Runtime Manager

I've recently created a Mule application (3.7.0 CE) on a laptop. I'm connected to an AWS RDS instance when running locally in AnyPoint Studio using Maven. I started with a local MySQL DB and migrated it to AWS because my application "proofofconcept" is just that a proof of concept and I would like to show the application online (public url) instead of my laptop for a presentation. I added the database.url=... property to the application properties when I deployed to Anypoint Runtime Manager in the cloud. I'm currently getting a:
communications link failure
I've tried several things and nothing has worked. I tried a basic database connection first in the database config. And, then I created a JDBC datasource in Spring-beans. Both methods worked locally and in-communication with AWS (remote). When I deploy to Runtime Manager, the application deploys. And, I get the console that's generated runtime by the RAML. When I call a url e.g. api/v1/orders it runs and runs and after timeout provides the communication error.
Does anyone 1) know if the communication is allowed? 2) know how to fix this? I would like to demo the POC online for my client.
Thanks in advance
My issue was with Amazon VPC and the default security group assigned to my RDS instance. By default all outbound activity is set to any protocol and any port for any ip (0.0.0.0/0). Inbound routing, however was specifying only port 3306 but also a custom using-ip that was my home network public ip. I changed the ip specification to be 0.0.0.0/0. This now mean's that any ip can send a request though port 3306 to my Amazon MySQL instance.

Smart relay setup on the locally running SMTP server

Jelastic runs an SMTP server on a node. Does Jelastic, as a policy, allow setting up a smart relay on the local SMTP server?
I understand that some sysadmin from the service provider would need to do that on a per node basis. In my case, EverData is the service provider and their sysadmin says Jelastic policies don't allow such a change.
You can use the Elastic VPS or Docker node types to run and configure whatever you want (you have full root access). The only limitation is the provider's AUP.

No environment variables in OpenShift

I have created a new OpenShift account for a new application I'm developing.
I have added a MongoDB cartridge for the database, and a Tomcat cartridge for the Java web application.
I now need to connect to the database from my Java web app, but I miss two authentication details:
$OPENSHIFT_MONGODB_DB_HOST
$OPENSHIFT_MONGODB_DB_PORT
As far as I know, I have to type rhc env list -a the_name_of_my_app in the console, but my application seems to have no environment variables set.
What can I do?
Apparently, the default enironment variables are visible only via ssh.
In order to see them, you have to type rhc ssh <appid-as-seen-on-openshift-console> followeb by env.
you can see environment variables by doing ssh to openshift. Also you can use openshift port forwarding feature to setup a connection locally to your database.
Openshift blog link for port forwarding

Configuring Mule Port on linux server

This might be a very simple question for those who are running Mule on linux. I have developed Mule ESB 3.3 app on a windows 8 machine and tested to get desired results by calling my app at
http://localhost:8081/myFlowPath
Now I have deployed same app on to a linux machine behind a firewall successfully but am unable to hit it at http://linuxDomainname.com:8081/myFlowPath. The connection is refused. Am I missing something in configuring mule to run on linux?
We are running Mule CE 3.3 standalone as a linux demon. Do I have to explicitly specify something like the port or hostname in the wrapper.conf? Please let me know. Any help is highly appreciated.
Thanks,
Jenni
You have to configure HTTP Listener host to 0.0.0.0 (change from localhost).
Check log mule at HOME_MULE/logs/mule.log or webservice.log
After deploy your app you must have in HOME_MULE/apps/nameofyourapp/webservice.xml (or filename defined in "config.resources" in file mule-deploy.properties) this:
It work for me. I deploying my mule apps on Ubuntu 16.04 LTS, Mule ESB 3.8.1.
If this not work, it mean that you blocked that port (8081) on this machine (or firewall). Check iptables or another your 3th-party firewall.
Mule handle it easily by using the application properties. Create property files for each environment local|develop|prod.
local.properties
api.host=0.0.0.0
api.port=8080
prod.properties
api.host=127.0.0.1
api.port=9090
Read more about the mule service configuration management at https://docs.mulesoft.com/mule-runtime/3.9/configuring-properties.