Wednesday, September 15, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Mistakenly had nano at the beginning of ps -e | grep ssh-agent

Posted: 15 Sep 2021 10:21 AM PDT

Like I said in the title, I accidentally ran this:

nano ps -e | grep ssh-agent

Now when I properly run ps -e | grep ssh-agent I see this:

# ps -e | grep ssh-agent   1613 ??         0:00.05 /usr/bin/ssh-agent -l  27195 ttys000    0:00.00 grep ssh-agent  

I had to terminate the session to get out of the command state that left me in. In hindsight I suppose I could have just ran it again.

Here's what I tried:

# ssh-agent -k  unset SSH_AUTH_SOCK;  unset SSH_AGENT_PID;  

I then got:

SSH_AGENT_PID not set, cannot kill agent  

So then I tried:

ps -ef | grep ssh-agent

Now I have this:

# ps -ef | grep ssh-agent    501  1613     1   0 Sun07PM ??         0:00.06 /usr/bin/ssh-agent -l    501 27629 26750   0 12:06PM ttys000    0:00.01 grep ssh-agent   

Can someone help me correct this? I don't want to mess with it further, as this is not an area that I'm familiar with.

High CPU usage of postgresql

Posted: 15 Sep 2021 10:02 AM PDT

I have a PostgreSQL backed complex Ruby on Rails application running on a Ubuntu Virtual Machine. I see that the Postgres processes were having very high CPU usage while running top command. Periodically the %CPU is going up to 94 and 95.

lscpu  

gives the fallowing output

   Architecture:          i686     CPU op-mode(s):        32-bit, 64-bit     Byte Order:            Little Endian     CPU(s):                4     On-line CPU(s) list:   0-3     Thread(s) per core:    1     Core(s) per socket:    1     Socket(s):             4     Vendor ID:             GenuineIntel     CPU family:            6     Model:                 85     Stepping:              4     CPU MHz:               2100.000     BogoMIPS:              4200.00     L1d cache:             32K     L1i cache:             32K     L2 cache:              1024K     L3 cache:              33792K  

top -n1 top -n1

top -c top -c

I want the know the reason for the High CPU usage of Postgres.

Any help is appreciated. Thanks in Advance.

Looking for Distro With easy OpenCL support

Posted: 15 Sep 2021 09:56 AM PDT

I am looking for a distro with OpenCl support that is not Ubuntu or Fedora. I am open to any other distro I didnt have any luck in linux mint cinnamon.

I am running an 5700XT.

Why is "ssh -t" not working as far as logging in and running a command?

Posted: 15 Sep 2021 09:44 AM PDT

I'm on Mac OS Big Sur and running a virtual Ubuntu 16.04 Linux instance (using vagrant). I can run the following two commands fine (one to ssh into the virtual server, and the second to run a command within it )…

$ ssh myvirtual.local  Warning: Permanently added '10.0.4.19' (ECDSA) to the list of known hosts.  Last login: Wed Sep 15 16:37:57 2021 from 10.0.4.1  $ foreman start -f Procfile.debug  16:38:26 rails.1      | started with pid 27884  16:38:26 worker.1     | started with pid 27885  16:38:26 scheduler.1  | started with pid 27887  ...  

I would like to be able to combine these two commands, so I tried

$ ssh -t myvirtual.local 'foreman start -f Procfile.debug'  Warning: Permanently added '10.0.4.19' (ECDSA) to the list of known hosts.  bash: foreman: command not found  Connection to 10.0.4.19 closed.  

I'm confused about what other setup I would need to run to have a single command to simulate what I'm doing initially. Any thoughts?

Does redirected stderr remain unbuffered in bash?

Posted: 15 Sep 2021 09:35 AM PDT

{  echo bla1  echo bla2 2>&1  } >>myfile 2>&1  

Is there any difference between the two echo-s?

The only difference I can think of, if echo bla2 2>&1 retains the unbuffered property from stderr.

How about

{  echo bla1  echo bla2 2>&1 &  } >>myfile 2>&1  

