• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Running an AIR app as a service.

Community Beginner ,
Sep 07, 2010 Sep 07, 2010

Copy link to clipboard

Copied

Hi, I'm trying to use the ServerSocket class in AIR to make a server of some sort.  The problem is that I cannot get it to run as a windows service.  I used "sc create" to create the service.  I don't call nativeWindow.activate, so there shouldn't be a UI.  The service is set to log on as my user.  But when I try to run it, I get "Error 1053: The service did not respond to the start or control request in a timely fashion".

How can I get it to run as a service?

Thanks,

Sean

TOPICS
Installation

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 08, 2010 Sep 08, 2010

Copy link to clipboard

Copied

Hi Sean,

Unfortunately, I don't have an answer to this question, but I'm hoping others in the community can help out.  Running AIR as a service has been a popular request, but not something we officially support at this time.  There have been a couple of feature requests made for this that I'd encourage you and others interested to go vote on:

Run AIR app as a service on a server machine without user logon on the machine

Register and run as Services on OS

Googling "Error 1053: The service did not respond to the start or control request in a timely fashion" returns quite a few hits, with responses ranging from increasing time out lengths, changing logon account types, and many other service property tweaks.

Please let us know if your able to get this to work and hopefully others can contribute their experiences as well.

Chris

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 08, 2010 Sep 08, 2010

Copy link to clipboard

Copied

Thanks for the response Chris.  I tried every combination of options I could find, and I always got that message.  I'm going to try using a service wrapper now.

Sean

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 10, 2010 Sep 10, 2010

Copy link to clipboard

Copied

LATEST

I've gotten my service to run using Apache's procrun.  It has a nice monitor (although it has some java config options that do nothing when running an AIR app), and is pretty easy to install.  I include this install.bat script in the main source folder:

@echo off
echo Stopping monitor
MyServicew //MQ

echo Stopping existing service
MyService //SS
echo Installing service if it doesn't exist
MyService //IS
echo Updating service
MyService //US --DisplayName="My Service" --Description="Description of my service." --StartMode=exe --StartImage="%CD%\AIRAppName.exe" --StartParams="service;start" --StopParams="service;stop" --StopTimeout=5 --LogPath="./"

echo Starting monitor and service
start MyServicew //MR
pause

Then my AIR app handles the invoke events with 'service start' and 'service stop'.

Sean

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines