herd-community icon indicating copy to clipboard operation
herd-community copied to clipboard

[Bug]: HerdHelper dosnt start

Open skhalifa05 opened this issue 1 year ago • 2 comments

Platform

Windows

Operating system version

Windows 11 223H2 22631.3527

System architecture

Windows

Herd Version

1.6,1

PHP Version

8.3

Bug description

HerdHelper dosnt start even when i change ports. tried the following:

  • sc.exe query HerdHelper
  • sc.exe start HerdHelper

and here is the result image

Steps to reproduce

No response

Relevant log output

No response

skhalifa05 avatar May 14 '24 19:05 skhalifa05

I too got an error regarding the Herd Helper. image

Platform

Are you using macOS or Windows?

Operating system version

  • Windows 11 Pro (22621.3593)

Which version of macOS or Windows are you using?

System architecture

  • Windows x64

Herd Version

  • 1.6.1 (Build: 8) Please provide the installed Herd version. You can find it in the Herd settings in the 'About' tab.

PHP Version

  • PHP 8.2.8 (cli) (built: Jul 7 2023 00:11:29) (NTS)

Bug description

What happened and what did you expect to happen?

  • The Herd Helper Service will not start and throws an error as shown in the above screenshot

Steps to reproduce Which steps do we need to take to reproduce this error?

  • Installing Herd on a windows 11 pro machine

Relevant log output

KeithPrinkey-ops avatar May 19 '24 16:05 KeithPrinkey-ops

UPDATE: I got HerdHelper Service started by killing all httpd instances on my Windows 11 Pro Laptop.

Steps Taken:

  • Finding the currently open ports: netstat 5000
  • Killing the processes: I personally opened task manager and stopped apache2, nginx, and mysql from the laragon installation which I have since removed and have had 0 issues with Herd moving forward ( I know, right? 🤣 )
  • Restarting Herd Helper Service: My installation of Herd Helper was trying to be hit on the wrong directory via Herd itself so I manually went into the folder and started Herd Helper after killing the other processes and it started with no issues.

image

KeithPrinkey-ops avatar May 19 '24 16:05 KeithPrinkey-ops

Hey folks, if there are still issues, can you please try this debug version?

Download

  • Install debug version
  • Go to General settings and enable the HerdHelper debug mode
  • Restart Herd
  • Check the logs (linked at the general settings, click on the path to get there)
  • Also check the logs at %USERPROFILE%\AppData\Roaming\Herd\logs