?

Is it the same as

{  echo bla1  echo bla2 &  } >>myfile 2>&1  

?

After {...} >>myfile 2>&1 will fd1 and fd2 essentially become the same thing, or do they retain anything from their past?

Kali Linux Terminal jumps back to first character and bugs out

Posted: 15 Sep 2021 09:27 AM PDT

So I'm currently following a Youtube tutorial but when I try to type out the following command

cat ip.txt | grep "64 bytes" | cut .....

The terminal bugs out when I type the first c in cut. I will add a gif so you can understand better what I mean.

enter image description here

It automatically jumps to the first character of the line and the terminal bugs out unless I do CTRL + C why is that?

Allocating 8MB physically contiguous memory in Linux

Posted: 15 Sep 2021 08:23 AM PDT

Can I allocate more than 4MB physically contiguous memory without enabling CONFIG_CMA kernel config parameter? Currently, I am using dma_alloc_coherent call but it fails if we try to allocate a memory more than 4MB size.

Pipe for loop with awk and if

Posted: 15 Sep 2021 08:37 AM PDT

I'm trying to create a cron job that checks the status of certain worker machines and triggers a webhook:

It works, but I'm not sure that this is the best approach:

for i in $(oc get nodes | awk 'FNR>1 {print $2}');do if [[ $i != 'Ready' ]];then <TRIGGER_WEBHOOK>;fi;done  

Output of oc get nodes

# oc get nodes  NAME                         STATUS   ROLES    AGE    VERSION  master1                      Ready    master   27h    v1.20.0+bafe72f-1054  ....  worker4                      Ready    worker   10h    v1.20.0+bafe72f-1054  

Any advice to improve it. Thx

RHEL8 - Missing yum.log from /var/log/

Posted: 15 Sep 2021 08:24 AM PDT

I am not seeing the log file for yum in the log directory. This is a new VM install. Any assistance in getting thie file created and logs recorded is greatly appricated. enter image description here

Segmentation fault (core dumped) when using inotifywatch

Posted: 15 Sep 2021 08:06 AM PDT

I need to watch a file system for the creation of new files of a specific type. Thinking that this would be a perfect use case for inotifywatch, I set out to try and make something work. I went to the man pages for the program, tried to implement things, got errors.. then tried to run their basic example.

inotifywatch -v -e access -e modify -t 60 -r ~/  

I got the same eorror which was

Establishing watches...  OK, /home/mcamp is now being watched.  Total of 27243 watches.  Finished establishing watches, now collecting statistics.  Will listen for events for 30 seconds.  total access modify filename  Segmentation fault (core dumped)  

What's causing this? inotifywait works for a single file.. I haven't had any luck with google. Has anyone else seen this error before and know how to handle it?

TIA

unpack multiple files from .tar.gz to multiple different directories

Posted: 15 Sep 2021 08:08 AM PDT

I have a .tar.gz file that contains a backup of files across many directories.

Is it possible to unpack the single .tar.gz file and have those files moved to their intended directories?

If i run tar -ztvf filename.tar.gz I see all the files with the full directory. That is /etc/path/file, /usr/path.file...etc. is returned for many (over 1,000) files. So the archive was created with the path to file preserved if that helps.

I know that tar –xvzf filename.tar.gz –C /path/to/directory will allow me to move a specific file. But can this be done with multiple files going to multiple different locations?

thanks

stdint.h: no such file or directory

Posted: 15 Sep 2021 07:42 AM PDT

