Unable to change service port.

Found a bug in "Everything"? report it here
Post Reply
jrussell
Posts: 5
Joined: Thu Oct 30, 2014 11:38 pm

Unable to change service port.

Post by jrussell »

Hi, I'm unable to change the port number Everything listens to.

I first specified a different port number during installation, and I chose not to index fixed drives automatically. After installing I went through the settings to enable indexing for some of my fixed disks, then the program froze for a while (probably expecting an answer from the service) and then displayed an error message the problem. I then noted the service was listening on the default port instead of the one I specified during setup. Restarting the service didn't work, changing the port to another one from within the options didn't work either.

I am running Windows 8.1 Pro, 64-bit version (and 64-bit version of Everything as well).
void
Developer
Posts: 17157
Joined: Fri Oct 16, 2009 11:31 pm

Re: Unable to change service port.

Post by void »

Please make sure Store settings and data in %APPDATA%\Everything is enabled from Tools -> Options -> General.
Note: Everything may not have permission to save to the Everything.ini in the same location as your Everything.exe if this is disabled.

Was this option already enabled?
jrussell
Posts: 5
Joined: Thu Oct 30, 2014 11:38 pm

Re: Unable to change service port.

Post by jrussell »

I just verified it although I was pretty sure it was already since I only changed 2 options when installing Everything. The application data is in %AppData%\Everything (the configuration file, a database file and a csv with the run history).

From what I see, the service_port key gets changed to the value I choose in the options dialog (and it is a number way above 1024 if that is relevant); but after restarting the service the port number it listens to is still the default 15485.
void
Developer
Posts: 17157
Joined: Fri Oct 16, 2009 11:31 pm

Re: Unable to change service port.

Post by void »

The entry in the Everything.ini is the port the Everything client will use to try to connect to the service.

The port the service uses is defined by the command line option in your registry under:

Code: Select all

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Everything\ImagePath
It should look something like:

Code: Select all

"C:\Program Files\Everything\Everything.exe" -svc -svc-port <port number>
Where <port number> is the port number the service will listen on.
If -svc-port <port number> is omitted then the default port 15485 is used.

Do you have a third party app that might be blocking Everything from setting this entry?
jrussell
Posts: 5
Joined: Thu Oct 30, 2014 11:38 pm

Re: Unable to change service port.

Post by jrussell »

I see, I just checked with Process Hacker, changing the port number in the client makes it register a service creation; probably due to the change in that registry section.

The registry value is being updated properly from what I can see in the registry editor, and the service is being launched with the correct command line as well. Running Everything with that commend line from an admin command prompt makes the service listen on the default port as well regardless of the port chosen.

Attached to this message is a screenshot of the running service along with its command line.
Attachments
Service execution example.png
Service execution example.png (30.58 KiB) Viewed 3483 times
void
Developer
Posts: 17157
Joined: Fri Oct 16, 2009 11:31 pm

Re: Unable to change service port.

Post by void »

This is indeed a bug, I have fixed it for the next release of Everything.

Currently, the service will only ever listen on 15485.

Thanks for the bug report.
Post Reply