Spring Boot 로 프로그램을 작성하고 난 후에 Compile 단계에서 다음과 같은 오류를 만날 수 있다. EmployeeServiceImpl.java:13: error: constructor Employee in class Employee cannot be applied to given types; return Mono.just(new Employee(empId, “emp1”, “manager”, 3000)); ^ required: no arguments found: Long,String,String,int reason: actual and formal argument lists differ in length 에러 코드를 보면 new 연산자를 이용해 Employee 객체를 생성하는 부분인데, 이부분이 문제가 된다는 것이다. required: no arguments 라고 나오지만 Employee 는 다음과 같이 되어 있다. package local.systemv.springboot.test.apps.model; import lombok.AllArgsConstructor; import lombok.Getter; […]
컨테이너에서 Java 힙 덤프 뜨기
Kubernetes 에서 Java 애플리케이션을 운영할때에, Java 힙 덤프를 떠야하는 경우가 있다. 하지만 다음과 같이 덤프를 떠지지 않는다. $ kubectl exec -it employee-consumer-68cfc9864-kgx4w — sh / # ps aux PID USER TIME COMMAND 1 root 3:01 java -XX:+UseG1GC -XX:+UseStringDeduplication -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=128M -Djava.security.egd=file:/dev/./urandom -jar /app/employee-consumer.jar –spring.active.profile=${SPRING_PROFILES_ACTIVE} 57 root 0:00 sh 63 root 0:00 ps aux / # jcmd 1 VM.flags 1: com.sun.tools.attach.AttachNotSupportedException: Unable to get pid of LinuxThreads manager thread at sun.tools.attach.LinuxVirtualMachine.(LinuxVirtualMachine.java:86) at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63) at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208) at sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:147) at sun.tools.jcmd.JCmd.main(JCmd.java:131) / # […]
mod_jk, SEVERE: Invalid message received with signature 해결
Apache 2.4 에 mod_jk 를 설치하고 Tomcat 9 와 AJP 연결 설정을 했다. 그런데, 어찌된 영문인지 AJP 연결이 되지 않으면서 다음과 같은 에러 메시지만 나왔다. invalid message received with signature mod_jk 설정과 Tomcat 9 의 연결 설정은 아무런 문제가 없음에도 이런 오류가 발생하는 이유를 몰랐는데, 문제는 아주 단순했다. address=”::1″ Tomcat 9 의 서버 설정인 server.xml 에 ajp 설정은 다음과 같다. <connector protocol=”AJP/1.3″ address=”::1″ port=”8009″ redirectport=”8443″> 기본 설정값으로, address 에 할당된 값이 문제가 된다. address 에 값을 “0.0.0.0” 으로 바꾸던지 아니면 […]