cancel
Showing results for 
Search instead for 
Did you mean: 
Security Alert Log4j Security Vulnerability. Click here to know more.
cancel
Showing results for 
Search instead for 
Did you mean: 

Bring Back Documented Support of Solr as Service for Windchill 11

Bring Back Documented Support of Solr as Service for Windchill 11

Hello.

Enhancement for PTC to Document how to Convert Standalone SOLR into a Service.

PTC Documentation explained how to set up Index Program as a Service for older Index Software such as Fast Instream.  Later in Windchill 10.2 SOLR Index was integrated under Method Server so Windchill as Service accounted for Indexing.

In Windchill 11 PTC has lost this ability to set standalone SOLR as a Service.  A Functionality Lost. (Development missed the requirement and thus calls it an Enhancement)

PTC Info:

CS240551 which is an unsupported method using a 3rd Party App (Non Sucking Service Manager -NSSM to Convert a Program into a Service)

SPR5765674 Is For Enhancement

PTC Technical Support asked me to make an Enhancement Question to motivate Development, for most our customers we configure Apache/Windchill as a Service.  To Leave Solr running in a Windchill Shell and the User Logged in is not considered a good solution,  Using an unsupported App with Non Professional Website and uncommon Domain (.cc) is not recommended either.

Faceted Search is on of the improvements of 11.0 would be nice to have it running;  After Windows reboots servers for Updates.

7 Comments
bmr
17-Peridot
17-Peridot

‌Hi Brian

I provided this solution to PTC since I couldn't figure it out to configure it with the procrun solution.

Actually I belief it can't be that difficult to create an Ant script to create the service. Unfortunately I haven't heard anything back from R&D. And I don't want to invest few hours to figure it out.

Perhaps somebody e.g Lori Sood‌ could ask R&D again.

Thanks Björn

BrianSullivan
5-Regular Member

Hi Bjorn,

I have asked as well,  It can not take but a few hours for development to resolve a work-around.  We have Apache getting turned into a Service with Ant and Windchill getting turned into a Service...  so tools are installed on our Systems.

Nice to know who made the unofficial workaround.  Feel bad for Tech Support they are in a no win situation.  Hopefully Enhancement Shaming will work, maybe should have tries in December 2015... but really this should not have made it past PTC's Quality Testing...

BrianSullivan
5-Regular Member

All.

My Great and Powerful Colleague, Igor Varshavsky, at Tristar has written a work around for PTC Functionality Loss. (Sorry Enhancement)

"Yeah, I think we can post it to PTC as well but I hope that PTC will come with some smart ant script that eliminates manual steps."

Implementation Notes:

The setup uses prunsrv that is installed with every Windchill instance and available in folder similar to

E:\ptc\Windchill_11.0\Windchill\opt\ntservice

1. Install SOLR . Lets assume it is installed into

E:\ptc\Windchill_11.0_Solr\SolrServer\

2. copy opt to solr and create exe for the service

E:\ptc\Windchill_11.0\Windchill\opt\ntservice to solr install E:\ptc\Windchill_11.0_Solr\SolrServer\opt\ntservice

copy prunsrv-64.exe solr-64.exe

3. Create 2 batch files to start and stop solr inside of E:\ptc\Windchill_11.0_Solr\SolrServer\bin.

  1. start.bat

e:
cd E:\ptc\Windchill_11.0_Solr\SolrServer\bin
E:\ptc\Windchill_11.0_Solr\SolrServer\bin\Index_Search_Server start

  1. stop.bat

e:
cd E:\ptc\Windchill_11.0_Solr\SolrServer\bin
E:\ptc\Windchill_11.0_Solr\SolrServer\bin\Index_Search_Server stop

4. Create batch scripts to install SOLR server and uninstall it

install_solr_service.bat

@echo off
set SERVICE_NAME=PTC_SOLR
set SERVICE_HOME=E:\ptc\Windchill_11.0_Solr\SolrServer\solr
set PR_INSTALL=E:\ptc\Windchill_11.0_Solr\SolrServer\opt\ntservice\solr-64.exe

