Automount is not mounting NFS shared home folder on centos 7 when using LDAP login - ldap

These are the error messages that I can see in /var/log/messages folder:
failed to bind to LDAP server ldap://x.x.x.x: Can't contact LDAP server
bind_ldap_simple: lookup(ldap): Unable to bind to the LDAP server: (default), error Can't contact LDAP server
failed to bind to LDAP server ldap://X.X.X.X: Can't contact LDAP server
failed to bind to LDAP server ldap://X.X.X.X: Can't contact LDAP server

I had to enable NetworkManager-wait-online service by executing the command below
systemctl enable NetworkManager-wait-online.service
Then I had to change timeout in
/usr/lib/systemd/system/NetworkManager-wait-online.service file.
I set the timeout to 60 seconds and it worked for me.
I am listing the modified file with changed timeout below.
[Unit]
Description=Network Manager Wait Online
Requisite=NetworkManager.service
After=NetworkManager.service
Wants=network.target
Before=network.target network-online.target
[Service]
Type=oneshot
ExecStart=/usr/bin/nm-online -s -q --timeout=60
[Install]
WantedBy=multi-user.target

Related

GCP Connection Failed - SSH - We are unable to connect to the VM on port 22

Since I received a email warning letter from google says "Action required: Critical problem with My First Project" saying my server has some abnormal outgoing activity , I tried to implemented ufw in my debian server.
For my ufw setting, I've done the following:
sudo ufw default deny incoming
sudo ufw default deny outgoing
sudo ufw allow ssh
sudo ufw allow 22
sudo ufw allow http
sudo ufw allow https
After I restart my server , I can't connect to my server with the error "Connection Failed: We are unable to connect to the VM on port 22. Learn more about possible causes of this issue."
I followed the following instruction https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh but it still not working:
I tried gcloud to create default-allow-ssh
my firewall-rules list picture
I tried to use serial console to login but I haven't set password to my root account so I can't login.
I tried to add "/usr/sbin/ufw disable" to startup-script in Custom metadata and restart server many times but it seems the command is not executed so still not working
my gcp startup-script picture
I found the correct answer in this website.
https://www.jhanley.com/google-cloud-recovering-from-ufw-lockout/
Method 2 in the website solves this problem

How to resolve CLI connection problem from java client to Jenkins server?

Connecting with CLI in default way towards new Jenkins instance hangs.
java -jar $JENKINS_HOME/war/WEB-INF/jenkins-cli.jar -s http://git-dapp902.XXXXXXXX:17801 -auth admin:aaaaaaa who-am-i
(aaaaaa = initial password for admin account)
Following actions were performed
- startup new Jenkins instance
- log on as admin with initial password
- enable global security JLNP on fixed port (without this, I would get a Connection Refused)
- restart the jenkins server
- launch the above java command (on the same Linux VM)
- client does not return. No logging on Jenkins server
- When client is canceled below logging is shown
java -jar $JENKINS_HOME/war/WEB-INF/jenkins-cli.jar -s http://git-dapp902.XXXXXXXX:17801 -auth admin:aaaaaaa who-am-i
WARNING: Connection #4 failed
java.io.EOFException
at java.base/java.io.DataInputStream.readFully (DataInputStream.java:202)
at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:614)
at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:569)
at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:254)
In the meantime I found the solution.
The Jenkins URL does not need to point to the port in JLNP setting, but to the "plain" port.
Luc

LDAP Unable to start openldap for windows

I watched youtube online as reference to install openldap on windows,
I also followed the tutorial on zytrax.com
C:\OpenLDAP>slaptest -f slapd.conf -F slapd.d
5c9eec00 using config directory slapd.d, error 0
config file testing succeeded
there is this part "Conversion to slapd.d is trivial. After modifying the slapd.conf file as required simply create a new directory/folder called slapd.d. Open a command line (dos box for us oldies), navigate to c:\OpenLDAP (or wherever you put your installation) and enter:" in which I don't understand, what do I need to configure in slapd.conf
C:\OpenLDAP>slapd -d 8 -h "ldaps://localhost/ ldap://localhost/"
5c9ef038 OpenLDAP 2.4.42 Standalone LDAP Server (slapd)daemon: bind(2) failed errno=10013 (WSAEACCES)
5c9ef038 daemon: bind(3) failed errno=10013 (WSAEACCES)
5c9ef038 slapd stopped.
5c9ef038 connections_destroy: nothing to destroy.
How do I get my ldapserver to start running ?
I had the same issue and my issue was that the ports were already open by another service. Try specifying other ports when starting the slapd server.
slapd -d 8 -h "ldaps://localhost:6866/ ldap://localhost:3899/"

Ambari cluster : Host registration failed

I am setting up an ambari cluster with 3 virtualbox VMs running Ubuntu 16.04LTS.
I followed this hortonworks tutorial.
However when I am going to create a cluster using Ambari Cluster Install Wizard I get the below error during the step 3 - "Confirm Hosts".
26 Jun 2017 16:41:11,553 WARN [Thread-34] BSRunner:292 - Bootstrap process timed out. It will be destroyed.
26 Jun 2017 16:41:11,554 INFO [Thread-34] BSRunner:309 - Script log Mesg
INFO:root:BootStrapping hosts ['thanuja.ambari-agent1.com', 'thanuja.ambari-agent2.com'] using /usr/lib/python2.6/site-packages/ambari_server cluster primary OS: ubuntu16 with user 'thanuja'with ssh Port '22' sshKey File /var/run/ambari-server/bootstrap/5/sshKey password File null using tmp dir /var/run/ambari-server/bootstrap/5 ambari: thanuja.ambari-server.com; server_port: 8080; ambari version: 2.5.0.3; user_run_as: root
INFO:root:Executing parallel bootstrap
Bootstrap process timed out. It was destroyed.
I have read number of posts saying that this is related to not enabling Password-less SSH to the hosts. But I can ssh to the hosts without password from the server.
I am running ambari as non-root user with root privileges.
This post helped me.
I modified the users in host machines so that they can execute sudo commands without password using visudo command.
Please post if you have any alternative answers.

Error shutting down Windows XP machine with RPC

I have an Ubuntu server on the same LAN with a Windows XP Professional machine.
I'm trying to issue the following command from the server to shutdown
the machine:
net rpc shutdown -I 192.168.X.X -U <username>%<password> -r -f
but I get the error :
Could not connect to server 192.168.X.X
The user name or password was not correct.
Connection failed: NT_STATUS_LOGON_FAILURE
The credentials are correct, checked it several times. What can be the problem?
I'd appreciate any help.
Perhaps <username> must be prefixed with the windows domain or workstation name (i.e. the scope within which the username is defined):
domain\username