I am trying to compile coremarks to benchmark one of my CPU cores I generated (from here: https://gitlab.com/incoresemi/core-generators/benchmarks/-/tree/master).

I get the following error:

In file included from common/syscalls.c:3:  /usr/lib/gcc/riscv64-unknown-elf/10.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory      9 | # include_next <stdint.h>        |                ^~~~~~~~~~  compilation terminated.  make: *** [Makefile:58: coremarks] Error 1  

I already have the riscv toolchain installed. I also tried installing libc6-dev and avr-libc as I read this in a few answers online.

How do I resolve this?

thanks for your time in advance.

Midnight commander: How to define condition in mc.menu

Posted: 15 Sep 2021 07:24 AM PDT

I'm trying to add new command, and the menu option should be displayed when the single file is selected, (it's executable and not a directory) or (not a link and the name ends with .so) or (not a link and the name contains .so.). The following condition does not work at all: + ! t t & ((t x & t n) | (t r & f \.so$) | (t r & f \.so.))

Also, do I need to use brackets e.g. c1 & c2 | c3 & c4 instead of (c1 & c2) | (c3 & c4)??

Permissions of all files and directories in /usr

Posted: 15 Sep 2021 07:29 AM PDT

Oh my.. I just did a terrible mistake: chown -R root:root /usr. Mea [maxima] culpa.. I fixed sudo and pkexec already, but I want to be sure, there is no "sleeping" issue waiting on me in the future.

Could anyone please find out using simple command, what files / directories have 'special' permissions? I know about /usr/bin/sudo, /usr/bin/pkexec and /usr/lib/policykit-1 only. Thanks..

I'm using Debian 11..

No trusted certificate found when using Java for making request on HTTPS

Posted: 15 Sep 2021 07:25 AM PDT

I'm a Java developer and I need to use a particular version of java 8 (1.8.0_162) can't use OpenJDK either.

But, I'm getting this error when I try to connect / get / download / whatever from my java program on any HTTPS url

sun.security.validator.ValidatorException: No trusted certificate found

I know that the code is right, because its working on production, but I can run the code on my local machine.

I think is something related to certificates, but don't know how to fix.

How to have brightness fade away before display sleeping

Posted: 15 Sep 2021 07:38 AM PDT

Gnome and KDE will fade away the brightness little by little before display sleeping, how to get the function to my XFCE or xUbuntu?

Add single-value content of one file as additional column to another file

Posted: 15 Sep 2021 07:30 AM PDT

I have two files. One contains several columns and rows, while the other one only contains one value:

  • file1:
    abc def  ghi jkl  
  • file2:
    hello  

I want to add another column to file1 that always contains the value found in file2. So, the output should look like this:

abc def hello  ghi jkl hello  

Can anyone help me do that?

Touch screen not working in redhat linux8.4

Posted: 15 Sep 2021 07:27 AM PDT

I have my lenevo T490 system from Linux 7 to 8.4 version. My touchscreen is working fine in starting but it suddenly stopped working and not able see Xinput ELAN Touchscreen.

Need help to enable touch screen on my system

How to mirror a screen in TigerVNC?

Posted: 15 Sep 2021 09:09 AM PDT

How to mirror a screen?

I have an answer (VNC).
A Linux VNC server - https://help.ubuntu.com/community/VNC/Servers.

Upload all the files and directories in a drive older than a day to AWS and delete them from the drive [closed]

Posted: 15 Sep 2021 07:25 AM PDT

Please find a scenario-based question, you have to write a script to do the following and share the script :

Scenario - Upload all the files and directories in a drive older than a day to AWS and delete them from the drive.

Reset NixOS container

Posted: 15 Sep 2021 09:17 AM PDT

Nixos containers can be created declaring them in the configuration.nix. Is there way to 'reset' them, hence delete all data, and recreate the container?

Failed to get D-Bus connection: Connection refused

Posted: 15 Sep 2021 07:59 AM PDT

A sudo user named my-host is getting the following error message when trying to reload systemctl on an Amazon Linux 2 EC2 image.

[my-host@ip-12-3-4-56 ~]$ systemctl --user daemon-reload  Failed to get D-Bus connection: Connection refused  

What specifically needs to be done to resolve and remove this error?

The other postings I have found on this error message are either related to Debian with an apt-get solution that does not apply here, or are related to Docker images, which also do not apply here.

If the problem has to do with user privileges, what would need to be done to remediate the problem?

This machine has a requirement that some systemctl commands like this must not run as sudo.

