Wednesday, November 9, 2016

VirtualBox - Have to do the following after cloning machine

Make a new MAC address

Make a new UUID for network
$ uuidgen eth0

If there is the error as below.

Remove the 70-persistent-net.rules file.
$ rm /etc/udev/rules.d/70-persistent-net.rules


Check the configure file of VirtualBox
vim /home/njoonk/.config/VirtualBox/VirtualBox.xml

Sunday, October 2, 2016

Troubleshooting - Content type 'application/json;charset=UTF-8' not supported

■ There was no problem when testing on Gradle JettyRun.
But After deployed an application, The following error appeared in the log file.

02 Oct 2016;02:05:58.666 [http-nio-8080-exec-6] ERROR c.a.c.AbstractBaseController.handleException(167) - Exception's trace:
org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported

    at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:235) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters(RequestResponseBodyMethodProcessor.java:149) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:127) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at
 ...
 ...

■ How to solve this problem.
Add the jar module into build.gradle as below.

dependencies {
...
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.3'
...
}

Wednesday, September 28, 2016

Iptables - Mapping port directly (http or https)

■ Add the following rules.
For mapping a port from 80(HTTP) to 8080 and from 443(HTTPS) to 8443
*nat
-A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
-A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
COMMIT
You don't need to set up Apache HTTP for HTTP or HTTPS
But it will not work as it is, in addition, you have to do the next step

■ Have to open 8080 and 8443 port as below
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8443 -j ACCEPT

■ This is full set up in iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
#-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
#-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8443 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
*nat
-A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
-A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
COMMIT

Thursday, August 18, 2016

Server - Web and Hadoop Development Environment.

■ Web service Development Environment.
Host Name Ip address Installed software
centos01 192.168.11.20 mysql(sudo /etc/init.d/mysql.server start|stop) - njoonk
tomcat(/etc/init.d/tomcat start|stop) - njoonk
centos02 192.168.11.21 nginx(/etc/init.d/nginx start|stop) - root
redis(/etc/init.d/redis_6379 start|stop) - root
gitlab(/etc/init.d/gitlab start|stop) - root
- https://192.168.11.21
centos03 192.168.11.22 artifactory(/etc/init.d/artifactory start|stop) - root
- http://192.168.11.22:8081
tomcat(/etc/init.d/tomcat start|stop) - njoonk
- http://192.168.11.22:8080

■ This is my Hadoop Development Environment.
Host Name Ip address Installed software
hadoop01 192.168.11.23 hadoop(master name node), hbase
hadoop02 192.168.11.24 hadoop(secondary name node, data node1), zookeeper1
hadoop03 192.168.11.25 hadoop(data node2), zookeeper2, Flume1
hadoop04 192.168.11.26 hadoop(data node3), zookeeper3, Flume2
hadoop05 192.168.11.27 zookeeper, kafka

Sunday, July 10, 2016

Troubleshooting - org.eclipse.osgi.internal.framework.EquinoxConfiguration$1

I have got an error message on Eclipse as below.

For resolving, I added the following parameters into eclipse.ini.
-Dosgi.configuration.area.default=null
-Dosgi.user.area.default=null
-Dosgi.user.area=@user.dir