Table des matières
- 2026:
- 2025:
4 billet(s) pour septembre 2026
| Notes HTTP Strict Transport Security - HSTS | 2026/09/18 11:04 | Jean-Baptiste |
| Notes GNU Linux GPU carte graphiques | 2026/09/08 15:49 | Jean-Baptiste |
| Notes GNU Linux graphique | 2026/09/08 15:42 | Jean-Baptiste |
| Notes urlencoding - passer des mots de passe en HTTPS | 2026/09/03 17:58 | Jean-Baptiste |
Réseau Linux pile TCP/IP - TCP retransmission timeout RTO
Params :
Voir :
Round-Trip Time (RTT) also called round-trip delay. RTT is the time required for a signal pulse to travel from a specific source to a specific destination and back again. In this context it is the time it takes for an outgoing TCP client packet to be acknowledged by the server.
Le temps d'aller-retour (RTT) est le temps qu'il faut aux données pour aller et revenir d'un certain point sur un réseau.
RTO pour les connexions sur le port 8080 Client
# Sur le client ss -i -n | egrep -A1 '[0-9]:8080\s+$' | egrep -o 'rto:\w+' # Sur le serveur ss -i -n | egrep -A1 '[0-9]:8080\s+[^$]' | egrep -o 'rto:\w+'
Réseau - port TCP UDP - netcat
Voir :
- Mesures netcat
Voir aussi :
- ttcp
sudo apt-get install ncat
Exemple
nc -n -vvv 192.168.1.1 nc -v -w 3 gnu.org
timeout 3 bash -c "</dev/udp/192.168.1.253/53" && echo "port open" || echo "port closed"
ipv6
nc -6 -lnvvvv 1234
nc -6 2001:bc8:4400:2402::3521 1234
Réseau - nom interface NIC - garder le nommage eth0 - predictable names - biosdevname
Voir :
sudo rgrep -w eth0 /etc udevadm test-builtin net_id /sys/class/net/eth0 2>/dev/null
RedHat
rpm -e biosdevname
boot kernel linux parametres
biosdevname=0 net.ifnames=0
Autre solution
/etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:20:19:52:d3:be", ATTR{type}=="1", NAME="eth0"
Mettre la véritable @MAC de la carte NAT dans le champ ATTR{address} de la ligne correspondant à eth0 en minuscules
Cluster Pacemaker et Corosync
Voir :
- Paquet resource-agents
Pcs Pacemaker Configuration System :
Conf install
Sur tous les nœuds
/etc/hosts
192.168.56.21 node2 192.168.56.22 node1
yum install -y corosync pcs #pacemaker
PCS Pacemaker Configuration System
yum install corosync pcs #pacemaker #passwd hacluster echo "passwd" | passwd hacluster --stdin systemctl start pcsd.service systemctl enable pcsd.service #unset http_proxy export NO_PROXY=localhost,127.0.0.1,node1,node2 pcs cluster auth node1 node2 pcs cluster setup --start --name my_cluster node1 node2 #pcs cluster setup --name my_cluster node1 node2 pcs cluster start node1 #pcs cluster auth pcs cluster start --all pcs cluster enable --all pcs resource create myvip IPaddr2 ip=192.168.56.100 pcs status resources pcs property set stonith-enabled=false # pcs property set no-quorum-policy=ignore # http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_prevent_resources_from_moving_after_recovery.html pcs resource defaults resource-stickiness=100 # pcs resource # pcs resource defaults
pcs status
pcs resource --full
pcs resource
/etc/corosync/corosync.conf
totem { version: 2 secauth: off cluster_name: my_cluster transport: udpu } nodelist { node { ring0_addr: node1 nodeid: 1 } node { ring0_addr: node2 nodeid: 2 } } quorum { provider: corosync_votequorum two_node: 1 } logging { to_logfile: yes logfile: /var/log/cluster/corosync.log to_syslog: yes }
Autre exemple de fichier de conf
/etc/corosync/corosync.conf
totem { version: 2 secauth: off cluster_name: mycluster-1 transport: udpu token: 5000 } nodelist { node { ring0_addr: mycluster-a1 nodeid: 1 } node { ring0_addr: mycluster-b1 nodeid: 2 } } quorum { provider: corosync_votequorum auto_tie_breaker: 0 two_node: 1 } logging { to_syslog: yes }
Sécurité
Sur nœud 1
corosync-keygen -l
Copie de la clef sur le nœud 2
scp /etc/corosync/authkey node2:/etc/corosync/authkey
sed -i -e 's/secauth: off/secauth: on/' /etc/corosync/corosync.conf pcs cluster sync
Bascule
pcs status resources
myvip (ocf::heartbeat:IPaddr2): Started node1
pcs cluster standby node1
pcs status resources
myvip (ocf::heartbeat:IPaddr2): Started node2
Réactivation node1
pcs cluster unstandby node1
Rebascule de la VIP myvip sur node1
pcs resource move myvip node1
Mise à zéro compteur
pcs resource relocate clear
Vérif config
crm_verify -LV crm_verify -LVVV
Autres
Logs
tailf /var/log/cluster/corosync.log
Interface Web
Compte hacluster
Pb
Connection to cluster failed: Transport endpoint is not connected
Pas nécessaire / pas de pb avec pcs
crm_mon -1
Connection to cluster failed: Transport endpoint is not connected
systemctl restart pacemaker
crm_mon -1
Last updated: Fri Oct 7 11:59:55 2016 Last change: Fri Oct 7 11:03:51 2016 Stack: unknown Current DC: NONE 0 nodes and 0 resources configured
Pour ne plus à devoir démarrer manuelelement pacemaker après corosync
/etc/corosync/corosync.conf
service {
# Load the Pacemaker Cluster Resource Manager
name: pacemaker
ver: 1
}
Effacer les "Failed Actions"
pcs status
Cluster name: my_cluster
Last updated: Fri Oct 14 16:40:14 2016 Last change: Fri Oct 14 16:36:04 2016 by root via cibadmin on node1
Stack: corosync
Current DC: node2 (version 1.1.13-10.el7_2.4-44eb2dd) - partition with quorum
2 nodes and 2 resources configured
Node node1: UNCLEAN (online)
Online: [ node2 ]
Full list of resources:
myvip (ocf::heartbeat:IPaddr2): Started node1
plopa (stonith:fence_ssh): Started node2
clusterfs (ocf::heartbeat:Filesystem): ORPHANED FAILED node1
Failed Actions:
* clusterfs_stop_0 on node1 'unknown error' (1): call=38, status=Timed Out, exitreason='none',
last-rc-change='Fri Oct 14 14:43:54 2016', queued=0ms, exec=60003ms
PCSD Status:
node1: Online
node2: Online
Daemon Status:
corosync: active/enabled
pacemaker: deactivating/enabled
pcsd: active/enabled
Source : https://supportex.net/blog/2011/09/cleaning-failed-actions-pacemakercorosync-cluster-setup/
Solution
#crm_resource -P
pcs resource cleanup
Pb node2: Unable to connect to node2 ([Errno 111] Connection refused)
journalctl -u pacemaker.service -f -p warning -- Logs begin at ven. 2017-06-09 18:23:40 CEST. -- juin 12 11:28:23 pc-2 attrd[170467]: error: Cluster connection failed juin 12 11:28:23 pc-2 pacemakerd[170463]: error: Managed process 170467 (attrd) dumped core juin 12 11:28:23 pc-2 pacemakerd[170463]: error: The attrd process (170467) terminated with signal 11 (core=1) juin 12 11:28:23 pc-2 cib[170464]: error: Could not connect to the Cluster Process Group API: 11 juin 12 11:28:23 pc-2 cib[170464]: crit: Cannot sign in to the cluster... terminating juin 12 11:28:23 pc-2 pacemakerd[170463]: warning: The cib process (170464) can no longer be respawned, shutting the cluster down. juin 12 11:28:23 pc-2 crmd[170469]: warning: Couldn't complete CIB registration 1 times... pause and retry juin 12 11:28:23 pc-2 crmd[170469]: warning: FSA: Input I_SHUTDOWN from crm_shutdown() received in state S_STARTING juin 12 11:28:23 pc-2 pacemakerd[170463]: error: The attrd process (170470) terminated with signal 15 (core=0) juin 12 11:28:33 pc-2 stonith-ng[170465]: error: Could not connect to the CIB service: Transport endpoint is not connected (-107) Sur les deux noeuds pcs cluster stop --all node2: Unable to connect to node2 ([Errno 111] Connection refused) lsof -Pn -i TCP:2224 pacemakerd[170758]: error: The attrd process (170765) terminated with signal 15 (core=0) systemctl status corosync juin 12 12:39:02 pc-1 corosync[116364]: [MAIN ] Denied connection attempt from 189:189 juin 12 12:39:02 pc-1 corosync[116364]: [QB ] Invalid IPC credentials (116364-116387-2). juin 12 12:39:02 pc-1 corosync[116364]: [MAIN ] Denied connection attempt from 189:189 juin 12 12:39:02 pc-1 corosync[116364]: [QB ] Invalid IPC credentials (116364-116384-2). ps -C cib,stonithd,pcsd,lrmd,attrd,pengine,crmd # Only pcsd ss -lx | grep @cib_ # No unix socket open