TRY AGAIN WITH DIRECT LOGIN USER PER @Stewart's and @JdeBP's SUGGESTIONS:

We then tried using a sudo user that has direct ssh ability from the outside world, but still got the following results:

[ssh-login-user@ip-12-3-4-567 ~]$ systemctl --user daemon-reload  Failed to get D-Bus connection: No such file or directory  [ssh-login-user@ip-12-3-4-567 ~]$ echo $XDG_RUNTIME_DIR $UID  /run/user/1001 1001  [ssh-login-user@ip-12-3-4-567 ~]$ systemctl --user status  Failed to get D-Bus connection: No such file or directory  [ssh-login-user@ip-12-3-4-567 ~]$ sudo install -d -o ssh-login-user /run/user/`id -u ssh-login-user`  [sudo] password for ssh-login-user:  [ssh-login-user@ip-12-3-4-567 ~]$ sudo systemctl start user@`id -u ssh-login-user`  Failed to start user@1001.service: Unit not found.  [ssh-login-user@ip-12-3-4-567 ~]$ sudo -u ssh-login-user DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/`id -u ssh-login-user`/bus systemctl --user  Failed to get D-Bus connection: No such file or directory  

To confirm the state of systemctl, we then also did the following, which reported one degraded service as follows:

● ip-12-3-4-567.aws-region-n.compute.internal      State: degraded       Jobs: 0 queued     Failed: 1 units      Since: Wed 2020-10-28 23:40:50 UTC; 7min ago     CGroup: /             ├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 22             ├─user.slice             │ └─user-1001.slice             │   └─session-2.scope             │     ├─18736 sshd: ssh-login-user [priv]             │     ├─18738 sshd: ssh-login-user@pts/0             │     ├─18739 -bash             │     ├─18792 sudo systemctl status             │     └─18793 systemctl status             └─system.slice               ├─rngd.service               │ └─2692 /sbin/rngd -f               ├─amazon-ssm-agent.service               │ ├─3810 /usr/bin/amazon-ssm-agent               │ └─4428 /usr/bin/ssm-agent-worker               ├─libstoragemgmt.service               │ └─2694 /usr/bin/lsmd -d               ├─systemd-udevd.service               │ └─1968 /usr/lib/systemd/systemd-udevd               ├─system-serial\x2dgetty.slice               │ └─serial-getty@ttyS0.service               │   └─3273 /sbin/agetty --keep-baud 115200,38400,9600 ttyS0 vt220               ├─chronyd.service               │ └─2685 /usr/sbin/chronyd               ├─auditd.service               │ └─2646 /sbin/auditd               ├─systemd-journald.service               │ └─1931 /usr/lib/systemd/systemd-journald               ├─atd.service               │ └─3239 /usr/sbin/atd -f               ├─sshd.service               │ └─3486 /usr/sbin/sshd -D               ├─crond.service               │ └─3529 /usr/sbin/crond -n               ├─gssproxy.service               │ └─2711 /usr/sbin/gssproxy -D               ├─rsyslog.service               │ └─3229 /usr/sbin/rsyslogd -n               ├─rpcbind.service               │ └─2683 /sbin/rpcbind -w               ├─network.service               │ ├─2919 /sbin/dhclient -q -lf /var/lib/dhclient/dhclient--eth0.lease -pf /var/run/dhclient-eth0.pid eth0               │ └─3034 /sbin/dhclient -6 -nw -lf /var/lib/dhclient/dhclient6--eth0.lease -pf /var/run/dhclient6-eth0.pid eth0               ├─lvm2-lvmetad.service               │ └─1953 /usr/sbin/lvmetad -f               ├─postfix.service               │ ├─3177 /usr/libexec/postfix/master -w               │ ├─3178 pickup -l -t unix -u               │ └─3179 qmgr -l -t unix -u               ├─acpid.service               │ └─3456 /usr/sbin/acpid               ├─dbus.service               │ └─2681 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation               ├─system-getty.slice               │ └─getty@tty1.service               │   └─3274 /sbin/agetty --noclear tty1 linux               └─systemd-logind.service                 └─2686 /usr/lib/systemd/systemd-logind  

