drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
690 stars 90 forks source link

Dispatcher fails to run: Operation not supported #716

Open MajesticBevans opened 4 months ago

MajesticBevans commented 4 months ago

After spending quite a while trying to get a local copy of overpass running, I've now managed to get an instance working with static queries. However, I would like to be able to query it with HTTP and so am attempting to run the dispatcher. When I do this, I get the following error:

File_Error Operation not supported 95 /mnt/d/local_overpass/Overpass-API/build/db//osm3s_osm_base Unix_Socket::4

For more context, I have tried installing the latest overpass version via tarball and git clone just to make sure, and I have populated the database by using the download_clone.sh script, and am running this code on windows subsystem for linux, Ubuntu 22.04.3 LTS. I believe this is an issue with not being able to write the dispatcher file into the database, but I don't quite no why and I can't seem to find what error 95 means in the source code. I think I have identified where in the code it is being thrown:

  if (max_num_reading_processes > 0)
  {
    if (bind(socket_descriptor, (struct sockaddr*)&local,
        sizeof(struct sockaddr_un)) == -1)
      throw File_Error(errno, socket_name, "Unix_Socket::4");

in types.cc, but I don't really understand what the code is doing or how to fix it.

Any help would be appreciated.

mmd-osm commented 4 months ago

This issue seems to be WSL2 specific. Maybe check some of the answers on StackOverflow on this topic. That's all totally unrelated to Overpass API, and a general restriction when it comes to unix domain sockets: