Jump to content
The Uniform Server Community
elliot100

Can't run servers, install status and port status undefined

Recommended Posts

I can no longer start my servers from the UniTray menu. I've installed a few apps over the last few days, which may well be connected, although I've just rolled back to a previous Restore Point to try and mitigate this.

 

This is what Server Status shows:

 

 

================== UNIFORM SERVER STATUS ==================

 

Your Internet IP Address = [redacted]

Accessible from Internet = NO

Cron run status = Not running

PHP INI: php.ini file = Production

 

APACHE SERVER:

 

Apache port = 80

Apache SSL port = 443

Apache executable name = Apache.exe

Apache service name = ApacheS1

Apache SSL server = Disabled

Apache run status = Not running

Apache install status = Undefined!

 

MySQL SERVER:

 

MySQL port = 3306

MySQL executable name = mysqld-opt.exe

MySQL service name = MySQLS1

MySQL run status = Not running

MySQL install status = Undefined!

 

PORT STATUS:

 

Apache port = 80 Undefined!

Apache SSL port = 443 Undefined!

MySQL port = 3306 Undefined!

 

==

 

My hosts respond to ping etc. Skype is not running. Uniform Server 5.6.3 on Windows 7.

 

Any ideas?

Share this post


Link to post
Share on other sites

Just to add that I'd previously always run the servers as an app; I've now got them running OK as a service after realising I needed to run the menu as Admin. However, the Server Status report still shows the same "undefined!" values.

Share this post


Link to post
Share on other sites

As if Windows 7 has more security concerns than previous, especially something like privilege separation in the service part ...

 

You may search for Windows 7 specific solutions here if you are sure it is a service issue ;-)

 

Just to add that I'd previously always run the servers as an app; I've now got them running OK as a service after realising I needed to run the menu as Admin. However, the Server Status report still shows the same "undefined!" values.

Share this post


Link to post
Share on other sites

I've got the EXACT same issue. I've been messing around with it for an hour or so now. I also notice that when I right click on the Aestan tray menu and choose to "stop and remove all services" that it has no effect on the services.

 

Well, I take that back. Looking at the services it does disable the "ApacheS1" service and makes it so that I can't manually remove the service from the commandline using "sc delete apacheS1". When I try that (after clicking on the "stop and remove all services" option) then I get the message "the specified service has been marked for deletion"

 

For some reason the "mysqlS1" service is unaffected and I am able to remove it with the "sc delete mysqlS1" command.

 

I do run the start.exe file as an administrator.

 

Can't figure this one out. I guess I'll have to run it normal instead of as a service.

Share this post


Link to post
Share on other sites

I've spent some more time looking into this and have discovered some more pieces to the puzzle.

 

I'm not sure if this is only a problem on Windows 7 x64 or all Windows 7 installs or if other windows installations are affected. I'm running Windows 7 x64, so I know it's a problem for ME running under windows 7 x64.

 

Anyway, I have fixed things a little bit. At least I can now stop the services from the unitray menu. I'm unable to restart the services, rather I have to stop and uninstall, and then reinstall and start.

 

I did this by creating a bat file as follows:

 

@echo off
cls
COLOR B0
mode con:cols=65 lines=20
TITLE UNIFORM SERVER - Stop and Uninstall Service

rem ###################################################
rem # Name: Really_Shut_Down.bat
rem # Created By: Mike Brinson
rem # Edited Last By: Mike Brinson (Brinman)
rem # V 1.0 28-6-2009
rem ##################################################

rem ### working directory current folder 
pushd %~dp0

net stop apaches1
net stop mysqls1

sc delete apaches1
sc delete mysqls1

rem ### restore original working directory
popd

 

I named this file

"really_shutdown.bat"

and placed it in

C:\UniServer\unicon\tray_menu

.

 

Then I edited

C:\UniServer\unicon\tray_menu\UniTray1.ini

and on line 116 changed the existing code:

Type: item; Caption: "Stop and Remove All Services"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_stop_uninstall.php  7";ShowCmd: hidden; Glyph: 1

with this code:

Type: item; Caption: "Stop and Remove All Services"; Action: shellexecute; FileName: "really_shutdown.bat"; ShowCmd: hidden; Glyph: 1

 

This worked for stopping both the apache and mysql services and removing them from the list of registered services.

 

