missionpinball / mpf

Mission Pinball Framework: Open source software to run a real pinball machine.
http://missionpinball.org
MIT License
216 stars 142 forks source link

BCP does not seem to leave VM #1518

Open kylenahas opened 4 years ago

kylenahas commented 4 years ago

This may be a configuration issue on my end, but BCP does not seem to transfer data to sockets outside a Virtual Machine Guest.

I have not tested if it is able to send any messages across the network from host to another host, but I suspect not.

However I have tested: MPF and MPF Monitor on same guest OS (Works - Expected) MPF on guest, MPF Monitor on host (Does not work) MPF on guest, MPF Monitor on host with port forwarding enabled (Does not work) MPF on guest, MPF Monitor connecting to hardcoded IP of guest on host (Does not work) Netcat from guest to host using IP of host's "Host network manager" (vboxnet0) (Works - Expected)

Furthermore, adding the following to config.yaml causes mpf to crash:

bcp:
    connections:
        local_display:
            host: 127.0.0.1
            port: 5050
            type: mpf.core.bcp.bcp_socket_client.BCPClientSocket
            required: True
            exit_on_close: True

    servers:
        url_localhost:
            ip: 127.0.0.1
            port: 5051
            type: mpf.core.bcp.bcp_socket_client.BCPClientSocket

With error: Runtime Error in MPF BCP Server: Failed to bind BCP Socket to 127.0.0.1 on port 5051.

jabdoa2 commented 4 years ago

The crash happens because you then bind the port twice. You can add "_overwrite: true" to overwrite the default config.

How does you VM setup look?