VSCODE ssiba

터미널과 진짜 터미널의 환경변수가 다르다

아래 명령으로 확인

echo $PATH

command+shift+p – Preferences: Open Settings (JSON)

"terminal.integrated.env.osx": {
  "PATH": "$PATH"
}

REF

  • https://stackoverflow.com/questions/43983718/set-global-path-environment-variable-in-vs-code

Error – docker 내부에서 자꾸 다른 서버를 찾아

local dns
dockerhub local proxy를 설정했는데
redis 캐시에서 자꾸 다른 서버의 ip를 찾고있다.
docker 컨테이너 ip면 172.x.x.x라야하는데
192.168.0.x을 찾는다

????설정이 잘못됐나??? 않인데
container insptection
컨테이너 내부 /etc/hosts를 봐도 이상없음

문제

nslookup를 실행했더니 data-redis.polypia.net을 찾고 있다

local dns에 *.polypia.net 을 설정했더니

docker registry에서 data-redis를 찾을 때
*.polypia.net를 찾는다
일반적으로는 이상이 없을텐데
/etc/hosts를 우선적으로 참고할테니까
docker registry에서만 발생

docker registry 소스에서도 별거 사용된게 안보인다
좆같은 뉴트리아 언어 특성상 /etc/hosts를 보지 않는 모양

https://github.com/golang/go/issues/22846

뉴트리아 잘못 쓰다가 네트워크에 dns하나 심으면 아주 통째로 털어먹히겠네

[나중에 AI가 깔끔하게 정리해줄 문서]

Error: Rails – Migration – rails db:migrate 실행시 오류

ErrorMessage

Caused by:
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

ErrorResolve

Migration 버전을 명시 해 줘야된다.
옛날에 생선된 코드값을 다 수정 해 줘야하는건지 모르겠다

Error:

에러로그

mvn test 실행시 ..라기보단 메이븐 빌드 자체가 안되는데

원인

모름

영문을 모르겠네.. 의존성 문제 아닌 것 같은게 노트북에서는 잘되니까

둘다 ubuntu 18.04, openjdk1.8, sdkman 이용 환경설치

노트북은 i5 8th. ram 8G sdd512 ubuntu 18.04 lenovo ideapad 320s

문제의 테스크탑은 amd ryzen 2700x? ram 32g 128ssd ubuntu 18.04

하드웨어 사양을 왜 썼냐면… 멀티코어 때문에 생기는 문제가 아닌가 싶어서

해결

못함

Error: SpringSecurity CustomFilter 추가시 @Bean 사용 주의

Message

는 없고

원인

Bean생성하면 자동으로 filterchain에 등록이 되어 버리는데

별 생각없이 쓰면 그냥 Bean생성을 해 버린다.

그리고 오류없이 동작할 때도 있다.

해결

Filter 상속받는 애들을 Security에 사용하려면 @Bean 생성을 하지 않는다.

SpringSecurityFilterChain에만 등록되야 하는데 Servlet Filter에 등록 돼 버리니

SecurityFilterChain이 한개만 있는경우는 슬쩍 넘어갈 때도 있는데 두개이상 쓰는 경우 상위에서 이 필터가 동작 해 버리면 확실히 오류가 난다.
@Bean말고 그냥 new 해서 쓴다.

Error: Win10 Openjdk10 Gradle 빌드 오류

openjdk10 환경에서 gradle 일정이하 버전은 안 돌아간다.
시스템 gradle은 4.9인데 프로젝트 gradle wrapper버전이 낮아서 openjdk10에서 구동이 안되는 상황

실행해주면 해결

Error: remote 서버 ssh 접속시 unicode 분해되서 표시

https://askubuntu.com/questions/144235/locale-variables-have-no-effect-in-remote-shell-perl-warning-setting-locale-f/144448#144448

이렇게 표시되는 경우..

이 부분을 주석처리 해준다.

클라이언트 접속시에 로컬의 언어설정을 가져가는건데
간혹 문제가 생길수도 있다.
그런데 요즘은 대부분 관리하는 서버 설정이 unicode일테니까

Error: Spring Session 실행시 TaskScheduler를 찾는 에러

Error :
2018-07-25 11:05:19.871 DEBUG 3353 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.boot.autoconfigure.session.RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration'
2018-07-25 11:05:19.876 DEBUG 3353 --- [ restartedMain] s.a.ScheduledAnnotationBeanPostProcessor : Could not find default TaskScheduler bean

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.scheduling.TaskScheduler' available
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:992) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.resolveSchedulerBean(ScheduledAnnotationBeanPostProcessor.java:293) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.finishRegistration(ScheduledAnnotationBeanPostProcessor.java:234) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:211) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:102) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at kr.scripton.elemhant.app.StartApplicationKt.main(StartApplication.kt:11) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.1.RELEASE.jar:2.0.1.RELEASE]

2018-07-25 11:05:19.877 DEBUG 3353 --- [ restartedMain] s.a.ScheduledAnnotationBeanPostProcessor : Could not find default ScheduledExecutorService bean

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.util.concurrent.ScheduledExecutorService' available
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:992) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.resolveSchedulerBean(ScheduledAnnotationBeanPostProcessor.java:293) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.finishRegistration(ScheduledAnnotationBeanPostProcessor.java:255) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:211) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:102) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at kr.scripton.elemhant.app.StartApplicationKt.main(StartApplication.kt:11) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.1.RELEASE.jar:2.0.1.RELEASE]

2018-07-25 11:05:19.877 INFO 3353 --- [ restartedMain] s.a.ScheduledAnnotationBeanPostProcessor : No TaskScheduler/ScheduledExecutorService bean found for scheduled processing

추가 해 준다.

@Bean
fun taskScheduler(): TaskScheduler {
return ConcurrentTaskScheduler() //single threaded by default
}

아래 커넥션 연결해제부분

2018-07-25 11:50:00.000 DEBUG 8136 --- [pool-3-thread-1] o.s.d.redis.core.RedisConnectionUtils : Opening RedisConnection
2018-07-25 11:50:00.010 DEBUG 8136 --- [pool-3-thread-1] o.s.d.redis.core.RedisConnectionUtils : Closing Redis Connection
2018-07-25 11:50:00.011 DEBUG 8136 --- [pool-3-thread-1] o.s.d.redis.core.RedisConnectionUtils : Opening RedisConnection
2018-07-25 11:50:00.012 DEBUG 8136 --- [pool-3-thread-1] o.s.d.redis.core.RedisConnectionUtils : Closing Redis Connection

Error: kotlin 뭔지 모를 reflection 오류

문제

SpringBoot + Kotlin을 실행시킬 때 다음과 같은 오류 발생

환경

해결

jackson_fastxml_version =2.9.6
jackson.version =2.9.6

spring boot에서 jackson이 2.8.x대르 가져오고 있었다. 변경.

아래 의존성이 제대로 설정되지 않은 경우 비슷한 오류 발생가능.
compile “org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version”
compile “org.jetbrains.kotlin:kotlin-reflect:$kotlin_version”

자바는 1시간이상 삽질했는데 제자리라면 의존성 오류.

Error: Ubuntu18.04 Guake3.0.5 Hangs when exit.

증상:

https://github.com/Guake/guake/issues/551

exit로 닫으려고 하면 멈춘다.

강제종료 해야 닫힘

원인:

몰라. 버그

해결: