Monday, December 13, 2021

Recent Questions - Server Fault

Recent Questions - Server Fault


Ansible module for Brocade/ICX is misbehaving

Posted: 13 Dec 2021 03:59 AM PST

I've to perform some network automation in my infra using ansible.

When i'm trying to use ansible module for icx switches it seems to be misbehaving.

Playbook i used

- name: ICX switch testing    hosts: test-switch    gather_facts: no    vars:      ansible_user: username      ansible_password: password      ansible_connection=ansible.netcommon.network_cli      ansible_network_os=icx    tasks:      - name: show version        icx_command:          commands:            - show version  

for this i'm getting below error

FAILED! => {"changed": false, "msg": "skip\r\nInvalid input -> skip\r\nType ? for a list\r\nSSH@ICX7250-24P Switch>"}    

when I use enable mode using ansible_become then it gives below error

FAILED! => {"changed": false, "msg": "unable to elevate privilege to enable mode, at prompt [None] with error: timeout value 60 seconds reached while trying to send command: b'enable'"}    

i'm not sure why command enable changed to b'enable. Seems some issue with module

ansible version

ansible 2.9.9    config file = /etc/ansible/ansible.cfg    configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']    ansible python module location = /usr/local/lib/python3.6/site-packages/ansible    executable location = /usr/local/bin/ansible    python version = 3.6.8 (default, Sep 26 2019, 11:57:09) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]  

channels-Redis Consumes 100% cpu and becomes unresponsive

Posted: 13 Dec 2021 03:39 AM PST

  • Ubuntu 20.04.3 LTS x86_64
  • channels-redis==3.2.0
  • Nginx -> Daphne -> redis/django
  • command to start: "sudo docker run -p 6379:6379 -d redis:5"
Django settings:        'default': {          'BACKEND': 'channels_redis.core.RedisChannelLayer',          'CONFIG': {              "hosts": [('127.0.0.1', 6379)],          },      },  }  

The issue: After about 12 to 48 hours (roughly, different each time) redis-server (top command calls it "redis2" sometimes and "redis-server" other times) suddenly consumes all the CPU it can, more or less bricking the whole system. Redis-cli is totally unresponsive. Redis runs perfectly fine until then i.e. not being greedy with the CPU and doing the expected job.

Running "docker logs " yields the following (on normal CPU usage).

1:M 11 Dec 2021 18:18:58.137 # Background saving error  1:M 11 Dec 2021 18:19:04.051 * 1 changes in 3600 seconds. Saving...  1:M 11 Dec 2021 18:19:04.051 * Background saving started by pid 7098  7098:C 11 Dec 2021 18:19:04.052 # Failed opening the RDB file root (in server root dir /etc) for saving: Permission denied  

That is being spammed to the console while it is running normally i.e. not max CPU.

Is this correct though? Why is "/etc" the server root? There is no "/etc/redis/..." or "/var/logs/redis..." either.

As well, the "Background saving started by pid 7098" is always a new pid. Counting up. So not sure if this eventually leads to its death.

I also linked up "grafana" to monitor it (just another server/utility resource monitor). At the point of max CPU usage, granfan can no longer get info from it. So it definitely dies.

Most importantly, where are the logs supposed to go? As said before, there is no /var/logs for redis in its docker container.

Fail2Ban: How to run a jail against an existing log file

Posted: 13 Dec 2021 03:19 AM PST

I have created a custom filter, action and jail file. My question is how could I run this against an existing log file to see how many IPs would be "caught"?

I've ran fail2ban-regex and it brings me back a few hundred records (out of tens of thousands of records in the file) for each of the rules I have setup.

Thanks

What does a series of ^@ in the syslog mean?

Posted: 13 Dec 2021 03:13 AM PST

Our server did not react to pings anymore since around 23:49 yesterday until we restarted it at 7:09 am today. These are the last things we saw in the syslog:

The machine runs on Ubuntu 20.04 with plenty of docker containers for CI.

Syslog excerpt

Router Port Forwarded Socks5 Server Doesn't Work

Posted: 13 Dec 2021 02:51 AM PST

