Modify

Opened 10 months ago

#24213 new defect

MagicWand Plugin: "SAM server not reachable" with local SAMGEO Docker (CPU)

Reported by: anonymous Owned by:
Priority: normal Milestone:
Component: Plugin Magic Wand Version: tested
Keywords: MagicWand, SAM, SAMGEO Cc:

Description

I am trying to use the MagicWand plugin with a locally running SAMGEO Docker container. I have successfully set up the SAMGEO container and can access its API via my web browser (e.g., http://localhost/ returns a valid JSON response), confirming that the service is running. However, when I try to use the MagicWand plugin within JOSM, I consistently receive the error message:
"SAM server not reachable"
I have installed the latest version of the MagicWand plugin. I have also restarted both JOSM and the Docker container multiple times. My system does *not* have a dedicated NVIDIA GPU, so I am running the SAMGEO container in CPU mode (by removing the --gpus all flag from the docker run command). I have confirmed that the BASE_URL in my .env file is set to http://localhost/. My firewall is not blocking connections to localhost:80.

Previous Communication with Plugin Developer & Suggested Improvement:

I initially reported this issue to the MagicWand plugin developer on GitHub. The developer (@yunica) suggested that I recompile the plugin with the SAM_API URL set to http://localhost. I attempted to do this, but encountered compilation errors due to missing or unresolved dependencies (related to org.locationtech.jts, org.opencv, com.fasterxml.jackson, and okhttp3). I've included a link to the full GitHub issue for context:(https://github.com/developmentseed/JosmMagicWand/issues/9)

While recompiling *might* be a temporary workaround, I believe a more robust and user-friendly solution would be to allow users to configure the SAM API URL directly within the JOSM plugin settings. This is a common practice in many JOSM plugins and would offer several advantages:

  • Flexibility: Users could easily switch between local (Docker) and remote SAM API endpoints without needing to modify or rebuild the plugin.
  • Ease of Use: No technical expertise (Java development, compilation) would be required to use the plugin with different SAMGEO setups.
  • Maintainability: Future updates to the plugin or SAMGEO wouldn't necessarily require users to recompile the plugin.
  • Portability: If users run SAMGEO on a non-standard port, they could easily configure the plugin accordingly.

I understand that implementing this feature might require changes to both the MagicWand plugin *and* potentially JOSM's plugin API (if it doesn't already support this kind of configuration). However, I believe the benefits in terms of usability and maintainability would be significant.

Expected Result:

Users should be able to configure the SAM API URL in the MagicWand plugin settings within JOSM. After setting the URL to http://localhost/ (or the appropriate endpoint), the plugin should connect to the local SAMGEO instance and allow for image segmentation.

Actual Result:

The plugin displays the error message: "SAM server not reachable."

Could you please consider adding the ability to configure the SAM API URL within the JOSM plugin settings? In the meantime, could you also provide guidance on resolving the "SAM server not reachable" error, even if it requires a temporary workaround?


Attachments:

I am attaching the following files to help with troubleshooting:

  1. compilation_log.txt: This file contains the complete output (including all errors) from my attempt to recompile the MagicWand plugin using ant. This should provide details about the missing dependencies or other compilation issues.
  2. josm_error_screenshot.png: This is a screenshot of the "SAM server not reachable" error message I see within JOSM when trying to use the MagicWand plugin.


Attachments (2)

compilation_log.txt (44.0 KB ) - added by anonymous 10 months ago.
josm_error_screenshot.png (64.5 KB ) - added by anonymous 10 months ago.

Download all attachments as: .zip

Change History (2)

by anonymous, 10 months ago

Attachment: compilation_log.txt added

by anonymous, 10 months ago

Attachment: josm_error_screenshot.png added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from (none) to the specified user.
Next status will be 'needinfo'. The owner will be changed from (none) to anonymous.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.