You can either post the logs here or send them to [email protected] (and please mention this issue #741

Please close the issue here if eversthing is already resolved!

sschlein avatar May 30 '24 11:05 sschlein

Heres the log file found in %USERPROFILE%\AppData\Roaming\Herd\logs: Uploading main.log…

skhalifa05 avatar May 30 '24 22:05 skhalifa05

main.log

skhalifa05 avatar May 30 '24 22:05 skhalifa05

@seiff-khalifa Can you please also share the herdhelper log as this is even more important for this issue?

The main log displays that it can't connect to the helper and so I assume it's not running because there are issues with it.

sschlein avatar May 31 '24 12:05 sschlein

herdhelper20240328.txt herdhelper20240329.txt herdhelper20240330.txt herdhelper20240331.txt These are the only logs when i click on the path

skhalifa05 avatar May 31 '24 12:05 skhalifa05

Did you enable the debug mode in the general settings and then restarted Herd? If yes, how does your services.json in C:\ProgramData\Herd look like?

sschlein avatar May 31 '24 12:05 sschlein

service.json

skhalifa05 avatar May 31 '24 12:05 skhalifa05

Any chance to get an answer to the first question? There's no log but the settings are correct, so the HerdHelper wasn't started with the debug mode of the latest version.

sschlein avatar May 31 '24 12:05 sschlein

yes i did enable the debug mode and quit the app and opened it again also heres a screenshot of the settings Screenshot 2024-05-31 151955

skhalifa05 avatar May 31 '24 12:05 skhalifa05

Can you please check the HerdHelper in your Windows Services list? It should be running, it looks like it's not. You can force a restart by restarting your PC or changing the port and confirming this.

Is your hosts file locked or writable?

sschlein avatar May 31 '24 12:05 sschlein

so herdhelper does exist in my windows services list but its not running and when i click start service i get th error in the screenshot and my hostfile read only property isnt checked as shown Screenshot 2024-05-31 152856 Screenshot 2024-05-31 152735

skhalifa05 avatar May 31 '24 12:05 skhalifa05

Hey folks, can you please try this NEW debug version?

This one should heal itself it the port is already in use, fix not existing hosts files, write to read-only hosts files and only use IPv6 in cases that this is properly configured on the host machine.

Download

  • Install debug version
  • Restart Herd
  • Also check the logs at %USERPROFILE%\AppData\Roaming\Herd\logs

You can either post the logs here or send them to [email protected]

THanks for helping us with debugging.

sschlein avatar Jun 03 '24 09:06 sschlein

Hey...so after downloading the latest version i still have the same error...however i tried changing the HerdHelper port after deleting one of the paths and luckily i managed to get a new error message, but still with the same initial error WhatsApp Image 2024-06-03 at 17 01 45_6598d938

skhalifa05 avatar Jun 03 '24 14:06 skhalifa05

@seiff-khalifa Are there any logs at %USERPROFILE%\AppData\Roaming\Herd\logsor C:\Windows\System32\logs like I asked in my previous message?

sschlein avatar Jun 03 '24 15:06 sschlein

well i have those in my %USERPROFILE%\AppData\Roaming\Herd\logs main.log main.old.log

skhalifa05 avatar Jun 03 '24 19:06 skhalifa05

So after I have asked about the HerdHelper logs multiple times and you haven't sent one, I assume there is none. It would be great to have a confirmation on that.

Is there a HerdHelper.exe in %USERPROFILE%\.config\herd\bin?

Please answer both questions

sschlein avatar Jun 04 '24 07:06 sschlein

Yes theres a herdhelper.exe in %USERPROFILE%.config\herd\bin, as for the herdhelper logs...i did provide them before and they're still the same, and here they are once again: herdhelper20240329.txt herdhelper20240330.txt herdhelper20240331.txt herdhelper20240328.txt

skhalifa05 avatar Jun 04 '24 07:06 skhalifa05

These logs are from March as you can see from the date in the filename, so your system doesn't even start the helper enough to write new ones.

Can you please open powershell as administrator and perform these commands to remove and install the Herdhelper again?

sc.exe stop HerdHelper
sc.exe delete HerdHelper
sc.exe create HerdHelper binPath="ABSOLUTE PATH TO Herdhelper.exe"
sc.exe start HerdHelper
sc.exe query HerdHelper

It would be great to get all the terminal output from all these commands.

One thing that I notice from your logs is that Herd seems to be at C:\Program Files\Herd but it should be at %USERPROFILE%\AppData\Roaming\Herd and I wonder why it's in Program Files.

sschlein avatar Jun 04 '24 09:06 sschlein

HYG image

skhalifa05 avatar Jun 04 '24 10:06 skhalifa05

what happens if you do that again but use the absolute path to the herdhelper.exe instead of just copy and pasting this line?

sschlein avatar Jun 04 '24 10:06 sschlein

lol sorry for that image

skhalifa05 avatar Jun 04 '24 11:06 skhalifa05

Does it work when using this?

sc.exe create HerdHelper binPath="\"C:\Users\ALIENWARE M15 R3\.config\herd\bin\HerdHelper.exe\""

You can also try adding the exe to your path, currently it's only the path, not the exe file

sschlein avatar Jun 04 '24 11:06 sschlein

ChatGPT is stupid, let's try this one if the version with spaces and exe file doesn't work.

sc.exe create HerdHelper binPath="C:\Users\ALIENWARE\ M15\ R3\.config\herd\bin\HerdHelper.exe"

sschlein avatar Jun 04 '24 11:06 sschlein

yepp same error (193) image

skhalifa05 avatar Jun 04 '24 20:06 skhalifa05

What happens if you double-click the exe file? Could you please share the output of this from the terminal?

sschlein avatar Jun 06 '24 09:06 sschlein

it worked! what a simple solution...thank you for your effort:)

skhalifa05 avatar Jun 06 '24 18:06 skhalifa05