Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
indigo_2025.1_documentation:indigo_web_server [2026/02/04 22:52] – [Websocket Failures] jayindigo_2025.1_documentation:indigo_web_server [2026/02/04 23:03] (current) – [Try Local and Reflector Connections] jay
Line 162: Line 162:
 If you're having trouble getting a Python, JavaScript or other code to connect, it's best to add a lot of logging and error trapping to your code which will help to isolate any issues. You can always turn off or remove extra logging when you're done. If you're having trouble getting a Python, JavaScript or other code to connect, it's best to add a lot of logging and error trapping to your code which will help to isolate any issues. You can always turn off or remove extra logging when you're done.
 == Make Sure You Have the Right Websockets Version Installed == == Make Sure You Have the Right Websockets Version Installed ==
-Each new version of Indigo is tested against a specific version of the websockets library and having a different websockets version can potentially cause problems. If you can't connect to the server using [[indigo_touch_web|Indigo Touch For Web]], the websockets library may be causing some trouble. To check which version of the websockets library you have installed, open a terminal window and run the following command (note that the pip version may be different for other versions of Indigo):+Each new version of Indigo is tested against a specific version of the websockets library and having a different websockets version can potentially cause problems. If you can't connect to the server using [[indigo_touch_web|Indigo Touch For Web]], the websockets library may be causing some trouble. To check which version of the websockets library you have installed, open a terminal window and run the following command:
 <code> <code>
 pip3 show websockets pip3 show websockets
 </code> </code>
-To see which version **should** be installed, head over to [[python_packages|Python Packages and Indigo]] and follow the instructions there.+To see which version **should** be installed, head over to [[python_packages|Python Packages and Indigo]] and follow the instructions there. Also, note that you may have multiple version of Python installed, so you'll want to make sure you're using the right pip by specifying the full version (pip3.11, pip3.13, etc).
  
 == Make Sure You're Using the Right Security Layer == == Make Sure You're Using the Right Security Layer ==
Line 177: Line 177:
 == Test With a Simple Script or Link == == Test With a Simple Script or Link ==
  
-Another diagnostic tool you can try is to attempt to connect to the server using simple, known methods to try to isolate the issue. +Another diagnostic tool you can try is to attempt to connect to the server using simple, known methods to try to isolate the issue. There are sample websocket scripts near the top of the [[indigo_2025.1_documentation:api|Integration APIs]] page. These scripts will attempt to make a simple connection to the websocket API.
- +
-**Websockets** +
- +
-There are sample websocket scripts near the top of the [[indigo_2025.1_documentation:api|Integration APIs]] page. These scripts will attempt to make a simple connection to the websocket API.+
  
 == Review Your Network Configuration == == Review Your Network Configuration ==
 Some networking configurations can impact your ability to attach to the Indigo Server using the API endpoints. You should ensure that you're not blocking IPs or ports that you're trying to connect with. If you're running your traffic through a VPN, blocking or filtering traffic through applications like Little Snitch or PiHole, make sure these programs aren't blocking the traffic. Make sure that your Indigo Server and client are both on the same network (including subnet). Also check to ensure that nothing else is trying to use the port you're using with Indigo. Some networking configurations can impact your ability to attach to the Indigo Server using the API endpoints. You should ensure that you're not blocking IPs or ports that you're trying to connect with. If you're running your traffic through a VPN, blocking or filtering traffic through applications like Little Snitch or PiHole, make sure these programs aren't blocking the traffic. Make sure that your Indigo Server and client are both on the same network (including subnet). Also check to ensure that nothing else is trying to use the port you're using with Indigo.
 +
 +=== Other Potential Issues ===
 +
 +There are other issues that may arise with the Indigo Web Server. If you are having issues outside of the above, then you can use the next sections to help diagnose what might be causing them.
  
 == Check Your Hosts File ==  == Check Your Hosts File == 
-Sometimes, hosts file settings can cause conflicts. Review your hosts file (do not make changes unless you know what you're doing) to see if anything looks like it might be rerouting your connection. The hosts file is typically located in **''/etc/hosts''**.+Sometimes, hosts file settings can cause conflicts. Review your hosts file (do not make changes unless you know what you're doing) to see if anything looks like it might be rerouting your connection. The hosts file is typically located in **''/etc/hosts''**. It should only contain lines similar to this:
  
 +    127.0.0.1       localhost
 +    255.255.255.255 broadcasthost
 +    ::1             localhost
 +
 +If you have other declarations, especially for ''**localhost**'', then that might be interfering with normal Web Server operation. We recommend commenting out any lines that are not the above lines to debug any issues you may have.
 == Check Your Server's Network Connection and Settings == == Check Your Server's Network Connection and Settings ==
 Assuming your server machine is able to connect to your network, check to ensure that the server machine isn't connecting with both wired and wireless connections. This can sometimes cause issues with network traffic. It's generally best to stick to one connection method. Assuming your server machine is able to connect to your network, check to ensure that the server machine isn't connecting with both wired and wireless connections. This can sometimes cause issues with network traffic. It's generally best to stick to one connection method.
Line 194: Line 199:
 == Try Local and Reflector Connections == == Try Local and Reflector Connections ==
 If you can't connect locally, you still may be able to connect with the Indigo Reflector service. The reverse is also true. If you can connect via one method but not the other (both should work under normal circumstances) that may help you isolate the issue. If you can't connect locally, you still may be able to connect with the Indigo Reflector service. The reverse is also true. If you can connect via one method but not the other (both should work under normal circumstances) that may help you isolate the issue.
 +
 +== Disable Firewalls and Virus Protection ==
 +
 +Sometimes various firewall products (including macOS built-in firewall) can block different types of network connections. Virus Protection software can be especially bad about interfering with network traffic. While troubleshooting it's recommended to disable all such software on your Mac.
  • /www/perceptive/wiki/data/attic/indigo_2025.1_documentation/indigo_web_server.1770245523.txt.gz
  • Last modified: 2026/02/04 22:52
  • by jay