Issue - JBoss Exception in thread “main” java.lang.UnsupportedClassVersionError

1

JBoss Exception in thread “main” java.lang.UnsupportedClassVersionError:

redhat


Test Environment

  • Test OS : CentOS 7.2
  • Test Version : JBoss 7.x

JBoss install Error

  • 문제 현상

    error
 JBoss 설치시 위와 같은 버전 에러 발생시 현재 서버의 설정된 JDK 버전과 JBoss 에서 지원하는 버전이 맞지 않아 발생하는 현상.
  • 해결 방안
지원이 가능한 Java 버전을 설치 후 진행
JBoss EAP 7.x에 대한 supported 지원은 아래의 링크를 확인

관련 링크 : https://access.redhat.com/articles/2026253#[2]

The number following `Unsupported major.minor version` indicates the Java version which was used to compile the class. See [The ClassFile Structure](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1), which describes the class file format of the Java Virtual Machine.

Major Version Class File Format
Java SE 13 57 (0x39 hex)
Java SE 12 56 (0x38 hex)
Java SE 11 55 (0x37 hex)
Java SE 10 54 (0x36 hex)
Java SE 9 53 (0x35 hex)
Java SE 8 52 (0x34 hex)
Java SE 7 51 (0x33 hex)



windows doskey 명령어로 매크로 기능 이용하기

Welcome file


Windows cmd doskey 명령어로 매크로 기능 이용하기


Test Environment

  • Test OS : Windows 10

windows에서 CMD로 명령어를 수행하다 보면 Liunx에서 사용하던 명령어때문에 항상 헷갈려하는 명령어가

바로 dir = ls 명령어이다.

바로 이부분때문에 찾아본 명령어가 바로 doskey 명령어로 alias처럼 쓰는 방법에 대해 정리 하였다.

우선 사용할 명령어 정의

alias.cmd

@echo off

:: commands
doskey alias   = doskey $*
doskey cat     = type $*
doskey clear   = cls
doskey grep    = find $*
doskey history = doskey /history
doskey man     = help $*
::
doskey kill    = taskkill /PID $*
doskey ls      = dir $*
doskey ll      = dir $*
::
doskey cp      = copy $*
doskey cpr     = xcopy $*
doskey mv      = move $*
doskey rm      = del $*
doskey rmr     = deltree $*
::
doskey ps      = tasklist $*
doskey pwd     = cd
::
doskey sudo    = runas /user:administrator $*

레지스트에 등록하기

regedit

경로 : 컴퓨터\HKEY_CURRENT_USER\Software\Microsoft\Command Processor

이름 : Autorun

데이터 : E:\software\google\2_Shellscript\alias.cmd



적용 화면




Linux a frequently used command

리눅스명령어


Linux a frequently used command


  • Test OS : RedHat 7.2, CentOs 7

  • 수정된 config 파일
#n일 이상 된 xml 파일 찾기  
find . -type f -name "*.xml" -mtime -7 -print
  • 파일 삭제하기
find /app/logs/web/httpd -name "*.log" | sort  
#7일 초과한 파일 삭제하기
find /log/server1 -name "*.log" -mtime +7 -delete  
find /log/server1 -name "*.log" -mtime +7 -exec rm {} \;  
#30일 이상 된 로그 파일만 삭제  
find /log/server1 -type f -name "*.log" -ctime +30 -exec rm -rf {} \;  
  • 특정 사이즈 이상 보기
find . -size +3000000k -exec ls -lh {} \+  
  • 옛 파일부터 보기
ls --time-style="+%Y-%m-%d %H:%M:%S" -altr | grep ^- | more  
  • webserver 동시접속자 체크
netstat -nap | grep 80 | grep ESTABLISHED | wc -l
netstat -nap | grep 8080 | grep ESTABLISHED | wc -l
  • DB 연결풀 정보 확인
netstat -anp|grep {port_number}
netstat -anp|grep {port_number} | sort -nk 7
netstat -anp|grep {port_number} | sort -nk 7 | wc -l
ps -ef|grep {process_ID}
  • 메모리 체크
TOTAL=`free | grep ^Mem | awk '{print $2}'`
USED1=`free | grep ^Mem | awk '{print $3}'`
USED2=`free | grep ^-/+ | awk '{print $3}'`
NOMINAL=$((100*USED1/TOTAL))
ACTUAL=$((100*USED2/TOTAL))
echo NOMINAL=${NOMINAL}% ACTUAL=${ACTUAL}%

#RedHat 
TOTAL=`free | grep ^Mem | awk '{print $2}'`
USED1=`free | grep ^Mem | awk '{print $3}'`
USED2=`free | grep ^Mem | awk '{print $5}'`
NOMINAL=$((100*USED1/TOTAL))
ACTUAL=$((100*USED2/TOTAL))
echo NOMINAL=${NOMINAL}% ACTUAL=${ACTUAL}%