So, I have a remote ubuntu server running, and I decided to setup a Socks5 server on it for fun. I used the following command to port forward it ssh -D 1080 ubuntu@<ip_address>, and that works just fine, but after using that for a while, I got tired of doing the command, everytime I want to use the proxy. So, i tried port forwarding my Socks5 server through the server's router. Here are my configurations.

Type: Custom Settings  WAN Port = 1080 ~ 1080  LAN Port = 1080 ~ 1080  Internal Client = <my server's local ip>  Protocol = TCP  

The problem is, when i try to use the socks5 server by setting the ip address to <my_server's_address> and the port as 1080, pages just will not load, giving me a connection error. I even nmapped the port, and port 1080 was open. So, why aren't my pages loading with this type of port forwarding?

What is Therapeutic Massage?

Posted: 13 Dec 2021 02:43 AM PST

Riverdayspa™- Chennai's best professional Family spa.✓8 branches ✓ Women friendly ✓Online booking ✓Luxury spa - affordable prices. Call @ 9500029234. enter link description here

Server Move From Rackspace to AWS Cloud

Posted: 13 Dec 2021 02:28 AM PST

I'm wondering specifically is there way to migrate Centos6.3 server from Rackspace to AWS cloud, Server image is 268.92 GB Uncompressed.

I've done the sync processes before and it didn't work so I wanted to spin up the exact same instance. I also tried the newer libraries of the platform we are running but it failed.

This is essentially what i need to run https://github.com/knmnyn/ParsCit. Is there's another way to get that running on the dev machine to updated the repo on? can anyone Help me with this?

How to set flux to deploy latest image tag for every build?

Posted: 13 Dec 2021 03:19 AM PST

I have added github actions to build a docker image for every latest commit and push it to our container registry in azure.

We have created yaml files to deploy the docker image to kubernetes on azure. And deployed flux in to for auto-sync if any changes in the yaml files.

How to set flux to get the latest image from container registry when a new build comes?

Wireguard on Alpine: automatically mount wg0 after boot

Posted: 13 Dec 2021 03:21 AM PST

I have a wireguard installed on a Alpine server. It's working, but when I reboot the server, I'm obliged to manually execute wg-quick up wg0

wireguard:~# wg show  wireguard:~# wg-quick up wg0  [#]  [#] ip link add wg0 type wireguard  [#] wg setconf wg0 /dev/fd/63  [#] ip -4 address add 10.6.6.1/24 dev wg0  [#] ip link set mtu 1420 up dev wg0  [#] ip -6 route add fd9f:6666::1/128 dev wg0  [#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE  wireguard:~# wg show  interface: wg0    public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=    private key: (hidden)    listening port: 51820    peer: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=    preshared key: (hidden)    endpoint: xx.xx.xx.xx:49323    allowed ips: fd9f:6666::1/128, 10.6.6.2/32    latest handshake: 2 seconds ago    transfer: 7.05 KiB received, 6.31 KiB sent  wireguard:~#  

I have applied this doc:https://wiki.alpinelinux.org/wiki/Configure_a_Wireguard_interface_(wg)#Bringing_up_an_interface_using_wg-tools

wireguard:~# cat /etc/modules  af_packet  ipv6  wireguard  wireguard:~# cat /etc/wireguard/wg0.conf  # Updated: 2021-11-29 22:52:22.801259882 +0000 UTC / Created: 2021-11-29 19:52:59.17510794 +0000 UTC  [Interface]  Address = 10.6.6.1/24  ListenPort = 51820  PrivateKey = xxxxxxxxxxxxx=    PreUp =  PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE  PreDown =  PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE    [Peer]  ...    

Where is my mistake?

Trying to set up Exchange 2013 server to migrate from Exchange 2010

Posted: 13 Dec 2021 02:28 AM PST

I am attempting to configure a new Exchange 13 server to migrate from 2010. Here is what is done so far (Exchange 10 is the live server, 13 is the new one)

Send/receive connectors between the 2 servers are functional. I can send internal emails between the 2 and outside emails can route through the 2010 box to test mailboxes on the 2013 box. Same for the other way, I can send out of the 2013 box.

