Failed the exuctute the login command. FreeBSD help Posted: 14 Sep 2021 08:48 AM PDT |
how to display current X-Y position of window in gnome-terminal Posted: 14 Sep 2021 09:34 AM PDT For input into gnome-terminal --geometry. I would like to customize the gnome-terminal position upon opening it. |
Cannot access 127.0.0.1 on macos but localhost works Posted: 14 Sep 2021 08:42 AM PDT /etc/hosts is pretty standard: 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost # Added by Docker Desktop # To allow the same kube context to work on the host and the container: 127.0.0.1 kubernetes.docker.internal # End of section Example: localhost:3000 is accessible but 127.0.0.1:3000 is not: "This site can't be reached. The webpage at http://127.0.0.1:5000/status might be temporarily down or it may have moved permanently to a new web address. ERR_ADDRESS_INVALID" My hostname is macbookpro.local so macbookpro.local:3000 also works |
can‘t ping the ip addr after send a wget request Posted: 14 Sep 2021 09:19 AM PDT I am facing a problem while try to visit a remote website address. Please help me out. first.everything is ok. second.send a wget request.and recive "Connection reset by peer" then.ping not working. and i found the command "ip route get xxx" output has changed after send wget. and "ip route flush cache" can fixed ping.but wget still not working. CoreELEC:~ # ip route get 104.26.12.50 104.26.12.50 via 192.168.1.1 dev eth0 src 192.168.1.179 CoreELEC:~ # ping 104.26.12.50 PING 104.26.12.50 (104.26.12.50): 56 data bytes 64 bytes from 104.26.12.50: seq=0 ttl=53 time=179.858 ms 64 bytes from 104.26.12.50: seq=1 ttl=53 time=180.024 ms 64 bytes from 104.26.12.50: seq=2 ttl=53 time=179.980 ms ^Z[1]+ Stopped ping 104.26.12.50 CoreELEC:~ # wget https://104.26.12.50/ Connecting to 104.26.12.50 (104.26.12.50:443) wget: error getting response: Connection reset by peer CoreELEC:~ # ip route get 104.26.12.50 104.26.12.50 via 104.26.12.50 dev eth0 src 192.168.1.179 CoreELEC:~ # ping 104.26.12.50 PING 104.26.12.50 (104.26.12.50): 56 data bytes ^Z[2]+ Stopped ping 104.26.12.50 CoreELEC:~ # ip route flush cache CoreELEC:~ # ip route get 104.26.12.50 104.26.12.50 via 192.168.1.1 dev eth0 src 192.168.1.179 CoreELEC:~ # ping 104.26.12.50 PING 104.26.12.50 (104.26.12.50): 56 data bytes 64 bytes from 104.26.12.50: seq=0 ttl=53 time=179.730 ms 64 bytes from 104.26.12.50: seq=1 ttl=53 time=179.616 ms ^Z[3]+ Stopped ping 104.26.12.50 traceroute result CoreELEC:~ # ip route flush cache CoreELEC:~ # traceroute 104.26.12.50 traceroute to 104.26.12.50 (104.26.12.50), 30 hops max, 38 byte packets 1 192.168.1.1 (192.168.1.1) 0.770 ms 0.752 ms 0.650 ms 2 10.11.128.1 (10.11.128.1) 3.400 ms 3.728 ms 3.249 ms 3 211.136.62.237 (211.136.62.237) 5.067 ms 4.482 ms 4.310 ms 4 111.24.14.45 (111.24.14.45) 4.594 ms 4.720 ms 4.791 ms 5 111.24.2.110 (111.24.2.110) 16.499 ms^Z[1]+ Stopped traceroute 104.26.12.50 CoreELEC:~ # wget https://104.26.12.50/ Connecting to 104.26.12.50 (104.26.12.50:443) wget: error getting response: Connection reset by peer CoreELEC:~ # traceroute 104.26.12.50 traceroute to 104.26.12.50 (104.26.12.50), 30 hops max, 38 byte packets 1 192.168.1.179 (192.168.1.179) 1675.641 ms !H 2751.899 ms !H 3000.313 ms !H CoreELEC:~ # traceroute 104.26.12.50 traceroute to 104.26.12.50 (104.26.12.50), 30 hops max, 38 byte packets 1 192.168.1.179 (192.168.1.179) 724.558 ms !H 2989.973 ms !H 3000.084 ms !H CoreELEC:~ # ip route flush cache CoreELEC:~ # traceroute 104.26.12.50 traceroute to 104.26.12.50 (104.26.12.50), 30 hops max, 38 byte packets 1 192.168.1.1 (192.168.1.1) 0.831 ms 0.907 ms 0.807 ms 2 10.11.128.1 (10.11.128.1) 10.854 ms 7.432 ms 2.965 ms 3 211.136.62.237 (211.136.62.237) 24.308 ms 7.107 ms 19.634 ms 4 111.24.14.45 (111.24.14.45) 4.821 ms 4.816 ms 4.593 ms 5^Z[2]+ Stopped traceroute 104.26.12.50 |
gpg-agent hanging when trying to access private keys Posted: 14 Sep 2021 08:55 AM PDT I'm having trouble using gpg (actually, the gpg-agent ) on my Debian Buster (Oldstable) (actually PureOS Amber ) system. More precisely, I use the following: gpg --version | head -n2 gpg (GnuPG) 2.2.12 libgcrypt 1.8.4 uname -v #1 SMP Debian 4.19.171-2 (2021-01-30) lsb_release -a 2> /dev/null Distributor ID: PureOS Description: PureOS Release: 9.0 Codename: amber I haven't rebooted my machine for approx 3 months. During that time I was able to use gpg without difficulties (encrypting, decrypting, signing, verifying, key management). I made multiple updates during the last months, none of which created any problems for me (in addition I'm using needrestart ). I didn't change anything in the relevant config files (I know of, being ~/.gnupg/gpg.conf , ~/.gnupg/gpg-agent.conf , ~/.gnupg/dirmngr.conf ) in the last 3 months. Today I restarted my machine and suddenly I wasn't able to use my gpg-agent for anything, where secret keys are involved. While gpg -k [1] and gpg --search-keys DEADBEEF lead to results, gpg -K as well as gpg -d /PATH/TO/ENCRYPTED/FILE hangs indefinitely. Similarly, gpg-connect-agent reloadagent /bye and gpgconf --kill gpg-agent as well as systemctl --user start gpg-agent leads to hanging. Similarly, my systemd-unit-file is not out of the ordenary: systemctl --user cat gpg-agent | grep -Ev '^#|^$' [Unit] Description = gpg-agent (password store for gpg-keys) [Service] Type = forking ExecStart = /usr/bin/gpg-agent --daemon ExecStop = /usr/bin/gpg-connect-agent /bye Restart = on-abort [Install] WantedBy = default.target I'm aware that this problem has already been described by others (see e.g. here but the mentioned solution (pkill -9 gpg-agent ) does not apply to me, since this is happening eventhough no other process containing the string gpg (read: the gpg-agent ) is running. ps -ef | grep gpg && echo " " && gpg --verbose --debug-level guru -K MYUSERNAME 59248 59247 0 17:17 pts/1 00:00:00 grep --color=auto gpg gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat trust hashing ipc clock lookup extprog gpg: DBG: [not enabled in the source] start gpg: DBG: [not enabled in the source] keydb_new gpg: DBG: [not enabled in the source] keydb_search_reset gpg: DBG: keydb_search: reset (hd=0x000055c04a474cd0) gpg: DBG: [not enabled in the source] keydb_search enter gpg: DBG: keydb_search: 1 search descriptions: gpg: DBG: keydb_search 0: FIRST gpg: DBG: keydb_search: searching keybox (resource 0 of 1) gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => Success gpg: DBG: [not enabled in the source] keydb_search leave (found) gpg: DBG: [not enabled in the source] keydb_get_keybock enter gpg: DBG: parse_packet(iob=1): type=6 length=51 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=12 length=12 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=13 length=19 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=12 length=12 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=2 length=150 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=12 length=6 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=2 length=150 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=12 length=6 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=14 length=56 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=2 length=126 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=12 length=6 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=14 length=51 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=2 length=245 (parse.../../g10/keydb.c.1242) gpg: DBG: parse_packet(iob=1): type=12 length=6 (parse.../../g10/keydb.c.1242) gpg: DBG: iobuf-1.0: underflow: buffer size: 924; still buffered: 0 => space for 924 bytes gpg: DBG: iobuf-1.0: close '?' <<< HERE HANGING INDEFINITELY >>> ^C gpg: signal Interrupt caught ... exiting Also my variables GPG_AGENT_INFO and GPG_TTY are set. echo -e "$GPG_AGENT_INFO\n$GPG_TTY" /run/user/1000/gnupg/S.gpg-agent:0:1 /dev/pts/1 Rebooting btw. didn't change anything. Any ideas? edit: reinstalling gpg , gpg-agent and dirmngr doesn't fix the issue. Additionally, removing the files ~/.gnupg/gpg.conf , ~/.gnupg/gpg-agent.conf and ~/.gnupg/dirmngr.conf doesn't solve it. [1] technically speaking gpg -k also hung, but I assume this was because I enabeled the option with-secret in my gpg.conf -file. After commenting that out this problem disappeared |
How can I have two mirrored displays (laptop screen + TV monitor) with different resolutions? Posted: 14 Sep 2021 09:38 AM PDT My output of xrandr is: Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767 eDP1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 340mm x 190mm 1366x768 60.02*+ 1280x720 59.86 60.00 59.74 1024x768 60.00 1024x576 60.00 59.90 59.82 960x540 60.00 59.63 59.82 800x600 60.32 56.25 864x486 60.00 59.92 59.57 640x480 59.94 720x405 59.51 60.00 58.99 680x384 60.00 640x360 59.84 59.32 60.00 DP1 disconnected (normal left inverted right x axis y axis) HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm 1920x1080i 60.00 + 50.00 59.94 1920x1200 59.95 1920x1080 60.00* 50.00 59.94 1680x1050 59.88 1280x1024 60.02 1440x900 59.90 1280x720 60.00 50.00 59.94 1024x768 60.00 800x600 60.32 720x576 50.00 720x480 60.00 59.94 640x480 60.00 59.94 720x400 70.08 VGA1 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis) I want to mirror my laptop screen to my TV monitor. But how I have it currently set up, the laptop screen is too zoomed in. That is, I can't see the task bar (panel) or whisker menu because they are off the screen. I have found many thread of people changing settings with xrandr, but I can't get it to work for me. Most people seem to have issues with panning or overscanning. My issue seems much simpler but I can't fix it. I simply want both displays to fit the screen. I'm using EndeavourOS, if that's important to know. Could anyone please suggest how I can fix this? EDIT: I've just found the scaling options in the display settings GUI. I now have it fit the screen, but the UI is smaller and text is hard to read. I assume there's a way to do this properly. |
How to register a container in systemd-machined? Posted: 14 Sep 2021 07:13 AM PDT I have a few docker containers on Fedora 34, but they are not listed with machinectl list -a . Only the "physical" machine is listed. I have running the service systemd-machined but is as if containers where not registered. How can I register a container in systemd-machined ? |
How do you bridge route (broute) just ipv6 from a single interface to an existing bridge? Posted: 14 Sep 2021 07:02 AM PDT The setup that prompted this question and the solution below to make life simpler for the next person. I have a dd-wrt router. It bridges eth1, eth2, and vlan1. It routes them through vlan2 which has the wan port. My understanding absolutely sucks at ipv6, or the dd-wrt router, or both. I have T-mobile as an isp. Their ipv6 is great, until you try to run it through your own router, then that /64 they give you blows. If I let their device handle DHCP everything works: ipv4, ipv6. Problem is I need to be able to configure DHCP addresses for certain devices. It doesn't have any way to do that. in a more visual format: vlan2 (internet)(routed) -> br0 (bridge of: eth1, eth2, vlan1) So the solution seems to be bridging ipv6 and routing ipv4. Credit to this question for that info: https://serverfault.com/questions/322718/can-i-bridge-ipv4-while-routing-ipv6-on-the-same-two-interfaces In more visual format again: ipv4: vlan2 (internet)(routed) -> br0 (bridge of: eth1, eth2, vlan1) ipv6: br0 (bridge of: eth1, eth2, vlan1, vlan2) However trying to bridge a bridge gives you this error: device br0 is a bridge device itself; can't enslave a bridge device to a bridge device. |
How to move multiple files starting with different strings/names to different folder? Posted: 14 Sep 2021 07:05 AM PDT The scenario is I have a bunch of files: peter1.json peter2.json peter3.json peter4.json tom1.json tom2.json tom3.json tom4.json jane1.json jane2.json jane3.json jane4.json plus various other files I don't want to move. And I want to move those files into a folder called data. I tried variations on mv peter* tom* jane* /data and it doesn't work. Am I using the wrong tool for the job? Should this be possible with mv ? At present I get a message: usage: mv [-f | -i | -n] [-v] source target mv [-f | -i | -n] [-v] source ... directory |
(Arch/Endeavor) Sound stops for everything but one browser tab Posted: 14 Sep 2021 06:40 AM PDT After a system update, sound will (sometimes) stop working for everything other than a single firefox tab. Other tabs/programs won't be able to play sound, even if the offending tab is currently paused. Either closing firefox or pulseaudio -k followed by pulseaudio -D fixes it temporarily, until the next time it decides to let that one tab hog all sound resources. How can I make this go away for good? |
Rename Multiple Files using xargs without using a loop Posted: 14 Sep 2021 07:46 AM PDT I have a folder with files a1.cpp a2.cpp a3.cpp a4.cpp a5.cpp a6.cpp I wish to change extension of files ending in the range 2 to 5 to .java How do I rename those files without using a loop and with the help of xargs? the final output would be a1.cpp a2.java a3.java a4.java a5.java a6.cpp |
Slow transfer speed through Samba using software RAID Posted: 14 Sep 2021 07:33 AM PDT I have a mini PC (Intel Celeron J4005, 4GB RAM, Intel Gigabit NIC), configured with: - Ubuntu (5.4.0-81-generic, installed on sda)
- Samba (version 4.11.6-Ubuntu)
- FTP (vsftpd, no encryption)
- RAID5 (mdadm, md0: sdb-sdc-sdd)
The RAID array is shared via Samba and FTP, but I want to eliminate FTP, all major clients are Windows machines. The problem is that I get way slower speeds through Samba share than FTP: Device | Method | Read Speed (Mbyte/s) | md0 | local | 220 | md0 | LAN, FTP | 115 | md0 | LAN, Samba | 45 | sda | LAN, Samba | 115 | I tried with default Samba settings and with the current one (attached below), but I got the same result. htop shows 100% utilization, Samba is using 10% of one cpu core, the rest is iowait. I have no clue what the problem can be, can someone help me, or at least where I should start investigating? Samba config: [global] workgroup = WORKGROUP min protocol = SMB3 log level = 1 socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536 IPTOS_LOWDELAY SO_KEEPALIVE use sendfile = true aio read size = 65536 aio write size = 65536 read raw = yes write raw = yes getwd cache = yes acl allow execute always = true log file = /var/log/samba/log.%m max log size = 1000 logging = file server role = standalone server obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user [Share] path = /media/hdd writable = yes valid users = myuser directory mode = 0770 create mode = 0660 RAID array configuration: /dev/md0: Version : 1.2 Creation Time : Tue Sep 7 13:19:26 2021 Raid Level : raid5 Array Size : 976441344 (931.21 GiB 999.88 GB) Used Dev Size : 488220672 (465.60 GiB 499.94 GB) Raid Devices : 3 Total Devices : 3 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Tue Sep 9 14:37:52 2021 State : clean Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 64K Consistency Policy : bitmap |
GPG : no more signatures of a fresh imported key Posted: 14 Sep 2021 06:45 AM PDT SHORT GPG doesn't get signatures of an imported public key anymore (with Ubuntu 20.04) while it did it 6 months ago (with Ubuntu 18.04). I don't understand what's wrong. LONG On march, I followed this mini HOW-TO in order to verify an Ubuntu ISO. And when I imported the public key which signed the checksum file to verify the ISO file, I had a message saying this new key had 72 signatures. I listed the signatures of this key, so I could find fingerprints and import these 72 public keys. And so on, I could move up the chain of trust until I could find a trustable key (if I understood everything). But since this date, I've reinstalled my OS, so all GPG keys have been deleted. And now, when I do the same manipulation, the first imported public key has no signatures at all. So how can I move up the chain of trust ? Is there something I'm missing ? Thanks for your help. Below are the commands done on March and today to see the differences. 1) Commands on March with Ubuntu 18.04 (Yes, I copied it at this time to have an example) : $ gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 843938DF228D22F7B3742BC0D94AA3F0EFE21092 gpg: key D94AA3F0EFE21092: 2 duplicate signatures removed gpg: key D94AA3F0EFE21092: 72 signatures not checked due to missing keys gpg: key D94AA3F0EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 $ gpg --list-signatures 843938DF228D22F7B3742BC0D94AA3F0EFE21092 pub rsa4096/D94AA3F0EFE21092 2012-05-11 [SC] 843938DF228D22F7B3742BC0D94AA3F0EFE21092 uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com> sig 3 D94AA3F0EFE21092 2012-05-11 Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com> sig 0BFB847F3F272F5B 2012-05-11 [User ID not found] sig 393587D97D86500B 2012-05-11 [User ID not found] sig 5759F35001AA4A64 2012-05-12 [User ID not found] ... 2) Commands of today with Ubuntu 20.04 $ gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 843938DF228D22F7B3742BC0D94AA3F0EFE21092 gpg: key D94AA3F0EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" imported gpg: Total number processed: 1 gpg: imported: 1 $ gpg --list-signatures 843938DF228D22F7B3742BC0D94AA3F0EFE21092 pub rsa4096 2012-05-11 [SC] 843938DF228D22F7B3742BC0D94AA3F0EFE21092 uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com> sig 3 D94AA3F0EFE21092 2012-05-11 Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com> $ As we can see in command of today, there are no more 72 signatures. |
ZSH Bindkey to Run Command and Hit Enter Posted: 14 Sep 2021 09:45 AM PDT What I am looking to have a bind key that executes a command for me. In its current state when I hit Ctrl + f in the terminal I see the command and I have to hit enter. I was hoping that maybe key bind would do that for me. I currently have bindkey -s ^f "tmux-sessionizer\n" Am I stuck hitting enter myself or is there something I could do? |
Can I skip syscalls made by the dynamic loader in strace? Posted: 14 Sep 2021 08:21 AM PDT When I use strace to examine a program, I often have a hard time finding where the syscalls from the dynamic loader end and the syscalls from the program begin. The output from strace ./hello where hello a simple hello world C program is 36 lines. Here's a sample: execve("./hello", ["./hello"], 0x7fffb38f4a30 /* 73 vars */) = 0 brk(NULL) = 0x1304000 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe6715fe60) = -1 EINVAL (Invalid argument) access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=92340, ...}, AT_EMPTY_PATH) = 0 mmap(NULL, 92340, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f78d9fbd000 close(3) = 0 openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260|\2\0\0\0\0\0"..., 832) = 832 pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 pread64(3, "\4\0\0\0 \0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 48, 848) = 48 Is there a way to ignore the dynamic loader syscalls? |
systemd daily timer quits scheduling new events Posted: 14 Sep 2021 07:40 AM PDT I've been using a systemd timer reliably for months, but recently got alerted that the triggered service job hadn't run. When I used systemctl list-timers , indeed I saw that no more triggering events were scheduled. Thinking it was a fluke, I restarted the timer, used list-timers and saw that now the next run was scheduled as expected. But now the timer seems to firing only about once before it stops scheduling new events until the time is restarted. Thinking this might be a systemd bug, I upgraded the host from Ubuntu 18.04 to Ubuntu 20.04 but the issue persists. What can cause a systemd timer to stop scheduling new events?. I checked to see if the triggered service was hung and running more than 24 hours, but it's finishing reliably in about 8 hours. Here's the timer unit: [Unit] Description=Runs service [Timer] Unit=myservice.service # Run every day at this time. OnCalendar=*-*-* 10:00:00 [Install] WantedBy=timers.target Here's the .service file, which performs some maintenance tasks that take about 8 hours to complete: [Unit] Description=Do things # Send email if this fails OnFailure=status-email-devops@%n.service [Service] Environment="MAILTO=example@example.com" User=example Group=example UMask=002 ExecStart=do-thing ExecStartPost=/usr/local/bin/aws cloudwatch put-metric-data --region us-east-1 --namespace Example --dimensions Host=%H --metric-name example --value 1 StandardOutput=journal This is with systemd v245. |
how to check if MKL is installed and find it's path Posted: 14 Sep 2021 10:04 AM PDT Please help me out. it has been 3 hours that I am trying to install OSQP. I needed to install MKL. I downloaded the full package and installed it. but I don't know where is it and how I can check if it is alright. from here: https://osqp.org/docs/get_started/linear_system_solvers.html I need to do this: source $MKLROOT/bin/mklvars.sh intel64 where MKLROOT is the MKL installation directory. but what is that? I would greatly appreciate If you help me |
What can make Linux unresponsive for minutes when browsing certain websites? Posted: 14 Sep 2021 08:23 AM PDT I'm using Linux 4.15, and this happens to me many times when the RAM usage reaches its top - The whole OS becomes unresponsive, frozen and useless. The only thing I see it to be working is the disk (main system partition), which is massively in use. I don't know whether this issue is OS-specific, hardware-specific, or configuration-specific. Any ideas? |
ZFS on Linux: cannot destroy snapshot, dataset is busy Posted: 14 Sep 2021 08:16 AM PDT I'm trying to delete a bunch of old ZFS snapshots but I get errors saying that the datasets are busy: [root@pool-01 ~]# zfs list -t snapshot -o name -S creation | grep ^pool/nfs/public/mydir | xargs -n 1 zfs destroy -vr will destroy pool/nfs/public/mydir@autosnap_2019-02-24_03:13:17_hourly will reclaim 408M cannot destroy snapshot pool/nfs/public/mydir@autosnap_2019-02-24_03:13:17_hourly: dataset is busy will destroy pool/nfs/public/mydir@autosnap_2019-02-24_02:13:17_hourly will reclaim 409M cannot destroy snapshot pool/nfs/public/mydir@autosnap_2019-02-24_02:13:17_hourly: dataset is busy will destroy pool/nfs/public/mydir@autosnap_2019-02-24_01:13:18_hourly will reclaim 394M Running lsof shows no processes accessing these snapshots: [root@pool-01 ~]# lsof | grep pool/nfs/public/mydir There also appears to be no holds on any of the snapshots: [root@pool-01 ~]# zfs holds pool/nfs/public/mydir@autosnap_2019-02-24_03:13:17_hourly NAME TAG TIMESTAMP Is there anything else I should look out for? Anything else I can do besides a reoot? |
How to rename multiple directories? Posted: 14 Sep 2021 09:23 AM PDT Here are my directories: P [001] P [002] P [003] I want to rename to: P001 P002 P003 I used the code: for P in *\ *; do mv '$P' '${P// /_}'; done but I am missing something. |
Unable to NFS mount "Program not registered error" Posted: 14 Sep 2021 09:35 AM PDT I'm trying to mount an NFS volume with no success. I'm running Linux 7.3 as a VM. I don't see any error messages in /var/log/messages . These are the steps I've taken so far: showmount [root@backup ~]# showmount -e 192.168.1.212 clnt_create: RPC: Program not registered systemd NFS status [root@backup ~]# systemctl status nfs â nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled) Active: active (exited) since Fri 2018-08-10 13:38:11 MDT; 26min ago Process: 961 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS) Process: 939 ExecStartPre=/bin/sh -c /bin/kill -HUP `cat /run/gssproxy.pid` (code=exited, status=0/SUCCESS) Process: 937 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) Main PID: 961 (code=exited, status=0/SUCCESS) CGroup: /system.slice/nfs-server.service Aug 10 13:38:11 backup systemd[1]: Starting NFS server and services... Aug 10 13:38:11 backup systemd[1]: Started NFS server and services. nfslock [root@backup ~]# systemctl status nfslock â rpc-statd.service - NFS status monitor for NFSv2/3 locking. Loaded: loaded (/usr/lib/systemd/system/rpc-statd.service; static; vendor preset: disabled) Active: active (running) since Fri 2018-08-10 13:38:11 MDT; 27min ago Process: 926 ExecStart=/usr/sbin/rpc.statd $STATDARGS (code=exited, status=0/SUCCESS) Main PID: 933 (rpc.statd) CGroup: /system.slice/rpc-statd.service ââ933 /usr/sbin/rpc.statd Aug 10 13:38:11 backup systemd[1]: Starting NFS status monitor for NFSv2/3 locking.... Aug 10 13:38:11 backup rpc.statd[933]: Version 1.3.0 starting Aug 10 13:38:11 backup rpc.statd[933]: Flags: TI-RPC Aug 10 13:38:11 backup systemd[1]: Started NFS status monitor for NFSv2/3 locking.. systemd rpcbind status [root@backup ~]# systemctl status rpcbind â rpcbind.service - RPC bind service Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2018-08-10 13:38:10 MDT; 28min ago Process: 685 ExecStart=/sbin/rpcbind -w $RPCBIND_ARGS (code=exited, status=0/SUCCESS) Main PID: 688 (rpcbind) CGroup: /system.slice/rpcbind.service ââ688 /sbin/rpcbind -w Aug 10 13:38:10 backup systemd[1]: Starting RPC bind service... Aug 10 13:38:10 backup systemd[1]: Started RPC bind service. rpcinfo [root@backup ~]# rpcinfo -p 192.168.1.212 | cut -c30- | sort -u portmapper service ypbind I don't understand why the rpcinfo is missing NFS? Are there any other commands I can try to troubleshoot this? |
warning /dev/centos/root swap centos-root does not exist -- after configuring DRBD Posted: 14 Sep 2021 08:01 AM PDT I configured DRBD on default CentOS 7.3 Installation like following: /dev/centos/home was taking all the space in sda2 so reduced it and created /dev/centos/home (20% space) and /dev/centos/drbd (remaining space using lvcreate -l 100%VG -n drbd centos ) DRBD resource device is /dev/drbd0 and disk is /dev/mapper/centos-drbd formatted as ext4 . Now everytime I reboot the system I get the errors: Warning: /dev/centos/root does not exist Warning: /dev/centos/swap does not exist Warning: /dev/mapper/centos-root does not exist From dracut shell I run : $ lvm vgscan $ lvm vgchange -ay $ exit and system boots fine. But It fails again at reboot . Any solution? UPDATE: Found the cause, drbd device was causing the issue. I removed it from both servers and it fixed the 2nd server but not the 1st one. blkid still shows wrong UUID and Type of /dev/sda2 $ blkid /dev/sda1: UUID="bdfa3672-b24b-41ec-88f8-d0f0a81057d1" TYPE="xfs" /dev/sda2: UUID="d8d241f07976f3ce" TYPE="drbd" /dev/mapper/centos-swap: UUID="3c8653bb-060a-4e46-8eaa-ce51637752ee" TYPE="swap" /dev/mapper/centos-root: UUID="93941d8b-22e0-4ad7-8666-1ce8ba8d1109" TYPE="xfs" /dev/mapper/centos-home: UUID="63c9a5ad-9b4b-4852-8e95-22b356d8729a" TYPE="xfs" |
gnome-session doesn't start on remote X server Posted: 14 Sep 2021 07:05 AM PDT I'm reposting Gnome Session Doesn't Start on Remote X Server, here, because I believe it's a Gnome question, not just an Ubuntu one. I have an Ubuntu host, which I reach via ssh -Y . The client is my macOS laptop, running XQuartz. I can do xclock or other X apps from the host and see them on my laptop. What I cannot run is gnome-session, which, as far as I understand, should be the whole thing that comes up when I login to the machine from the local console. DISPLAY is correctly set, but seems to be ignored. Passing --display="$DISPLAY" to gnome-session yields: ** (gnome-session-binary:5943): WARNING **: Unknown option --display=localhost:10.0 Indeed, my manpage for gnome-session doesn't mention --display, while manpages around Internet do. So, I guess, it was removed at some point, do I still have a way to do it? I've also discovered that other gnome applications (e.g., gnome-software) have a --display option, but they ignore it and the application runs on the console desktop, rather than on my laptop. |
VPN Client and IP tables Posted: 14 Sep 2021 09:07 AM PDT I have a Debian 8.7 IoT Version on a Beaglebone Black device which is connected to the Internet using a GSM Modem. I installed a VPN client (zerotier) which joins a virtual network. Something changes the default route and my Internet is no longer working. netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 zt0 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0 10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 10.241.0.0 0.0.0.0 255.255.0.0 U 0 0 0 zt0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 zt0 192.168.6.0 0.0.0.0 255.255.255.252 U 0 0 0 usb1 192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0 usb0 How can I ensure the default communication is routed over ppp0 and only 10.241.0.0/16 over zt0. After adding the default GW, I get the following Table: Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 zt0 0.0.0.0 100.97.168.1 0.0.0.0 UG 0 0 0 ppp0 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0 I found out what adds the entry: Oct 02 12:55:48 PTMH7 connmand[797]: zt0 {add} route 0.0.0.0 gw 0.0.0.0 scope 253 <LINK> How can I prevent ConnMan from doing so? |
How to get process(PID) initiated connections Posted: 14 Sep 2021 09:01 AM PDT For example tomcat (PID is 4739 ) is initiated connection to postgress (Which is another server) to retrieve data from DB because, tomcat got the request from client(curl 192.168.1.12:8088/get ). In this, tomcat uses a random tcp source port to connection postgress . Now, is there any way to get these source ports that was by created tomcat PID . I used netstat -tp , but I'm not getting PID of the connection. Getting PID only I use l - Listening like netstat -tlp . I tried to read PID sockets from /proc/PID/fd and then correlated to /proc/net/tcp . But I'm not seeing anything in /proc/net/tcp . NOTE: The topology like below. My requests(server1) <------->tomcat(server2) <-------->postgress(server2) UPDATE1 netstat -tepn output Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp6 0 1 172.25.30.21:36598 xx.xx.xx.91:4343 SYN_SENT 0 42955126 9661/java tcp6 0 0 172.25.30.21:38340 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38064 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38282 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37520 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38286 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37654 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37906 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38152 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38124 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37412 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37374 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38126 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38252 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37224 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37800 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37780 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38274 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37244 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37880 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38230 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38118 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:37496 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:1099 172.25.30.21:47496 ESTABLISHED 0 42954824 4738/java tcp6 0 0 172.25.30.21:37474 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38200 172.25.30.12:5432 TIME_WAIT 0 0 - tcp6 0 0 172.25.30.21:38102 172.25.30.12:5432 TIME_WAIT 0 0 - PID grep ed output veeru@localhost:~/veeru# netstat -tepn | grep 4738 tcp6 0 0 127.0.1.1:41095 127.0.0.1:45180 ESTABLISHED 0 42960213 4738/java tcp6 0 0 172.25.30.21:1099 172.25.30.21:49984 ESTABLISHED 0 42963153 4738/java |
find out the size of open terminal Posted: 14 Sep 2021 09:34 AM PDT On DE we can resize terminal (gnome-terminal for example) for our convenience,how can I know the size of the terminal in terms of pixels or number of columns and rows? |
How can I use rename to recursively rename everyting to uppercase Posted: 14 Sep 2021 09:18 AM PDT I'd like to recursively rename all files and folders (sub-folders) to uppercase. I found some scripts that will do it to lowercase, but I don't know how to change them so it will do it the other way around (lower to upper). The script that I found and works for lowercase, but I didn't knew how to modify is: rename 'y/A-Z/a-z/' * It's from man rename . |
Is there a VPN client for Kali? Posted: 14 Sep 2021 09:49 AM PDT I'm pentesting a network using Kali Linux, however, sometimes I have to be outside the network. I'd like to perform this via VPN if possible, else I have to drive home each time (10 miles, 15km) which is a waste of a lot of my time. Is there any VPN client available for Kali Linux? It should have PPTP. |
GPT or MBR: How do I know? Posted: 14 Sep 2021 09:45 AM PDT How can I tell whether my harddrive is laid out using an MBR or GPT format? |
How can I add a signature .png to a PDF in Linux? Posted: 14 Sep 2021 09:49 AM PDT I have a scanned copy of my written signature and I need to apply it to some documents in the signature block. I used to do this on Windows all the time but I now have only Linux. Is this possible? How can I add a signature image to a PDF file in Linux (Gnome 3)? |
No comments:
Post a Comment