cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Translate the entire conversation x

Running Windchill as a service in Linux

Chris_Johnson
14-Alexandrite

Running Windchill as a service in Linux

Version: Windchill 13.0

 

Use Case: When installing Windchill 13.0.2.3 on RHEL 9.6 how do you get it to run as a service?


Description:

I have Windchill 13.0.2.3 running on RHEL 9.6 quite successfully as a monolithic server (SQL, Application, HTTP server and SOLR al on one VM) for testing purposes. I can make everything run as foreground application using the commands in this article: https://www.ptc.com/en/support/article/CS49725

 

I've succeeded in getting Apache to run as a service using systemd unit files, but I cannot get either SOLR or Windchill to start. I've written a script for Windchill that opens a Windchill shell and then enters the command 'Windchill start'. When I run that from a command line the method servers start correctly in xterm, but when I use a unit file to run from systemd then it fails to start, even when I run it as the same user, or as root. 

 

Would anyone share the startup script and unit file that they have used to get SOLR & Windchill to load as a systemd service please? 

 

Many thanks! 

ACCEPTED SOLUTION

Accepted Solutions

Here are my systemd files for your reference. This worked for me. 

[Unit]
Description=Windchill Application
After=network.target windchillds.service

[Service]
Type=simple
User=<user to run Windchill application, NOT ROOT>
WorkingDirectory=/<path to Windchill install>/Windchill/bin
RemainAfterExit=yes
Environment="PATH=/<path to Java>/Java/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"
Environment="JAVA_HOME=/<path to Java>/Java"
Environment="WT_HOME=/<path to Windchill install>/Windchill"
ExecStart=/<path to Windchill install>/Windchill/bin/windchill start
ExecReload=/<path to Windchill install>/Windchill/bin/windchill stop
ExecReload=/<path to Windchill install>/Windchill/bin/windchill start
ExecStop=/<path to Windchill install>/Windchill/bin/windchill stop
PrivateTmp=true
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target
[Unit]
Description=Windchill Solr Index Search
After=network.target

[Service]
Type=forking
RemainAfterExit=no
PIDFile=/<path to SOLR>/SolrServer/solr/bin/solr-8085.pid
ExecStart=/<path to SOLR>/SolrServer/bin/Index_Search_Server.sh
ExecReload=/<path to SOLR>/SolrServer/bin/Index_Search_Server.sh stop
ExecReload=/<path to SOLR>/SolrServer/bin/Index_Search_Server.sh start
ExecStop=/<path to SOLR>/SolrServer/bin/Index_Search_Server.sh stop
User=<user to run SOLR, NOT ROOT>
Group=<group to run SOLR>
PrivateTmp=True
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

I have posted previously about having issues with SOLR running and have not found a solution for it yet. Let me know what you see. There was a build that had an erorr in the startup command and then it failed to recognize that it was running. When I ran it as my SOLR user manually, it worked. Just an issue running via systemd. I did not have this problem in Windchill 12. Might be a RHEL 9 issue.

View solution in original post

3 REPLIES 3

Here are my systemd files for your reference. This worked for me. 

[Unit]
Description=Windchill Application
After=network.target windchillds.service

[Service]
Type=simple
User=<user to run Windchill application, NOT ROOT>
WorkingDirectory=/<path to Windchill install>/Windchill/bin
RemainAfterExit=yes
Environment="PATH=/<path to Java>/Java/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"
Environment="JAVA_HOME=/<path to Java>/Java"
Environment="WT_HOME=/<path to Windchill install>/Windchill"
ExecStart=/<path to Windchill install>/Windchill/bin/windchill start
ExecReload=/<path to Windchill install>/Windchill/bin/windchill stop
ExecReload=/<path to Windchill install>/Windchill/bin/windchill start
ExecStop=/<path to Windchill install>/Windchill/bin/windchill stop
PrivateTmp=true
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target
[Unit]
Description=Windchill Solr Index Search
After=network.target

[Service]
Type=forking
RemainAfterExit=no
PIDFile=/<path to SOLR>/SolrServer/solr/bin/solr-8085.pid
ExecStart=/<path to SOLR>/SolrServer/bin/Index_Search_Server.sh
ExecReload=/<path to SOLR>/SolrServer/bin/Index_Search_Server.sh stop
ExecReload=/<path to SOLR>/SolrServer/bin/Index_Search_Server.sh start
ExecStop=/<path to SOLR>/SolrServer/bin/Index_Search_Server.sh stop
User=<user to run SOLR, NOT ROOT>
Group=<group to run SOLR>
PrivateTmp=True
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

I have posted previously about having issues with SOLR running and have not found a solution for it yet. Let me know what you see. There was a build that had an erorr in the startup command and then it failed to recognize that it was running. When I ran it as my SOLR user manually, it worked. Just an issue running via systemd. I did not have this problem in Windchill 12. Might be a RHEL 9 issue.

This is great, thank you. The bit I'd missed was the xconfmanager term to change the system to not use xterm. It runs perfectly now. 

 

Like you, I'm struggling with SOLR. I can't get it to start even as a regular user with the startup script Index_Search_Server.sh from a command line. I have an open ticket with tech support for help with this. I may end up reinstalling it, I suspect. 

Oh, you need to the Windchill Configurator but there is a xconf setting to stop Windchill from running in an xterm session you need to disable. 

CS40876 - [Knowledge Hub] Windchill PLM Configuration Assistant (WCA)

How to start Windchill PDMLink with/without using xterm in Linux/Unix operating system

 

Announcements
Top Tags