It's all about the answers!

Ask a question

Is there a way to find the correct port number for the server.startup.bat file?


Wibisha Balendran (133) | asked Feb 28 '19, 12:41 p.m.
edited Mar 08 '19, 3:46 p.m. by Ralph Schoon (63.1k33646)

 I tried using the port number suggested on the RTC workshop 6.03 and up (ie 3388) and when opening the bat file as an admin, the window closes immediately afterwards. Any help will be appreciated. Thanks. 

3 answers



permanent link
Alex Akilov (663) | answered Feb 28 '19, 12:50 p.m.

 Whenever you run a shell script (bat file on Windows) from the UI (rather than a command prompt) the default OS behavior is to create a command prompt to launch the shell script and then close the command prompt.  If you want to see the console output, start the command prompt manually and then run the shell script from the command prompt.  This will give you a little more time to investigate any output from the shell script invocation.

As far as the server.startup, essentially it launches a java process and then the rest of the work is done in the Java process, so there's really not much to see in the command prompt as all it does is start the Java process.  In this case, the java process is an instance of a web server (e.g. Tomcat or WebSphere, or WebSphere Liberty profile).  Depending on which of these web servers you're launching, you need to understand how those servers are administered to find where the port numbers are specified.  For Tomcat and Liberty, there is a server.xml file that usually contains the port info.  For WebSphere full profile, it's more involved as there are a lot of XML files (or the Admin GUI) that you'll have to go through to get at the info you need.


Comments
Wibisha Balendran commented Feb 28 '19, 1:06 p.m.

I believe the profile of the web server is WebSphere Liberty Profile. Are there any suggested files I should look into for this profile to find out the port number? Thanks. 


Ralph Schoon commented Feb 28 '19, 1:16 p.m. | edited Feb 28 '19, 1:16 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
What the port does and where to set the port is described in https://jazz.net/library/article/1000 consider carefully following it. Hint, the port is added to the startup file and NOT IN ANY OTHER LOCATION.

I have never seen the startup crashing if the instrutions have been followed on Windows. There might be different experiences on Linux.

Alex, thanks. That port number is only used when remote debugging the server in https://jazz.net/library/article/1000 .

The user can remove the statements they added to enable the debug port and see how it behaves then. Otherwise I agree.

Otherwise the question is a typical example that does not provide a good context. Every question that is only one sentence calls for reading  How should I ask a question in the Forum if I want to receive useful answers?

Wibisha Balendran commented Feb 28 '19, 1:24 p.m.

There was a suggestion about removing the "address=..." line in the startup text file to find the port number. However, it's suggested that it can be found on the top window of the Liberty console. However, I'm not sure how to locate the Liberty Console. 


 I would post a screenshot but can't seem to.. it's right below the step 15 e. of the workshop. Thanks. 


permanent link
Ralph Schoon (63.1k33646) | answered Feb 28 '19, 1:06 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please read https://jazz.net/library/article/1000 carefully. There are suggestions around the debug port.

You also want to provide reasonable context e.g. the OS you run on and the RTC version.
I remeber that there are comments about debugging on one of the blogs: https://rsjazz.wordpress.com/?s=extensions+workshop&submit=Search Linux might be different. The Java Version can also be important.

You can open a console and CD to the server folder to run the startup files from there, then you may be able to see error messages.

Every operating system provides commands to find out which ports are in use. You can find those in the internet e.g. on stackoverlow.



Comments
Wibisha Balendran commented Feb 28 '19, 1:16 p.m. | edited Feb 28 '19, 1:19 p.m.

The RTC version is 6.0.6 and I'm running on Windows 10-not Linux...


Edit: RTC Eclipse version is 4.5 I believe. 


Wibisha Balendran commented Mar 08 '19, 3:02 p.m.

Update- I have run the server startup file on cmd ( as an admin) and receive the following message afterwards...


\server\tomcat was unexpected at this time

I'm not sure what this message means, any suggestions? Thanks.  


Ralph Schoon commented Mar 08 '19, 3:46 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Using the Workshop for version 6.0.3 for a version 4.5 is not a bright idea. Failing to provide this information in the first place is incomprehensible.


permanent link
Ralph Schoon (63.1k33646) | answered Mar 01 '19, 2:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 01 '19, 2:37 a.m.

1) I used the combination Windows 10 and 6.0.6 and have no problem at all.

2) Comment out the lines you added
set JAVA_OPTS=%JAVA_OPTS% -Djava.awt.headless=true
rem set JAVA_OPTS=%JAVA_OPTS% -Xdebug
rem set JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=3388
set JAVA_OPTS=%JAVA_OPTS% -Duser.language=en
    
save, then start the server by running the server.startup.bat. If it runs now go to 3), otherwise you need to get that fixed. How do you install (ZIP or Installation Manager), where do you install....
 
3) I followed the instructions and changed the server.startup to 
set JAVA_OPTS=%JAVA_OPTS% -Djava.awt.headless=true
set JAVA_OPTS=%JAVA_OPTS% -Xdebug
set JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,server=y,suspend=n
rem set JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=3388
set JAVA_OPTS=%JAVA_OPTS% -Duser.language=en
    
I again ran the server.startup from a cmd command console and it shows the port number it chooses as indicated by the workshop.



Comments
Wibisha Balendran commented Mar 01 '19, 9:52 a.m.

Thanks for the suggestion but I am stuck on step 2.. I've commented out the phrases and the command console still closes. I've installed the necessary file via ZIP and installed it in the following directory - C:\RTC603Dev\installs\JazzTeamServer\JTS-CCM-keys-Win64_6.0.3 (1)\server

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.