What else can we do to resolve this problem?

ANSWER: We decided to continue running systemctl as sudo and instead to just specify the user in the .service file so that the service will run as the specified user and not as root or sudo. We chose this approach because the answers below did not resolve the problem.

Dump VGA bios from linux

Posted: 15 Sep 2021 07:59 AM PDT

anyone know how to dump the vga firmware ? I have tried here but doesn't work. Anyone know how can I dump the vga bios or can try if the command at the link work for you ?

Thanks so much.

Setting up squid transparent proxy with SSL bumping on Debian 10

Posted: 15 Sep 2021 09:06 AM PDT

Debian 10 with squid working as a transparent proxy. Now want to add SSL.

# apt-get install openssl  # mkdir -p /etc/squid/cert  # cd /etc/squid/cert  # openssl req -new -newkey rsa:4096 -sha256 -days 365 -nodes -x509 -keyout myCA.pem -out myCA.pem  # openssl x509 -in myCA.pem -outform DER -out myCA.der  #     # iptables -t nat -A PREROUTING -i br0 -p tcp --dport 443 -j DNAT --to 192.168.1.51:3129  # iptables -t nat -A PREROUTING -i br0 -p tcp --dport 443 -j REDIRECT --to-port 3129  # iptables-save > /etc/iptables/rules.v4  

Question 1: Now what I read says that next I need to

/usr/lib/squid/security_file_certgen -c -s /var/cache/squid/ssl_db -M 4MB  

however I cannot find security_file_certgen on my system.

Question 2: If I now proceed anyway to add in squid.conf:

https_port 3129 intercept ssl-bump cert=/etc/squid/cert/myCA.pem generate-host-certificates=on  

then squid fails to start:

2020/10/07 14:09:27| FATAL: Unknown https_port option 'ssl-bump'.  2020/10/07 14:09:27| FATAL: Bungled /etc/squid/squid.conf line 5: https_port 3129 int  2020/10/07 14:09:27| Squid Cache (Version 4.6): Terminated abnormally.  CPU Usage: 0.017 seconds = 0.017 user + 0.000 sys  Maximum Resident Size: 57792 KB  Page faults with physical i/o: 0  FATAL: Bungled /etc/squid/squid.conf line 5: https_port 3129 intercept ssl-bump cert=  squid.service: Control process exited, code=exited, status=1/FAILURE  squid.service: Failed with result 'exit-code'.  Failed to start Squid Web Proxy Server.  

I notice that squid -v contains neither --enable-ssl-crtd nor --with-openssl, but I don't understand what to do about this.

Update

All of the guides on the Internet at the time of writing are obsolete because https://wiki.squid-cache.org/Features/SslBump ssl-bump
has been replaced with https://wiki.squid-cache.org/Features/BumpSslServerFirst server-first and server-first has been replaced with https://wiki.squid-cache.org/Features/SslPeekAndSplice peek-n-splice.

I was hoping this might work that I got from https://serverfault.com/questions/743483/transparent-http-https-domain-filtering-proxy :

https_port 3129 intercept ssl-bump  ssl_bump peek all  ssl_bump splice all    

but no:

2020/10/08 09:57:49| FATAL: Unknown https_port option 'ssl-bump'.  2020/10/08 09:57:49| FATAL: Bungled /etc/squid/squid.conf line 6: https_port 3129 int  2020/10/08 09:57:49| Squid Cache (Version 4.6): Terminated abnormally.  CPU Usage: 0.017 seconds = 0.008 user + 0.008 sys  Maximum Resident Size: 57152 KB  Page faults with physical i/o: 0  FATAL: Bungled /etc/squid/squid.conf line 6: https_port 3129 intercept ssl-bump  squid.service: Control process exited, code=exited, status=1/FAILURE  squid.service: Failed with result 'exit-code'.  Failed to start Squid Web Proxy Server.  

