Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeException: Failed to start Temporal test server: qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory #27

Closed
esnare opened this issue Nov 21, 2023 · 2 comments

Comments

@esnare
Copy link

esnare commented Nov 21, 2023

Hi There Community,

I am running the latest Laravel version with the latest version of the package on an Apple M1 using Laravel Sail.

I wanted to use the Temporal server built-in on this package for testing purposes so I imported the trait WithTemporal into the testing and added the Temporal::fake(); at the top. However, when running the test, I found the following error:

Failed to start Temporal test server: qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

I have been reading about the issue and it seems that the docker image needs to be from a specific Linux version that is not what the Sail team is currently using.

Does this mean the testing server will not run on the Sail Docker environment running on Mac?
Thanks

Here is a copy of the full test:

class PayOutWorkflowTest extends TestCase
{
    use WithTemporal;

    /**
     * @test
     */
    public function it_can_run_payout_workflow()
    {
        Temporal::fake();

        $workflowMock = Temporal::mockWorkflow(PayOutWorkflowInterface::class)
            ->onTaskQueue('default')
            ->andReturn('result');

        $workflowMock->assertDispatched();
    }
}
@cappuc
Copy link
Contributor

cappuc commented Nov 21, 2023

Hi,

I think the problem is that the temporal testing server is compiled only for amd64 (https://github.com/temporalio/sdk-java/releases) so it fails to run on a arm64 docker image.

I'm not using sail so I don't know what is the best solution but two things you can try are:

  • Force to run the app image as amd64
  • Run the temporal test server as seperate service and not with the provided command, something like this (in the docker-compose.yaml):
    services:
      temporal:
        container_name: temporal
        image: keepsuit/temporalio-dev-server
        ports:
          - 7233:7233
          - 8233:8233
    and force to use the external server with env variables:
    TEMPORAL_TESTING_SERVER=false
    TEMPORAL_ADDRESS=temporal:7233
    

@EricxStone
Copy link

When I put platform: linux/amd64 in the docker file and it seems to work for me.

services:
    laravel.app:
        platform: linux/amd64
        build:
            context: .
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.2/app

@cappuc cappuc closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants