Thursday, 21 April 2016

puppet Cheat Sheets and Glossary

puppet Cheat Sheets and Glossary

REF :

1)  Core Types Cheat Sheet
2) Module Cheat Sheet
3) Glossary

puppet for manage the configuration

what is puppet.
Puppet is designed to manage the configuration of Unix-like and Microsoft Windows systems decoratively.
The user describes system resources and their state.
ref : wikipedia 
puppet is not a scripting language.
since we are changing the state of a resource.


step tp set up slave machines on jenkins


set up  slave machines on jenkins

solution :

1) go to jemkins homepage.
2) go to manage jenkins
3) see the messages
"Slave to master security subsystem is currently off. Please read the documentation and consider turning it on."
click on examine.
or
4) go to "Configure Global Security" at bottom of page "plugin manager"
click on enable slave.


add the modes in jenkins.

ref: jenkins
node name :
mySlave

1) go to jemkins homepage.
2) go to manage jenkins
3) add new node
4) define the name,
  # of executors,
Remote root directory(local folder where jenkins to resider),
5) and save.
6) go to jenkins homepage,newly created node and and click on local box

error : RequestAbortedException: java.io.IOException: Unexpected termination of the channel

Wednesday, 20 April 2016

Cannot allocate memory/insufficient memory for the Java Runtime Environment to continue.

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000f71a2000, 16084992, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 16084992 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /var/lib/jenkins/jobs/subcontract/workspace/hs_err_pid10731.log

ERROR: Maven JVM terminated unexpectedly with exit code 1
Finished: FAILURE

solution :

increase the java memory maximum heap and initial heap

You can do this to the JAVA_OPTS variable in the bin/catalina.sh startup script.

JAVA_OPTS="-Xms128m -Xmx256m"

jenkins,github Failed to connect to repository

Failed to connect to repository : Command "/usr/bin/git -c core.askpass=true ls-remote -h
...
stderr: remote: Invalid username or password

problem : jenkins is trying to handshake with git with the provided credentials. but unable to login.

solution :
1) Go to jenkins homepage.

2) Go to credentials, add git user name and password.

3) Go to jenkins project, select new added credentials from the dropdown.





Tuesday, 19 April 2016

No database selected

ERROR 1046 (3D000): No database selected

we have two scenario
1) check if database exist.
2) if database not exist, create and use the database.

for case 1.

1) see database.
cmd :  show databases.
it will show default listing.
+--------------------+
| Database           |
+--------------------+
| information_schema |
+--------------------+
1 row in set (0.00 sec

now we have to create the DB and recheck again.

2)  if database not exist, create and use the database.
a) create database test.
cmd : create database test.
b) check test db created or not.
cmd : show databases.

+--------------------+
| Database           |
+--------------------+
| information_schema |
  test
+--------------------+
1 row in set (0.00 sec

c) start using the database.
cmd : use test.



  

ping not recognised in window 7

ping not recognised in window 7

It happen because system is unable to find path of system32 directory.

To resolve this.

go to directory
ex : C:\Windows\System32

search for ping.exe and set the path.

Go to computer -> right click-> properties->system->Advance system setting->Environmental variable
In the system variable -> PATH->
include : C:\Windows\System32
and save.

open command prompt and type ping.

 result :

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name
...