ThingWorx Navigate 설치 및 구성 > Java 11을 사용하도록 ThingWorx 서비스 업데이트
Java 11을 사용하도록 ThingWorx 서비스 업데이트
ThingWorx Navigate 9.1.0을 설치하거나 업그레이드한 후 Java 11로 업그레이드할 예정인 경우 아래 단계를 수행합니다.
1단계: ThingWorx Foundation 서비스 업데이트
ThingWorx 도움말 센터의 Using the ThingWorx Foundation Installer with Java 11 항목에서는 ThingWorx-Foundation 서비스 업데이트에 대한 지침을 제공합니다.
2단계: ThingWorx IntegrationRuntime 서비스 업데이트
ThingWorx-IntegrationRuntime 서비스를 업데이트하려면 운영 체제에 따라 아래 단계를 수행합니다.
Windows 
시작하기 전에
시작하기 전에 다음 사항이 완료되어 있는지 확인하십시오.
Java 11이 설치되어 있습니다.
/bin 디렉터리가 PATH 시스템 변수에 설정되어 있습니다.
JAVA_HOME 환경 변수가 Java 11 설치 디렉터리를 사용하도록 설정되어 있습니다.
java.exe 파일이 Java 11 설치 디렉터리에 있습니다. 예를 들어, C:\Program Files\Java\jdk-11.0.8\bin\java.exe입니다.
ThingWorx-Foundation 서비스가 Java 11을 사용하도록 업데이트되어 있습니다. 자세한 지침은 항목을 참조하십시오.
1단계: 사용되는 Java 버전 확인
사용자 환경의 프로세스 탐색기를 사용하여 nssm.exe 프로세스에서 사용되는 Java 버전을 확인합니다. 여기에서 프로세스 탐색기를 다운로드할 수 있습니다.
1. 관리자 권한으로 명령 프롬프트를 엽니다.
2. 명령 프롬프트에서 프로세스 탐색기를 엽니다. 예를 들면 다음과 같습니다.
> C:\Users\Vagrant\Desktop\procexp64.exe
3. 프로세스 탐색기 창에서 nssm.exe 프로세스를 찾은 다음 java.exe를 두 번 클릭합니다.
그러면 새 속성 창이 열리며 여기에는 nssm.exe 프로세스를 실행하는 데 사용된 java.exe에 대한 세부 정보가 나열되어 있습니다.
4. 속성 창에서 이미지 탭을 클릭하여 사용된 Java 버전을 확인합니다.
Java 11을 사용하면 그대로 진행하면 됩니다. 추가 단계를 수행할 필요가 없습니다. Java의 다른 버전을 사용하는 경우 다음 단원인 "2단계: ThingWorx-IntegrationRuntime 서비스 업데이트"를 계속 진행하십시오.
2단계: ThingWorx IntegrationRuntime 서비스 업데이트
1. Thingworx-IntegrationRuntime 서비스를 중지합니다.
2. 관리자 권한으로 명령 프롬프트를 엽니다.
3. ThingWorx Integration Runtime 설치 디렉터리 아래의 third-party 디렉터리로 이동합니다. 예를 들면 다음과 같습니다.
> cd C:\Program Files (x86)\ThingWorxIntegrationRuntime\third-party
4. 다음을 실행하여 Thingworx-IntegrationRuntime 서비스 구성을 편집합니다.
> nssm.exe edit Thingworx-IntegrationRuntime
Apache Tomcat Properties 창이 열립니다.
5. Application 탭을 열고 Java 11용 java.exe를 사용하도록 Path를 편집합니다. 예를 들어, C:\Program Files\Java\jdk-11.0.8\bin\java.exe입니다.
6. 변경 사항을 저장하려면 Edit service을 클릭합니다. 팝업 창에 편집 성공 메시지가 표시됩니다.
7. Thingworx-IntegrationRuntime 서비스를 시작합니다.
8. 연결이 설정된 ThingWorx Integration Runtime 설치 디렉터리 목록 내의 /IRLogs 폴더에 작성된 로그 파일을 확인합니다.
로그 파일 위치의 예: C:\Program Files (x86)\ThingWorxIntegrationRuntime\IRLogs\IntegrationRuntime-012144ff23af.log
로그의 예:
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - #########
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - Connection Established
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - #########
9. 이 업데이트를 게시하면 프로세스 탐색기를 사용하여 Java 버전을 확인할 수 있습니다. 자세한 지침은 "1단계: 사용되는 Java 버전 확인" 단원을 참조하십시오.
Linux 
시작하기 전에
시작하기 전에 다음 사항이 완료되어 있는지 확인하십시오.
Java 11이 설치되어 있습니다.
Java 실행 파일이 있는 Java 11 설치 디렉터리의 경로를 복사했습니다.
alternatives --display java | grep 'family java-11' | cut -d' ' -f1를 실행할 수 있습니다. 출력에는 /usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64/bin/java와 같이 Java 실행 파일의 위치가 표시되어야 합니다. 여기서는 ThingWorx-IntegrationRuntime 서비스를 구성하는 데 사용되는 /usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64를 복사합니다.
ThingWorx-Foundation 서비스가 Java 11을 사용하도록 업데이트되어 있습니다. 자세한 지침은 항목을 참조하십시오.
ThingWorx IntegrationRuntime 서비스 업데이트
1. Thingworx-IntegrationRuntime 서비스를 중지합니다.
systemctl stop ThingWorx-Foundation.service
2. ThingWorx Integration Runtime 설치 디렉터리의 /scripts 폴더 아래에 있는 startup.sh 스크립트를 백업합니다. 예를 들어, 다음과 같습니다.
/opt/ThingWorxIntegrationRuntime/scripts/startup.sh.backup
3. "시작하기 전에" 섹션에서 복사한 Java 11 설치 디렉터리를 가리키도록 startup.sh 스크립트를 편집합니다. 이 예에서, 경로는 JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.265.b01-0.el8_2.x86_64/jre에서 JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64로 업데이트되었습니다.
4. 다음 명령을 실행합니다.
# systemctl daemon-reload
5. 다음과 같이 Thingworx-IntegrationRuntime 서비스를 시작합니다.
systemctl start Thingworx-IntegrationRuntime
6. Thingworx-IntegrationRuntime 서비스가 Java 11을 사용하고 있는지 확인합니다.
# systemctl status Thingworx-IntegrationRuntime
Thingworx-IntegrationRuntime.service - Thingworx-IntegrationRuntime
Loaded: loaded (/etc/systemd/system/Thingworx-IntegrationRuntime.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-10-07 16:08:43 UTC; 4s ago
Process: 11310 ExecStop=/bin/bash /opt/ThingWorxIntegrationRuntime/scripts/shutdown.sh (code=exited, status=0/SUCCE>
Process: 11336 ExecStart=/bin/bash /opt/ThingWorxIntegrationRuntime/scripts/startup.sh (code=exited, status=0/SUCCE>
Main PID: 11337 (java)
Tasks: 31 (limit: 17467)
Memory: 166.2M
CGroup: /system.slice/Thingworx-IntegrationRuntime.service
└─11337 /usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64/bin/java -Dsecret.management.config.file=/op>
Oct 07 16:08:41 pg-foundation-rhel8.vagrantup.com systemd[1]: Starting Thingworx-IntegrationRuntime...
Oct 07 16:08:41 pg-foundation-rhel8.vagrantup.com bash[11336]: Starting Thingworx-IntegrationRuntime service ...
Oct 07 16:08:43 pg-foundation-rhel8.vagrantup.com bash[11336]: Thingworx-IntegrationRuntime service started
Oct 07 16:08:43 pg-foundation-rhel8.vagrantup.com systemd[1]: Started Thingworx-IntegrationRuntime.
7. 백업한 startup.sh.backup 스크립트를 제거합니다.
8. 연결이 설정된 ThingWorx Integration Runtime 설치 디렉터리 목록 내의 /IRLogs 폴더에 작성된 로그 파일을 확인합니다.
로그 파일 위치의 예: /opt/ThingWorxIntegrationRuntime/IRLogs/IntegrationRuntime-a268-012144ff23af.log
로그의 예:
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - #########
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - Connection Established
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - #########
도움이 되셨나요?