My problem now I'm working on is getting the "Restart Apache" and "Restart MySQL" functions to work from within Apanel (http://localhost/apanel)

 

The problem appears to be with the service name that the apache service is registered with. Well, that, and also that the line of code for restarting the apache service appears to be incorrect.

 

In the file c:\uniserver\home\admin\www\services_control.php on line 92 it reads:

$cmd ="start ".US_APACHE_BIN."/".get_apache_exe()." -k graceful";

 

From what I could discover online there is no "graceful" parameter for the -k option of apache.exe

Instead it should be

$cmd ="start ".US_APACHE_BIN."/".get_apache_exe()." -k restart";

 

This is just based on the output from apache.exe /? which is (for me)

c:\UniServer\usr\local\apache2\bin>apache /?
Usage: apache [-D name] [-d directory] [-f file]
		  [-C "directive"] [-c "directive"]
		  [-w] [-k start|restart|stop|shutdown]
		  [-k install|config|uninstall] [-n service_name]
		  [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S]
Options:
 -D name			: define a name for use in <IfDefine name> directives
 -d directory	   : specify an alternate initial ServerRoot
 -f file			: specify an alternate ServerConfigFile
 -C "directive"	 : process directive before reading config files
 -c "directive"	 : process directive after reading config files
 -n name			: set service name and use its ServerConfigFile
 -k start		   : tell Apache to start
 -k restart		 : tell running Apache to do a graceful restart
 -k stop|shutdown   : tell running Apache to shutdown
 -k install		 : install an Apache service
 -k config		  : change startup Options of an Apache service
 -k uninstall	   : uninstall an Apache service
 -w				 : hold open the console window on error
 -e level		   : show startup errors of level (see LogLevel)
 -E file			: log startup errors to file
 -v				 : show version number
 -V				 : show compile settings
 -h				 : list available command line options (this page)
 -l				 : list compiled in modules
 -L				 : list available configuration directives
 -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)
 -S				 : a synonym for -t -D DUMP_VHOSTS
 -t -D DUMP_MODULES : show all loaded modules
 -M				 : a synonym for -t -D DUMP_MODULES
 -t				 : run syntax check for config files
 -T				 : start without DocumentRoot(s) check

 

So, the correct option should be

-k restart

.

 

Anyway, after changing this the issue now seems to be that the service name that the apache service is registered with does not match the name that is being referenced within uniserver's settings.

 

When I attempt to run the apache -k restart command directly from the commandline in the c:\uniserver\usr\local\apache2\bin\ directory I get the following response:

....[error] (OS 2)The system cannot find the file specified.  : No installed service named "Apache2.2".

 

So I've been looking through the code to try to figure out where the name for the apache service gets set as

ApacheS1

and I cannot find it. There is an option to name the service using -n "name" and maybe that's being used in the code somewhere and it's just not taking. I don't know.

Any of the core developers care to weigh in on this and possibly offer a solution?

 

Thanks!

Share this post


Link to post
Share on other sites

Reinforcing the thread, I have a similar issue. Running as a service doesn't work properly, but running as an app works fine. Status is the same, also shows ports as 80 undefined, 443 undefined, etc. Running on Windows Server 2008 32-bit SP2.

 

It would be great to run the server as a service so that the server pretty much takes care of itself as intended. There are probably workarounds, but that doesn't really solve the issue.

Share this post


Link to post
Share on other sites

Just to add that I'd previously always run the servers as an app; I've now got them running OK as a service after realising I needed to run the menu as Admin. However, the Server Status report still shows the same "undefined!" values.

 

I have a similar problem with Windows 7 and Uniform Server [7.1.1-Orion]. I've added the \UniServer\usr\local\php\ directory to PATH.

 

If I run Start.exe normally, then installing and running the services from Unitray (aka Aestan Tray Menu) doesn't do anything (I check with Process Explorer whether Apache.exe and mysqld-opt.exe are running).

 

But if I run Start.exe as administrator, then Install and Run does work.

 

However, the Apache service is called "ApacheS1", and any \UniServer\usr\local\apache2\bin\Apache.exe -k commands (e.g. restart) will fail with

 

[error] (OS 2)The system cannot find the file specified.  : No installed service named "Apache2.2".

 

net stop ApacheS1 && net start ApacheS1 works, but takes 6 seconds, while Apache.exe -k restart should be instantaneous.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...