RabbitMQ: Change the default port of the server - rabbitmq

Hi I'm fairly new to the rabbitMQ and i'm using c# on Windows and i need to change the port to communicate with the server. I've searched a lot in the rabbitMQ documentation but it can be very confused. Can someone teach me the steps to change the port? Initially i've tried changing the port in the connection configurations of the client program like this:
var factory = new ConnectionFactory();
//connection hostname etc...
factory.Port =8080;
But i supose that's not enough right? Can someone teach me how to do it??

In order to communicate with the server on a different port you need to first tell RabbitMQ what port it should listen on.
The easiest way is to customize it through environment variables:
If you need to customise names, ports, locations, it is easiest to
configure environment variables in the Windows dialogue: Start >
Settings > Control Panel > System > Advanced > Environment Variables.
Create or edit the system variable name and value. For environment
changes to take effect on Windows, the service must be re-installed.
It is not sufficient to restart the service.
for more info check official docs: http://www.rabbitmq.com/configure.html#customise-general-unix-environment

Related

Wireguard with dynamic setup for iot

At the moment we have multiple raspberry pies placed at different locations on different networks.
Our current solution to be able to reach them if something goes wrong is auto-ssh with jump host.
Recently I stumbled on Wireguard which could be another more slim way to solve the calling home problem.
The problem is that we would like the setup phase to be more dynamic, we don't want to do special configuration per node we have out there, we just want them to call home with a key and then be apart of the network.
Two questions:
Is Wireguard for us or are there other problems that I can't foresee here.
Is there a way to set it up dynamically with one key and let the clients get random ips?
wireguard always needs a unique keypair / host. So not what you are looking for.
If you just want a phone home option with ip connectivity I would suggest an openvpn server and client. If you use a username/password config (not using certificates), you can reuse the config on multiple clients. Openvpn will act as an dhcp server.
an howto:
https://openvpn.net/community-resources/how-to/
search for:
client-cert-not-required
The option that Maxim Sagaydachny is also valid for command access, an alternative to salt could be puppet with mco/bolt.
On any option you choose, be sure that the daemon restarts when it crashes, reboots, fails...
for systemd services this would be an override with:
[service]
restart=always

IntelliJ Websphere Server Local, Error running 'Local Deploy': Address localhost:9080 is already in use

I seem to be doing something wrong in my run configuration for IntelliJ. I cannot run the server on the port 9080 because another app has to use the port 9080 and it's not up to me what port that app uses. So please don't tell me to kill the app using the port 9080. This is not a duplicate of this
With the other app running I can start up the server via command line or using an external tool in IntelliJ however I cannot start it though a run configuration. My server requires the other app to be running locally to do local testing however I cannot debug the app due to this extremely annoying issue. IntelliJ is simply picking the port 9080 out of some configuration and checking that port all on its own and deciding to not try starting the server and then somehow at some point deciding to check the port which of course wont be available. Is there a setting that I'm missing or is there another way to handle this so that way I don't run into this issue?
In local deploy there is not an option to change the port number.
From #Andrey's comments the solution turned out to be the server.xml is all that IntelliJ checks and doesn't load the bootstrap.properties right off the get go. So if you are filling in the httpPort number via bootstrap.properties, server.env, or any dynamically loaded properties, IntelliJ will use the default 9080. The solution here was then to simply hardcode the httpPort in <httpEndpoint httpPort=9081 ... /> for local testing

Is it possible to associate clients dynamically in sensu?

I'am using open source tools for the first time. I would like to install sensu, All i want to know that is there any method in which i can add my newly provisioned service automatically to the sensu server.
#vineesha We can make this possible when using rabbit mq, please write a script to fetch hostname and Ip address and update client.json and restart rabbitmq server and sensu-client. In the golden image please hard code the IP address of sensu server in rabbitmq.json. When all this is done please set a cron with #reboot and this should be all. When the server is launched it will automatically add to the sensu server.
If you are planning to use automation tools like for example puppet, all you need to do is to ensure that the sense-client is installed and the client config includes the correct RabbitMQ config.
As soon as the client connects to the same RabbitMQ host/cluster it should also pop up in you dashboard e.g. uchiwa.
There is no need to explicitly give the sense-server any information directly.

Setting up ubuntu VM on Azure with apache

In Azure, I created a virtual network and then associated an Ubuntu Server virtual machine, created with Azure Resource Manager Deployment method, with the network. I then updated the associated Network Security Group and added an inbound security rule for port 80 (Source:Any, Destination:Any, Service:TCP/80). After installing Apache on the VM, I tried to access the server from my browser, but have run into a wall. I can SSH into the VM just fine, but web is a no-go, and I cannot figure out why. Any help would be appreciated.
It sometimes happen to me too because I forgot to RESTART the VM, yes just restart it. At least this works for me. and also dont forget to add outbound rule too
It worked for me with this inbound rule.
Note that when a VM is created from the portal (in ARM model), it gets automatically associated to a virtual network (vnet), a specific subnet within the vnet and a network security group.
When creating the inbound security rule, make sure to:
identify the correct network security group associated to the VM
use a priority number lower than 65500
set the source port range as *
You also need open port 80 on the VM to allow web access.
I dont think that creating your Network Security Group opens the desired port on the VM automatically.
By default in Azure Resource Manager (ARM), all ports are open; there is no need to make Network Security Groups (NSGs) to open ports, only to close them. Here is an example of an ARM template that deploys an ubuntu VM with apache:
https://github.com/Azure/azure-quickstart-templates/tree/master/apache2-on-ubuntu-vm
Alternatively, if you want an auto-scaling LAP stack using VM Scale Sets (in public preview), you can find the ARM template for that here:
https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-lapstack-autoscale
Hope this helps! :)

Configure Dynamic WCF-Ports in Biztalk

I have a WCF port (which I got from add generated items>>Consume WCF service). I have exactly the same service on another server which I wanted to use. I reused all artifacts of previously consumed service and only made a copy of WCF port on Biztalk Administration side with different service address, then I bind both ports with appropriate virtual ports, and it is working fine. But is there any possibility to dynamically update binding information of WCF ports at run time with respect to input data (means I dont want to make multiple similar virtual ports in visual studio), I just want that if I want to add another service port I don't change my orchestration again and again. I only make physical port on Biztalk Administration Console side and bind it with some virtual port and it starts working....
Please let me know if there is some confusion...in question.
Thanks in advance.
I used Role Links to dynamically send data to different servers. But binding file remains the same. There is no need to add additional binding files for each service and no need to amend BizTalk project again and again. Just configure ports and make additional parties and you are done.