genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
388 stars 154 forks source link

HomeGenie Port Conflicts (How to change default ports: 80 and 8080) #320

Closed sanyaade-iot closed 1 year ago

sanyaade-iot commented 6 years ago

Hello Everybody,

I am trying to run HomeGenie but my ports: 80 and port 8080 is already being used.

I found systemconfig.xml where I change the port: 80 to 85 but I could not find the hard-coded port:8080 to change. I went through the documents but could not find any related information hence my being asked for help. Now while HomeGenie is no longer using port:80 but is now locked to port:8080 which I cannot find how to change that port value to something else.

Many thanks!

I think it will be nice if the information is included in the project ReadMe.md or ReadMe.txt since this will alert Developers about this. Cheers!

Please help! Hear from you soon!

God blesses!!!

Best regards, Sanyaade

Bounz commented 6 years ago

Hi, @sanyaade-iot.

If HG cannot use 80 and 8080 ports it starts to try to bind itself to ports 8081-8090. So in your case, I think it uses 8081.

sanyaade-iot commented 6 years ago

Hi @Bounz

In my case nope, it did not work as I have Tomcat, mono and other apps taking up most port between 8080-8090. So routine inside --> https://github.com/genielabs/HomeGenie/blob/master/HomeGenie/Service/HomeGenieService.cs did not work. I went through each port one-by-one to see which port is used by HomeGenie since it does not display the running port after started up.

Solution: Download and built from github repository, modified systemconfig.xml (change port value e.g. 96), copy startup.sh into homegenie built folder(release or debug) and execute the startup.sh. These are the steps that worked for me.

It will be nice to include those steps in the documentation or troubleshoot/appendix since developer/hacker will need them. HomeGenie works very well. I got the server and app working and understand its layout. I am examining along with others --> Gladys, Domoticz, Home-Assistant, Freedomotic, ThingSpeak, OpenRemote, Kaa, Kaazing and many others. I have since got all of them running on my server.

My next step is to try them out on embedded platform like Raspberry Pi, Udoo, BeagleBone, STM32 LPC, etc...

Many thanks for your support. I have joined the group page.

God blesses!!!

Best regards, Sanyaade

davidwallis commented 6 years ago

I keep meaning to create a PR for optionally disabling this feature where it changes ports as it randomly does it on my machine when the port hasnt closed properly, was thinking just a flag that can optionally disable that functionality. (not that this helps your issue!)

tuicemen commented 5 years ago

@davidwallis3101 I've also had occasions where HG randomly changes the port in recent builds of HG. as referenced in #389 @genemars this isn't a big issue if the HG server your using is local. However I've had this happen on a remote server where port forwarding allows connection. When this action happens my access is cut until I can get to the remote location to repair. Some times this can take weeks. :(