Webmail for the test users in the 2013 box is functional.

AutodiscoverURI is set up on the 2013 box to be correct

My problem I am encountering is I cannot get the Outlook 2013 clients to connect to the mailboxes on the 2013 server. If I try to add a mailbox or simply log in directly with those users, it says "Exchange must be online" then "Name cannot be resolved"

I have checked both the internal and External DNS for "exchange13" (the name of the 2013 box) and they are of the correct IP. I can go on the computer I am testing the mailboxes on and do and nslookup that points it to the correct IP. I have tried on multiple computers and gotten the same issue.

If I attempt to do the mailbox wizard setup, it does prompt me to approve the exchange13 certificate, but will just continuously prompt for credentials, which I enter, then the box simply re-appears.

I am at a complete loss of what to do right now. I've tried so many "fixes" or suggestions I saw from other forums, nothing works.

MongoDB in container on Mac not binding ports

Posted: 13 Dec 2021 03:07 AM PST

I am trying to setup a local Mongo instance using Docker for development purposes. I need to turn on authentication, and according to the docs it is possible.

The problem is, after I create the initial admin user (using those docs above), the next step is to connect "externally", which fails. I would also like to be able to connect via thick client (I am using Robo 3T).

I created the docker container using:

docker run --name mongodb -p 0.0.0.0:27017:27017 -d mongo --auth  

Then I created the admin user with:

docker exec -it mongodb mongo admin  > db.createUser({ user: 'root', pwd: '123456', roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] });  

Then I tried to login externally using:

docker run -it --rm --link mongodb:mongo mongo mongo -u root -p 123456  

to wit I get the error:

MongoDB shell version v3.6.2  connecting to: mongodb://127.0.0.1:27017  2018-01-26T16:17:34.309+0000 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused  2018-01-26T16:17:34.309+0000 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :  connect@src/mongo/shell/mongo.js:251:13  @(connect):1:6  exception: connect failed  

I think I am misunderstanding something, but I am not sure what.

Only getting 100 Mbit in Hyper V Guest from 1 Gigabit network connection

Posted: 13 Dec 2021 02:54 AM PST

I have a HP Proliant ML350 G6 with two integrated Broadcom NetXTreme Gigabit Ethernet ports running Windows server 2016, updated as of today.

If I share a folder on my hyper v host I can add and remove files at around 90MB/s through the network (both ports deliver the exact same speed).

Here you can see the details on the host. enter image description here

The above picture is on the hyper V host. I have added Network 2 to the hyper v switch manager as Network 2.

Here you can see a picture of the Virtual switch manager and the network connection in the guest.

enter image description here

The problem is that when I share a folder from the guest to the network I can only access that folder att 10MB/s. That is, somewhere along the line my gigabit network is being choked down to a measly 100Mbit. I am not using a legacy connection.

It's not the disk, because on the guest I can shuffle files around between the harddrives at around 100MB/s. Picture below is the guest copying files from one drive to another.

enter image description here

So my question is. What must I change in order to get Gigabit speeds from the Hyper V guest to my network as I'm now only getting 100Mbit from the guest to the network.

In all places I've looked it says Gigabit and the host can deliver on it, so why can't the guest?

Edit: So to clarify: Any network PC can access the hyper V host network file shares at ~100MB/s. The host can read the guest network shares at ~100MB/s. If the same PCs that can access the host att 100MB/s try to access the guest they only get 10MB/s speed when accessing any of the hyper V Guests network shares. Why?

Edit 2: As per request here are more details. Red is the host operationg system. Green is inside the Hyper V machine. enter image description here

Another picture of the Guest network settings. enter image description here

Zabbix text value trigger

Posted: 13 Dec 2021 03:07 AM PST

I am trying to configure a Zabbix trigger for an external check which has to react if the value returned by the external check is different from :

             Slave_SQL_Running: Yes    Replication running    Connection to host.com closed.  

Using {db2.playtech.ru.com:mysql_replica_check.sh.last(60)}<>expression throws syntax error.

Is there a way to configure this trigger in Zabbix?

No comments:

Post a Comment