Programing/Springboot

WebServerException: Unable to create tempDir 해결방법

리커니 2022. 3. 31.
반응형

WebServerException: Unable to create tempDir 해결방법

 

가상화 서버 재부팅 후 발생한 에러입니다.

잘 부팅되던 Springboot API 서버가 OS 재부팅 후 아래와 같은 에러 메시지를 출력했습니다.

 

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to C:\Users\ADMINI~1\AppData\Local\Temp\2\

 

Caused by: org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to C:\Users\ADMINI~1\AppData\Local\Temp\2\

 

처음에는 권한문제인가 해서 확인해보니 권한도 문제가 없었고

관리자 권한으로 어플리케이션을 실행해도 같은 문제가 반복됐습니다.

 

혹시나 해서 위의 경로로 들어가 보니 모든 파일이 지워져 있었습니다.

 

 

 

 

위의 에러를 해결하기 위해서는 '2' 폴더를 생성해 주시면 됩니다.

그럼 어플리케이션이 정상적으로 실행되며 '2' 폴더 안에 톰캣 폴더가 생기는 것을 확인하실 수 있습니다.

 

 

정상적인 상황이라면 어플리케이션이 실행되면서

내장 톰캣이 windows 임시 폴더인 AppData\Local\Temp 에 임시폴더를 생성하면 될 거 같은데

왜 2라는 폴더로 한번 더 들어가는지는 좀 더 알아봐야 할 것 같습니다.

 

 

반응형

댓글

💲 추천 글