awk '/^Mem/ {printf("%u%%", 100*$3/$2);}' <(free -m)
awk '/^Mem/ {printf("%u%%", 100*$5/$1);}' <(free -m) 



Tomcat install

tomcat install part1

Tomcat install


Test Environment

  • Test OS : Windows 10
  • Test Version : apache tomcat 9

Pre-preparedness

Site Link :

http://tomcat.apache.org/

  1. tomcat download

    downloan link :

    https://tomcat.apache.org/download-90.cgi



    원하는 버전을 선택해서 다운로드.
  2. unzip

    설치할 위치에 압축파일 이동 후 해제

  3. tomcat 주요 디렉토리 구조

    E:\APP\WAS\TOMCAT9

    ├─bin #실행 관련 스크립트 위치

    └─startup.sh(bat)

    └─shutdown.sh(bat)

    └─catalina.sh(bat) #sh 실행시 환경변수값을 담고 있다.

    ├─conf #설정 파일

    │ └─server.xml #서버 설정

    │ └─web.xml

    ├─lib

    ├─logs

    ├─temp

    ├─webapps #기본 어플리케이션 위치

    └─work

tomcat 설치전에 원하는 자바 버전을 windows 환경변수에 설정.




SSL Cipher setting

cipher

SSL Cipher setting


Test Environment

  • Test OS : CentOS 7.2
  • Test Version : IBM HTTPServer v8.5

Cipher setting

Apply the following command to the httpd.conf file.

LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
Listen 443

NameVirtualHost *:443

<VirtualHost *:443>
    DocumentRoot /app/EAR/SSL
    SSLEnable
    SSLProtocolDisable SSLv2
    SSLProtocolDisable SSLv3
    SSLCipherSpec ALL NONE
    SSLCipherSpec ALL +TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 +TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
    SSLCipherSpec ALL +TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 +TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
    SSLCipherSpec ALL +TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA +TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA +TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
    SSLCipherSpec ALL +TLS_RSA_WITH_AES_256_CBC_SHA +TLS_RSA_WITH_AES_128_CBC_SHA
</VirtualHost>
KeyFile /SW/web/HTTPServer/key/key.kdb
SSLDisable

Confirm application with the command below.

-t -D DUMP_SSL_CONFIG: show parsed SSL vhost configurations
-t -D DUMP_SSL_CIPHERS: show all known SSL ciphers

To determine which SSL ciphers are enabled on your server, you can set LogLevel debug in your httpd.conf

Set Non-Domain Access Processing

Set Non-Domain Access Processing

Set Non-Domain Access Processing


Test Environment

  • Test OS : CentOS 7.2
  • Test Version : IBM HTTPServer v8.5

apache httpd.conf setting

tip You can set it up on the web server of the Apache class.

Forward to the virtual host that is error-handling for non-domain specified.
The point is not to give a serverName value to a dummy virtual host.

Listen 80
Listen 4958

NameVirtualHost *:80
NameVirtualHost *:4958

<VirtualHost *:80>
    DocumentRoot /app/was/htdocs
    ErrorDocument 403 "해당 방식은 접근이 허용되지 않은 방식입니다."
    ErrorDocument 404 "해당 방식은 접근이 허용되지 않은 방식입니다."
    ErrorDocument 500 "해당 방식은 접근이 허용되지 않은 방식입니다."
</VirtualHost>

<VirtualHost *:4958>
    DocumentRoot /app/was/htdocs
    ErrorDocument 403 "해당 방식은 접근이 허용되지 않은 방식입니다."
    ErrorDocument 404 "해당 방식은 접근이 허용되지 않은 방식입니다."
    ErrorDocument 500 "해당 방식은 접근이 허용되지 않은 방식입니다."
</VirtualHost>

ProxyRequests Off
<VirtualHost *:80>
    ServerName test.apache.com
    ProxyPass / http://172.31.98.155/ Keepalive=on
    ProxyPassReverse / http://172.31.98.155/
   ProxyPreserveHost On
#LogLevel debug
   ErrorLog /app/was/HTTPServer/logs/test_proxy_error.log
   CustomLog /app/was/HTTPServer/logs/test_proxy_access.log combined
</VirtualHost>

<VirtualHost *:4958>
    ServerName test.httpserver.com
    ProxyPass / http://172.31.98.209/ Keepalive=on
    ProxyPassReverse / http://172.31.98.209/
    ProxyPreserveHost On
#LogLevel debug
    ErrorLog /app/was/HTTPServer/logs/http_proxy_error.log
    CustomLog /app/was/HTTPServer/logs/http_proxy_access.log combined
</VirtualHost>

IBM HTTPServer - SSL Ciphers Check

How to check which ciphers are applied when using SSL


Test Environment
  • Test OS : CentOS 7.2
  • Test Version : IBM HTTPServer v8.5.0.0

Methods for checking ciphers for SSL set in web server

Check Options :
    [root@testServer11 bin]# ./apachectl -h
    Usage: /SW/web/HTTPServer/bin/httpd [-D name] [-d directory] [-f file]
                                        [-C "directive"] [-c "directive"]
                                        [-k start|restart|graceful|graceful-stop|stop]
                                        [-v] [-V] [-h] [-l] [-L] [-t] [-S]
 
    Options:
      -D name            : define a name for use in <IfDefine name> directives
      -d directory       : specify an alternate initial ServerRoot
      -f file            : specify an alternate ServerConfigFile
      -C "directive"     : process directive before reading config files
      -c "directive"     : process directive after reading config files
      -e level           : show startup errors of level (see LogLevel)
      -E file            : log startup errors to file
      -v                 : show version number
      -V                 : show compile settings
      -h                 : list available command line options (this page)
      -l                 : list compiled in modules
      -L                 : list available configuration directives
      -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)
      -S                 : a synonym for -t -D DUMP_VHOSTS
      -t -D DUMP_MODULES : show all loaded modules
      -M                 : a synonym for -t -D DUMP_MODULES
      -t -D DUMP_SSL_CONFIG: show parsed SSL vhost configurations
      -t -D DUMP_SSL_CIPHERS: show all known SSL ciphers
      -t                 : run syntax check for config files

Ciphers :

    [root@testServer11 bin]# ./apachectl -t -D DUMP_SSL_CIPHERS SSL    Ciphers:
    .
    .
    .
    SSL default cipher lists: SSL protocol SSLV2, FIPS    off, defaults =
    SSL protocol SSLV2, FIPS on, defaults =  SSL    protocol SSLV3, FIPS off, defaults =    TLS_RSA_WITH_AES_128_CBC_SHA(2F),TLS_RSA_WITH_AES_256_CBC_SHA(35b),SSL_RSA_WITH_RC4_128_SHA(35),SSL_RSA_WITH_RC4_128_MD5(34),SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A)
    SSL protocol SSLV3, FIPS on, defaults =  SSL protocol TLSv10, FIPS    off, defaults =    TLS_RSA_WITH_AES_128_CBC_SHA(2F),TLS_RSA_WITH_AES_256_CBC_SHA(35b),SSL_RSA_WITH_RC4_128_SHA(35),SSL_RSA_WITH_RC4_128_MD5(34),SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A)
    SSL protocol TLSv10, FIPS on, defaults =    TLS_RSA_WITH_AES_128_CBC_SHA(2F),TLS_RSA_WITH_AES_256_CBC_SHA(35b),SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A)
    SSL protocol TLSv11, FIPS off, defaults =    TLS_RSA_WITH_AES_128_CBC_SHA(2F),TLS_RSA_WITH_AES_256_CBC_SHA(35b),SSL_RSA_WITH_RC4_128_SHA(35),SSL_RSA_WITH_RC4_128_MD5(34),SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A)
    SSL protocol TLSv11, FIPS on, defaults =    TLS_RSA_WITH_AES_128_CBC_SHA(2F),TLS_RSA_WITH_AES_256_CBC_SHA(35b),SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A)
    SSL protocol TLSv12, FIPS off, defaults =    TLS_RSA_WITH_AES_128_GCM_SHA256(9C),TLS_RSA_WITH_AES_256_GCM_SHA384(9D),TLS_RSA_WITH_AES_128_CBC_SHA256(3C),TLS_RSA_WITH_AES_256_CBC_SHA256(3D),TLS_RSA_WITH_AES_128_CBC_SHA(2F),TLS_RSA_WITH_AES_256_CBC_SHA(35b),SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A)
    SSL protocol TLSv12, FIPS on, defaults =    TLS_RSA_WITH_AES_128_GCM_SHA256(9C),TLS_RSA_WITH_AES_256_GCM_SHA384(9D),TLS_RSA_WITH_AES_128_CBC_SHA256(3C),TLS_RSA_WITH_AES_256_CBC_SHA256(3D),TLS_RSA_WITH_AES_128_CBC_SHA(2F),TLS_RSA_WITH_AES_256_CBC_SHA(35b),SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A)
    Syntax OK

Related Reference Links :

https://testssl.sh/openssl-iana.mapping.html
https://www.ssllabs.com/?_ga=2.136721654.755247565.1559195773-1774555605.1559022470


이 블로그 검색

Popular Posts

WEB&&WAS

OS

Reviews