@REM Service Log Configuration
set PR_LOGPREFIX=%SERVICE_NAME%
set PR_LOGPATH=%SERVICE_HOME%\logs
set PR_STDOUTPUT=auto
set PR_STDERROR=auto
set PR_LOGLEVEL=Debug

set PR_STARTUP=auto
set PR_STARTMODE=exe
set PR_STARTIMAGE=E:\ptc\Windchill_11.0_Solr\SolrServer\bin\start.bat
set PR_STARTPARAMS=start

@REM Shutdown Configuration
set PR_STOPMODE=exe
set PR_STOPIMAGE=E:\ptc\Windchill_11.0_Solr\SolrServer\bin\stop.bat
set PR_STOPPARAMS=stop

%PR_INSTALL% //IS/%SERVICE_NAME% ^
--Description="PTC Solr" ^
--DisplayName="%SERVICE_NAME%" ^
--Install="%PR_INSTALL%" ^
--Startup="%PR_STARTUP%" ^
--LogPath="%PR_LOGPATH%" ^
--LogPrefix="%PR_LOGPREFIX%" ^
--LogLevel="%PR_LOGLEVEL%" ^
--StdOutput="%PR_STDOUTPUT%" ^
--StdError="%PR_STDERROR%" ^
--StartMode="%PR_STARTMODE%" ^
--StartImage="%PR_STARTIMAGE%" ^
--StartParams="%PR_STARTPARAMS%" ^
--StopMode="%PR_STOPMODE%" ^
--StopImage="%PR_STOPIMAGE%" ^
--StopParams="%PR_STOPPARAMS%"

if not errorlevel 1 goto installed
echo Failed to install "%SERVICE_NAME%" service. Refer to log in %PR_LOGPATH%
exit /B 1

:installed
echo The Service "%SERVICE_NAME%" has been installed
exit /B 0

uninstall_solr_service.bat

@echo off
set SERVICE_NAME=PTC_SOLR

set SERVICE_HOME=E:\ptc\Windchill_11.0_Solr\SolrServer\solr
set PR_INSTALL=E:\ptc\Windchill_11.0_Solr\SolrServer\opt\ntservice\solr-64.exe

@REM Service Log Configuration
set PR_LOGPREFIX=%SERVICE_NAME%
set PR_LOGPATH=%SERVICE_HOME%\logs

%PR_INSTALL% //DS/%SERVICE_NAME%

if not errorlevel 1 goto uninstalled
echo Failed to uninstalled "%SERVICE_NAME%" service. Refer to log in %PR_LOGPATH%
exit /B 1

:uninstalled
echo The Service "%SERVICE_NAME%" has been uninstalled
exit /B 0

Once installed SOLR service will appear as following:

Task Manager process will be as following:

vsion
5-Regular Member

Hi,

I've just tried your tips about "solr in service".

No problem with your tutorial, but only one problem : unable to start the service

in service manager, when i select the service and start it, I obtain the following message "Windows could not start the PTC_SOLR service on local computer - Error5:Acces is denied."

I've tried this :

1- execute the service like the local system user or with an administrator account : no effect

2- allow full right on my PTC folder for user, administrator, .... : no effect

After a call to my friend Google, I've tried this tips : http://www.thewindowsclub.com/access-is-denied-local-services-windows-8-1 but no effect.

In the computer management console, I can see in the system log the following error linked to the starting of PTC_SOLR :

eventid : 7000

level : error

user : n/a

Have you an idea about this error ?

Thanks.

Vincent

bmr
17-Peridot
17-Peridot

‌i just installed 11.0M020 and there is a bat file for installing Solr as a service.

Lori Sood please mark this idea as solved

vsion
5-Regular Member

Thanks for the news.

I've try it on live  : it's working fine

PTCModerator
Emeritus
Status changed to: Acknowledged