Update: compiling squid with SSL

# cd ~  # mkdir squid-build  # cd squid-build  # apt-get install openssh-server net-tools  # apt-get install openssl devscripts build-essential fakeroot libdbi-perl libssl-dev# libssl1.0-dev  # apt-get install dpkg-dev  # apt-get source squid  # apt-get build-dep squid  # cd squid-4.6/  # vi debian/rules  # dpkg-source --commit  

In debian/rules file add to DEB_CONFIGURE_EXTRA_FLAGS the flags:

--with-default-user=proxy \  --enable-ssl \  --enable-ssl-crtd \  --with-openssl \  --disable-ipv6  

...and build...

# debuild -us -uc  

...and install...

# cd ..  # pwd   /root/squid-build  # mv squid3*.deb squid3.deb.NotIncluded  # dpkg -i *.deb  

However, still no ssl_crtd.

Has it been renamed to security_file_certgen ? (https://bugzilla.redhat.com/show_bug.cgi?id=1397644)

Update: compiled squid

Got squid compiled and running for HTTP but don't know what to do for HTTPS -- and nor apparently does anyone else. Is it impossible? It seems to be something to do with certificates and squid.conf.

Asus ROG driver for ubuntu

Posted: 15 Sep 2021 08:00 AM PDT

I bought an Asus ROG Strix without operating system, and I've just installed Ubuntu. The keyboard led are blinking, there is a way to keep it on without blinking?

Get the device path of USB given device ID

Posted: 15 Sep 2021 10:13 AM PDT

After plugging the USB to the port of my machine, if I do lsusb I see the device I am looking for:

Bus 001 Device 004: ID 04f2:b573 Some Manufacturer

If I list the devices under /dev/, I can see lots of device paths, such as /dev/tty0, /dev/ttyUSB0... etc. For what I understand, one of these paths will be my USB device, or be where my USB device is connected to.

How do I know which one is the one with the ID 04f2:b573?


This question is similar to mine, however (referring to the accepted answer) I don't know what exactly is $ID_SERIAL, or how to I set it to be equal to the Id I'm looking for, or even what is the correct path (since his example shows multiple device paths, such as /dev/ttyACM0, /dev/sdb, /dev/input/event5 ...)

Also, the second answer assumes that I know the device is connected to /dev/ttyUSB0, which I don't know beforehand (testing it on this specific path gives me no device, by the way).

How do I mount an Ext4 File System with an alternate SuperBlock?

Posted: 15 Sep 2021 10:06 AM PDT

I know how to get back a working file-system(FS), the usual way, by running

e2fsck -b alt_SB_no /dev/sdX

which will fix my FS.

I have an ext4 image-file that is corrupt - I want to patch in just the Super Block. I want to mount it via loop using an alternate super-block number. I DO NOT want to alter the image beyond a SuperBlock.

How do I do this?

Optimize ext4 for always full operation

Posted: 15 Sep 2021 10:23 AM PDT

Our application writes data to disk as a huge ring buffer (30 to 150TB); writing new files while deleting old files. As such, by definition, the disk is always "near full".

The writer process creates various files at a net input speed of about 100-150 Mbits/s. Data files are a mixture of 1GB 'data' files and several smaller meta data files. (The input speed is constant, but note new file sets are created only once per two minutes).

There is a separate deleter process which deletes the "oldest" files every 30s. It keeps deleting until there it reaches 15GB free space headroom on the disk.

So in stable operation, all data partitions have only 15GB free space.

On this SO question relating to file system slowdown, DepressedDaniel commented:

Sync hanging just means the filesystem is working hard to save the latest operations consistently. It is most certainly trying to shuffle data around on the disk in that time. I don't know the details, but I'm pretty sure if your filesystem is heavily fragmented, ext4 will try to do something about that. And that can't be good if the filesystem is nearly 100% full. The only reasonable way to utilize a filesystem at near 100% of capacity is to statically initialize it with some files and then overwrite those same files in place (to avoid fragmenting). Probably works best with ext2/3.

Is ext4 a bad choice for this application? Since we are running live, what tuning can be done to ext4 to avoid fragmentation, slow downs, or other performance limitations? Changing from ext4 would be quite difficult...

(and re-writing statically created files means rewriting the entire application)

Thanks!

EDIT I

The server has 50 to 100 TB of disks attached (24 drives). The Areca RAID controller manages the 24 drives as a RAID-6 raid set.

From there we divide into several partitions/volumes, with each volume being 5 to 10TB. So the size of any one volume is not huge.

The "writer" process finds the first volume with "enough" space and writes a file there. After the file is written the process is repeated.

For a brand new machine, the volumes are filled up in order. If all volumes are "full" then the "deleter" process starts deleting the oldest files until "enough" space is available.

Over a long time, because of the action of other processes, the time sequence of files becomes randomly distributed across all volumes.

EDIT II

Running fsck shows very low fragmentation: 1 - 2%. However, in the meantime, slow filesystem access has been traced to various system calls like fclose(), fwrite(), ftello() etc taking a very long time to execute (5 to 60 seconds!).

So far no solution on this problem. See more details at this SO question: How to debug very slow (200 sec) fwrite()/ftello()/fclose()?

I've disabled sysstat and raid-check to see if any improvement.

NFS no longer mounts: rpc-statd fails to start

Posted: 15 Sep 2021 07:58 AM PDT

Whenever I try to start an NFS mount I get:

Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23582]: Version 1.3.2 starting  Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23582]: Flags: TI-RPC  Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23582]: Running as root.  chown /var/lib/nfs to choose different user  Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23582]: failed to create RPC listeners, exiting  Feb 12 00:02:19 martin-xps.lico.nl systemd[1]: rpc-statd.service: control process exited, code=exited status=1  Feb 12 00:02:19 martin-xps.lico.nl systemd[1]: Failed to start NFS status monitor for NFSv2/3 locking..  Feb 12 00:02:19 martin-xps.lico.nl systemd[1]: Unit rpc-statd.service entered failed state.  Feb 12 00:02:19 martin-xps.lico.nl systemd[1]: rpc-statd.service failed.  Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23584]: Version 1.3.2 starting  Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23584]: Flags: TI-RPC  Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23584]: Running as root.  chown /var/lib/nfs to choose different user  Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23584]: failed to create RPC listeners, exiting  

