Tuesday, 19 April 2016

mysql admin URL and port

Mysql admin URL

1) log in to mysql  from your box.
cmd : mysql.
2) To see the URL
cmd : mysql > select user();
result : root@localhost
3) Mysql port number.
cmd :
a) SHOW VARIABLES.
b) SHOW VARIABLES WHERE Variable_name = 'port';

Note :
a) default username : root
b) default password : ""(no password)
c) default port is 3306

Monday, 18 April 2016

ClassNotFoundException: .. ContextLoaderListener

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

  1. Open the project's properties (e.g., right-click on the project's name in the project explorer and select "Properties").
  2. Select "Deployment Assembly".
  3. Click the "Add..." button on the right margin.
  4. Select "Java Build Path Entries" from the menu of Directive Type and click "Next".
  5. Select "Maven Dependencies" from the Java Build Path Entries menu and click "Finish".

remove directory in linux

Remove directory in linux.

delete directory
cmd :  rm -r mydir

delete directory and files with in directory

cmd :  rm -r mydir


REF : computerhope

jenkins tomcat 401 Unauthorized

jenkins tomcat 401 Unauthorized

org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The username and password you provided are not correct (error 401)


tomcat 401 Unauthorized

You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.

org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/lib/jenkins/jobs/../..SNAPSHOT.war]
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:189)

solution : goto tomcat "conf " directory and open tomcat-user.xml.

check two things.

1) uncomment below code

<tomcat-users>
<role rolename="manager-gui"/>
<user name="tomcat" password="s3cret" roles="standard,manager-gui"/>
</tomcat-users>

2) or add "standard" in the roles.

Sunday, 17 April 2016

AWS jenkins tomcat "ConnectException: Connection timed out"


AWS jenkins tomcat "ConnectException: Connection timed out"

Error 1.
ERROR: Build step failed with exception
org.codehaus.cargo.container.ContainerException: Failed to redeploy
Caused by: java.net.ConnectException: Connection timed out

error 2.
This site can’t be reached
xx.xxx.xx.xxx took too long to respond.
ERR_CONNECTION_TIMED_OUT

solution :

go to network and setting --> click on "deafault" name
edit indound rule.
add "cunstom tcp rule" add the custom port that you want to listen ex:8090 or 3000
save.

open a port in linux using firefall-cmd

open a port in linux using firefall-cmd.

before running the command install firewalld package.

1) install the firewalld on linux
cmd : yum install firewalld
2) check status.
cmd : systemctl status firewalld
if it is not enable, enable it.
cmd : systemctl enable firewalld
3) if it not started start it.
cmd : systemctl start firewalld

4) stop the firewall
cmd : service firewalld stop



Now we have to open the port which will visible to public
open port :
cmd : firewall-cmd --zone=public --add-port=8090/tcp --permanent

reload the service :
firewall-cmd --reload

check whether the port was added to ipatables rules:
iptables-save | grep 8090

REF :
1) liquidweb
2) linuxconfig

Maven fails to parse POMs jenkins

Maven Failed to parse POMs jenkins
hudson.maven.MavenEmbedderException: 1 problem was encountered while building the effective settings
[FATAL] Non-readable settings /usr/../apache-maven/apache-maven-3.2.1/conf: /usr/../apache-maven/apache-maven-3.2.1/conf (Is a directory) @ /usr/../apache-maven/apache-maven-3.2.1/conf

Solution :

Go to jenkins homepage.

Go the project/job which was deployed.

Go to configuration -> build - > advance-

From the setting file dropdown -- > choose default maven setting option and save.

And build the jenkins job.