Static site export module socket issue

I’ve tried to test the recently released “Static Site Export” module.

I don’t seem to be able to create any static website. After setting a path (a full server path) to the export folder in the module configuration, when I try to create a static site I inevitably get some variation of the following error:

2025-08-30T11:37:08+00:00 ERR (3): ErrorException: stream_socket_client(): Unable to connect to : (Failed to parse address ":") in /var/www/html/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:323
Stack trace:
#0 [internal function]: Laminas\Stdlib\ErrorHandler::addError(2, 'stream_socket_c...', '/var/www/html/v...', 323)
#1 /var/www/html/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php(323): stream_socket_client(':', 0, '', 10, 4, Resource id #2211)
#2 /var/www/html/vendor/laminas/laminas-http/src/Client.php(1465): Laminas\Http\Client\Adapter\Socket->connect(NULL, NULL, false)
#3 /var/www/html/vendor/laminas/laminas-http/src/Client.php(965): Laminas\Http\Client->doRequest(Object(Laminas\Uri\Http), 'GET', false, Array, '')
#4 /var/www/html/volume/modules/StaticSiteExport/src/Job/ExportStaticSite.php(463): Laminas\Http\Client->send()
#5 /var/www/html/volume/modules/StaticSiteExport/src/Job/ExportStaticSite.php(212): StaticSiteExport\Job\ExportStaticSite->createAssetBundle(201)
#6 /var/www/html/volume/modules/StaticSiteExport/src/Job/ExportStaticSite.php(79): StaticSiteExport\Job\ExportStaticSite->createAssetsSection()
#7 /var/www/html/application/src/Job/DispatchStrategy/Synchronous.php(34): StaticSiteExport\Job\ExportStaticSite->perform()
#8 /var/www/html/volume/modules/Common/src/Job/Dispatcher.php(27): Omeka\Job\DispatchStrategy\Synchronous->send(Object(Omeka\Entity\Job))
#9 /var/www/html/application/data/scripts/perform-job.php(66): Common\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\Synchronous))
#10 {main}

Next Laminas\Http\Client\Adapter\Exception\RuntimeException: Unable to connect to :0 . Error #0: stream_socket_client(): Unable to connect to : (Failed to parse address ":") in /var/www/html/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:335
Stack trace:
#0 /var/www/html/vendor/laminas/laminas-http/src/Client.php(1465): Laminas\Http\Client\Adapter\Socket->connect(NULL, NULL, false)
#1 /var/www/html/vendor/laminas/laminas-http/src/Client.php(965): Laminas\Http\Client->doRequest(Object(Laminas\Uri\Http), 'GET', false, Array, '')
#2 /var/www/html/volume/modules/StaticSiteExport/src/Job/ExportStaticSite.php(463): Laminas\Http\Client->send()
#3 /var/www/html/volume/modules/StaticSiteExport/src/Job/ExportStaticSite.php(212): StaticSiteExport\Job\ExportStaticSite->createAssetBundle(201)
#4 /var/www/html/volume/modules/StaticSiteExport/src/Job/ExportStaticSite.php(79): StaticSiteExport\Job\ExportStaticSite->createAssetsSection()
#5 /var/www/html/application/src/Job/DispatchStrategy/Synchronous.php(34): StaticSiteExport\Job\ExportStaticSite->perform()
#6 /var/www/html/volume/modules/Common/src/Job/Dispatcher.php(27): Omeka\Job\DispatchStrategy\Synchronous->send(Object(Omeka\Entity\Job))
#7 /var/www/html/application/data/scripts/perform-job.php(66): Common\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\Synchronous))
#8 {main}

I’m perhaps most puzzled by the (Failed to parse address ":") reference, as the address “:” doesn’t seem meaningful, and if I don’t get what address it’s trying to reach or what the issue really is, then I struggle to introduce remedial solutions (port forwarding, custom socket path, etc.)

But perhaps, I’m just misunderstanding what is really going on here, so any hints would be warmly welcome.

I’m running this locally with Docker compose (basically, with this docker-compose.yml and this image).

The installation works completely fine in any other respect.

Again, I appreciate this is likely related to the way I deploy Omeka S locally, but just some hints about what it it is that is not working here may well help me in finding a good solution.

Essentially the HTTP client is attempting to copy an asset file from your storage to the static site directory. It appears that your configured file store is returning “:” for the asset URL when it should be returning a valid URL that points to the asset file. I’m at a loss why this is happening.

1 Like

Thanks a lot for this reply, this was really helpful as I was looking in other directions.

The culprit was this section in my local.config.php:

    'file_store' => [
        'local' => [
            'base_path' => null, // Or the full path on the server if needed.
            'base_uri' => '/files',
        ],
    ],

Honestly, I have no memory of why I set it the way it is. Adding the full local ip before “/files” fixed this issue, but actually, even completely removing this section fixed this issue and had no apparent side effect (in my deployed sites, the ‘base_uri’ field includes the full base url of the website).

From there, things worked out nicely. I quickly figured out that an error thrown by --recurse-paths was effectively hinting at the lack of zip on the server (as get('Omeka\Cli')->getCommandPath('zip') called from the module returns an empty string, not an error).

I got some issues building with Hugo with some sites, but I suppose this may be related to modules… I will troubleshoot this further and report back if I find other issues.

Overall, really happy to see this working… even if this may require re-building at least part of custom themes for Hugo, the default build looks like a solid starting point and a reasonable base line that is good to have as a fallback option.