• 10
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Within the last couple of weeks, any attempt to login to a specific linux server has gotten really slow. Once I've logged in, things appear to run without significant delay, but some other login like activities (like starting a new screen session) are slow.

The machine's been rebooted a couple of times recently and that hasn't helped. , and it doesn't appear to be $PATH search (where $PATH can sometimes include bad NFS mounts), which I've seen historically in our environment. I've also tried completely removing my .profile/.bash*/... type of init files to rule out anything bad there. I also see slow login for at least one other userid on the system.

One thing I've noticed is the following message when trying to exit from a screen terminal:

Utmp slot not found -> not removed

and am wondering if this is related (having a vague recollection that Utmp has something to do with login).

Any idea what that message means, or how to fix it, and if it would be related? Failing that, what sort of problem determination tools are available to investigate what is slowing down this login process?

I have had similar issues - in our case we found that there was some old config left over where a name of a system or a DNS server was configured but was not accessible.

Suggestions from me: ensure DNS resolution is working fine on the machine you are connecting to. If you have assigned a hostname to the machine make sure that you edit the /etc/hosts file to at least have a matching entry for the 127.0.0.1 address like this:

127.0.0.1    server-name localhost.localdomain localhost

If you are using static IPs also add:

<static ip>  server-name
  • 4
Reply Report

You probably have a problem with either file:

/var/log/wtmp
/var/run/utmp

The last command may give you strange result. You can use the setutent command to repair it. Or just the simple way:
1. log as root and rename the 2 files.
2. don't log out, for security.
3. log in with whatever user, then log out. The 2 files should be recreated.
4. as root: last should give you a sensible output.
5. if you are sure everything is okay, delete the 2 files

  • 3
Reply Report

For anyone else that the above answers did not work for, the following worked for me to fix the "utmp slot not found -> not removed" error message in screen under cygwin:

mv /var/run/utmp /var/run/utmp.backup

Removing the file would have the same effect but I felt safer leaving it there just in case.

  • 0
Reply Report

My issue was the same as described above - slow login, but fast shell performance once logged in.

I found that I needed to add my client machine (the machine I was running PuTTY on) to the /etc/hosts file, as seen below:

127.0.0.1 localhost.localdomain localhost
192.168.0.109   GM_NAS_DNS323   GM_NAS_DNS323
192.168.0.100 GM_DESKTOP GM_DESKTOP

109 is the host. 100 is my client machine (that I added). Immediately resolved my slow login issue.

  • 0
Reply Report

If ssh taking time then we can follow the steps : There are 2 files

  1. ssh_config
  2. sshd_config --> will change in sshd_config

We can uncomment the line no 115

[root@mycentos ~]# vi /etc/ssh/sshd_config

UseDNS no -> default #UseDNS no --> remove # -> UseDNS no only

Save the sshd file and restart the sshd service

#systemctl restart sshd

If not,again take time then we can follow below change more : (Uncomment below lines )

  1. GatewayPorts no

  2. PermitTTY yes

  3. UseDNS no -> line no 115

  4. GSSAPIAuthentication no -> line no 79

Restart the sshd service and try to take the ssh

[root@mycentos ~]# systemctl restart sshd

  • 0
Reply Report

Trending Tags