I tried to chown /var/lib/nfs to rpc, which just gives me the error minus the "Running as root" line:

Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23773]: Version 1.3.2 starting  Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23773]: Flags: TI-RPC  Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23773]: failed to create RPC listeners, exiting  Feb 12 00:05:09 martin-xps.lico.nl systemd[1]: rpc-statd.service: control process exited, code=exited status=1  Feb 12 00:05:09 martin-xps.lico.nl systemd[1]: Failed to start NFS status monitor for NFSv2/3 locking..  Feb 12 00:05:09 martin-xps.lico.nl systemd[1]: Unit rpc-statd.service entered failed state.  Feb 12 00:05:09 martin-xps.lico.nl systemd[1]: rpc-statd.service failed.  Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23775]: Version 1.3.2 starting  Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23775]: Flags: TI-RPC  Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23775]: failed to create RPC listeners, exiting  

I have tried to reinstall nfs-utils:

$ pacman -R nfs-utils  $ rm -r /var/lib/nfs  $ pacman -S nfs-utils   

It then re-creates the directory with the permission of the root user. I'm not even sure if this error even related to rpc.statd not starting.

I also tried to run rpc.statd -F --no-notify in my shell, but that just exits with code 1. No error, no nothing. There's no verbose or debug flag documented in the manpage.

I also tried to empty my /etc/exports, and my system is up to date (pacman -Syu). I didn't change anything, it just stopped working a few hours ago.

Note that using mount -o nolock /data works; so the rest of the NFS/rpc daemons seem to be fine.

No comments:

Post a Comment