How to setup slurm on personal laptop? - configuration

I want to set up slurm on local machine (my laptop dual core).
Following is the specification. But i am not sure about nodename and cluster name during configuration.

For the hostname, use the output of the command hostname -s. For the cluster name, you can choose whatever you want.

Related

How to monitor MySQL by Zabbix (in docker containers)?

I have:
Zabbix server (computer A)
Zabbix agent (computer B)
Mysql (computer B)
But all of this components work inside Docker containers. How could I monitor Mysql by Zabbix in this case?
I saw this page (https://www.zabbix.com/integrations/mysql). But i think, this won't work in my case.
You can definitely use "Template DB MySQL by Zabbix agent":
if the Zabbix Agent is not dockerized:
and the MySQL port is published/mapped:
just follow the instructions.
else:
map the port, and follow instructions.
else:
check that mysql client is present in the docker image, add it if missing
link that container to the MySQL container, and follow instructions.

Clustering in Ejabberd in 2 linux OS

I am currently trying to cluster ejabberd using 2 ubuntu instances but I am facing some problems. I have 2 instances inside oracle Virtual Box .My current ejabberd.yml file for both instances have the following host:-
hosts:
- "xyz-VirtualBox"
For node1 I modify the ejabberdctl.cfg and change the ejabberd name like the following for example
ERLANG_NODE=ejabberd#1.1.1.1
INET_DIST_INTERFACE=1.1.1.1
where 1.1.1.1 is the ip of my ubuntu machine 1 instance .I make sure that I have the same .erlang.cookie in 2nd ubuntu machine and done the same changes of NODE and INTERFACE for machine2 . I start my first instance by using
ejabberdctl start
and it works fine because I can access the webadmin console. I start my ejabberd on second instance using using
ejabberdctl start
and it runs fine when I try to add the cluster to instance using the following command
ejabberdctl --no-timeout join_cluster ejabberd#1.1.1.1
Error: {no_ping,'ejabberd#1.1.1.1'}
note - cmd> hostname --fqdn (machine 1 output - xyz-VirtualBox)
I guess you have this in machine 1:
ERLANG_NODE=ejabberd#1.1.1.1
and something like this in machine 2:
ERLANG_NODE=ejabberd#1.1.1.2
Can machine 2 connect to machine 1. I mean, In machine 2, does this work?
ping 1.1.1.1
If that pings correctly, then you can test with step 4 of that tutorial, to see if that works: https://ejabberd.im/interconnect-erl-nodes/index.html

How mariadb resolves user's hostname?

I am using MariaDB on Linux RedHat and running Java App. I am interested in how DB resolves user hostname because I want to use user#localhost instead of user#127.0.0.1.
The name resolution in Linux is done in the resolver library. The main functions are gethostbyname() and gethostbyaddr(). In the /etc/nsswitch.conf file you can change the search order. You can use the following options:
dns
Use the Domain Name System (DNS) service to resolve the address. This mechanism uses the /etc/resolv.conf file.
files
Search in the /etc/hosts and /etc/network files.
nis or nisplus
Use the Network Information System (NIS) to resolve the host or network address.
In oyur case, is almost the same. The relation between 127.0.0.1 and localhost is defined in /etc/hosts

Find the interface name on which system address is configured on solaris 10

When I check ifconfig -a command on Solaris 10, I get a list of interfaces configured.
However my requirement is, I need the interface name on which my system address is configured.
Ex. my IP is 1.2.3.4 How can I check if on which interface this Ip is configred.
Also I dont have an Ip address of system. I just need to find interface on which system Ip is configured.
Thanks in avance
One way to go about this is to examine your /etc/hostname.interface files. One of these will contain the hostname. You may only have one, but if you are using IPMP you'll have others and if you're on multiple networks you'll have more.
Example of a solaris 10 host with an IPMP pair for the front-end and an IPMP pair for the back-end:
#ls -C1 /etc/hostname.*
/etc/hostname.e1000g0
/etc/hostname.e1000g1
/etc/hostname.e1000g2
/etc/hostname.e1000g3
#cat /etc/hostname.*
myhostname netmask + broadcast + group ipmp_fe up
group ipmp_fe up
myhostname-nfs netmask + broadcast + group ipmp_be up
group ipmp_be up
Each interface with an IP address will have a hostname in the corresponding /etc/hostname.interface file which corresponds to an entry in /etc/hosts. A simple shell script can parse this out for you. In the example above, this host is using IPMP so you have 2 extra files which do not contain the hostname.
There are other ways to configure solaris networking but the above is how it's been done for a long time and likely how it's done on your system.

Connect to MySQL on AWS from local machine

I am trying to set up a dev environment on my local machine that accesses a MySQL DB on AWS, but I keep getting a "Can't connect" message.
mysql_connect('xxx.xxx.xxx.xxx:3306', 'USERNAME', 'PASSWORD');
I also commented out the bind-address in the my.cnf file, and granted permissions to the IP address that is connecting.
Anyone ever successfully get this working?
My experience in Aug-2013 was as follows for an RDS instance created through Elastic Beanstalk.
0) Assuming the RDS instance has already been created
1) Log in to the management console: https://console.aws.amazon.com/console/home
2) Select Services->VPC
3) Select Security Groups (on the left hand side)
4) Select the group whose description says "Security Group for RDS DB..."
5) In the Security Group Selected panel at the bottom of the page, choose "Inbound"
6) Select MySQL as the rule.
7) Type the ip address of my local machine e.g. 145.23.32.15/32
8) Click Add Rule and Apply Rule Changes
After doing this I could connect to the database using mysql from my local machine.
a) From management console select Services->RDS
b) Click on DB Instances (I have only one) and select "Go to Details Page" for the required instance
c) Obtain Host and Port from the endpoint
d) From a terminal session do soemthing like: mysql --host blah.blah.blah.us-west-2.rds.amazonaws.com --port 3306 -u my-user-name -p
If you are using MySql on AWS via an RDS instance you must add the IP address you want to connect from to the "DB Security Groups". To do this go to your AWS Managment Console and select RDS.
1. Select "DB Security Groups" on the left panel
2. Select "default"
3. Select "CIDR/IP" from the select box and enter your workstations public IP address. Example:
23.234.192.123/32 (dont forget the /32 for a single ip)
4. Click "Add"
5. Wait a few minutes for it to go into effect and then connect your MySql client.
This only applies for RDS instances, if you are using MySql installed on an EC2 instance then the instructions are the same as accessing MySql from any remote machine.
I suppose this is firewalled by Amazon, try using a SSH tunnel:
http://blogs.oracle.com/divyen/entry/connecting_mysql_server_on_amazon
Note: Do not open MySQL to the public internet, not even when using IP filtering. SSH tunnels are way more secure. Best part of it: The tunnel could be accessible with localhost:3306 on your machine, no need to change the config : )
I am on a Windows 7 machine, and had to make the following 3 changes to be able to connect to AWS RDB.
VPC Security Group update in AWS Console (similar to what mikemay has above)
From https://console.aws.amazon.com, click on Services (top left) and choose VPC.
Next select Security Groups
Click on the Security Group which has the description "Security Group for RDS DB..."
On the "Inbound" tab, choose "MYSQL" in the Create a New Rule dropdown.
Add your IP address in CIDR format and click on Add Rule.
Click on Apply Rule Changes.
my.cnf update in local MySQL configuration
Change "bind-address = 127.0.0.1" to "bind-address = 0.0.0.0"
Comment out "skip-networking"
Turn OFF Windows Firewall
Go to Control Panel/System and Security/Windows Firewall and turn OFF Windows Firewall.
After these changes, I am able to connect through both
MySQL WorkBench using Database->Connect to Database
Command Prompt with
mysql.exe -h <AWS DB Endpoint> -U <UserName> -P <Port Number, likely 3306> -p
I have been using MySQL Workbench http://www.mysql.com/products/workbench/ with RDS and it works great. Very easy to create and save a new database service instance. Click "New Server Instance" under "Server Administration" and follow the prompts. You will need to enter the information provided in the AWS RDS webpage for that instance (for example, it's endpoint).
NOTE: In order for you to actually connect, you MUST add your IP address in the "DB Security Groups." The link is in the left-hand column, which is titled "Navigation." I use the "CIDR/IP" option (the other is EC2 Security Group). Make sure to include a "/##" after the IP, such as the "/32" they use in the example (you will see it on the page). In a few seconds, the IP address should be authorized.
After that, go back to MySQL Workbench and complete the New Server Instance creation process.
To use the connection, your code might look something like this (that excerpts of my Java code):
String url = "jdbc:mysql://yourdatabasename.foo.us-east-1.rds.amazonaws.com:3306/";
String userName = "your_user_name";
String password = "your_password";
String dbName = "your_db_name";
String driver = "com.mysql.jdbc.Driver";
Connection connection = DriverManager.getConnection(url + dbName, userName, password);
When we create RDS need to configured the firewall to accept mySQL connections from local or other instance, as such the packet is being dropped at the firewall level, to resolve this you need to:
Login into your AWS console Go to RDS
Note down the security group of your mySQL server (in my case awseb-e)
click security groups
click your group in the center menu awseb
click inbound tab
Select mySQL from the list, add the details of your client server and save the rule
NOTE : once you choose my IP ,AWS select your IP , if you need other ip use
https://www.whatismyip.com/my-ip-information/
and add your IP4 IP