Bug 1087504 - JON fails to start autodetected EAP 5.3 (on Windows) with exception: incorrect command syntax, input line is too long
Summary: JON fails to start autodetected EAP 5.3 (on Windows) with exception: incorrec...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 5
Version: JON 3.2
Hardware: Unspecified
OS: Windows
unspecified
urgent
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 1119860
TreeView+ depends on / blocked
 
Reported: 2014-04-14 13:30 UTC by Radim Hatlapatka
Modified: 2015-01-09 23:49 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
: 1119860 (view as bug list)
Environment:
Windows
Last Closed: 2015-01-09 23:49:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test class to reproduce issue (3.03 KB, text/x-java-source)
2014-04-30 14:12 UTC, Thomas Segismont
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1087422 0 unspecified CLOSED Unable to start (autodetected) EAP 5.3 via JON after being stopped via JON on Solaris 10 both Intel and sparc 64 bit arc... 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBPAPP-11120 0 Blocker Open EAP 5.3 causes issues for JON when starting / stopping EAP server via JON 2014-09-09 10:24:35 UTC

Internal Links: 1087422

Description Radim Hatlapatka 2014-04-14 13:30:42 UTC
Description of problem:
When starting EAP 5.3 from JON (it was imported via discovery queue after manual autodetection), it fails with [1]

Version-Release number of selected component (if applicable): EAP 5.3.0.ER3 vs JON 3.2.0


How reproducible: always


Steps to Reproduce:
1. start EAP 5 and import it from discovery queue
2. stop the EAP 5 from JON server
3. start the EAP 5 from JON server

Actual results: fails with [1]


Expected results: successfully started


Additional info: for Oracle JDK 1.7 it works with EAP 5.2


[1] java.lang.Exception: The server failed to start: The input line is too long. The syntax of the command is incorrect. at org.rhq.core.pc.operation.OperationInvocation.run(OperationInvocation.java:278) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

Comment 1 Radim Hatlapatka 2014-04-14 13:34:37 UTC
This issue is very similar to BZ#1087422 but for Windows there are some other information about input line being too long.

Note that windows command line is limited to 8191 characters, so this could be related to this limit, see [1]

[1] http://support.microsoft.com/kb/830473

Comment 2 Thomas Segismont 2014-04-24 15:37:21 UTC
Could not reproduce with EAP 5.3.ER3, JON 3.2GA on Windows 2008 server

EAP 6.3 is auto discovered and the stop and start operations work as expected.

Comment 6 Thomas Segismont 2014-04-25 08:50:49 UTC
I tried again to reproduce on my Windows 2008 with EAP installed in a directory similar to the directory used for test automation:
C:\workspace\eap5-jon-plugin-windows\a28e18c8\eap5unsecured\jboss-eap-5.3\jboss-as

The stop/start sequence works.

On the server resource "Connection Settings" tab, what is the value of your "Start script" property? Mine is empty so the "start" operation uses the default value.

Comment 7 Radim Hatlapatka 2014-04-25 09:27:58 UTC
The Start script is filled in my case by the discovery process

Comment 8 Thomas Segismont 2014-04-25 13:10:38 UTC
I tried again with the "Start script" property set to the script absolute path and it still works.

Can you please build an environment where I can reproduce this bug? The only environment where this problem shows up is a Jenkins slave and the project workspace is cleared after the suite is executed.

Before that happens, I can't see what else I can do.

Comment 12 Thomas Segismont 2014-04-30 14:12:59 UTC
Created attachment 891196 [details]
Test class to reproduce issue

Comment 13 Thomas Segismont 2014-04-30 14:44:33 UTC
I eventually managed to reproduce the issue on a Windows 2008R2 box with a test class (attachment 891196 [details]).

The problem is that EAP5.3 needs the "OS" environment variable to be set:
== line 9
@if "%OS%" == "Windows_NT" setlocal enableextensions enabledelayedexpansion
==

If it is not set, the script goes in infinite loop here:
== line 22
:LoopArgs
for /f "usebackq tokens=1,*" %%A in ('!params!') do (
==

After some time, the cmd process ends with error message "Input line is too long"

JON team needs to update the EAP5 server discovery class (add the "OS" environment variable to the list of discovered env properties).

Comment 14 Thomas Segismont 2014-04-30 19:32:17 UTC
I had a look at the EAP5 server discovery class, the environment variables discovery process relies on the ServerStartScriptDiscoveryUtility class. And ServerStartScriptDiscoveryUtility actually looks up for the "OS" variable.

That's why it worked for me on Windows 2008 (see comment 2).

So now we need to understand why on your QE box the variable is not discovered. How do you start the EAP5.3 server process before discovery? Via Cygwin? Do you by accident start run.sh instead of run.bat?

Comment 15 Radim Hatlapatka 2014-05-05 08:22:56 UTC
It is started using run.bat via CMD. [1] this is the precise command used, first part of the command is a way to start the process and assigning it an identifier useful for PID detection.

Note, both EAP 5.2 and 5.3 are started the same way.


[1] cmd /C start "1776016263" /min run.bat -c default -b localhost

Comment 18 Thomas Segismont 2014-09-02 12:41:33 UTC
I tried again this morning and could not reproduce (on a Windows 2008R2 machine).

The only thing I can imagine is that, for some reason, the process environment cannot be determined. This could be because the RHQ Agent is running as a user without the required privilege.

Which user are your running on:
* the RHQ agent?
* the EAP 5.3 instance?

Can you attach the agent log at DEBUG level?

Comment 24 Larry O'Leary 2015-01-09 23:49:25 UTC
As there is insufficient data on this and it is not clear if this is even a bug and was only reported against an unreleased product, I am marking this as WORKSFORME.


Note You need to log in before you can comment on or make changes to this bug.