Closed benloh closed 1 year ago
unassigned @jdanish
In GitLab by @daveseah on Apr 25, 2023, 13:15
Noting a difference in the two wireshark traces in the very beginning.
[SYN]
and [ACK]
packets (sometimes combined as [SYN, ACK]
) going back and forth. This is the TCP connection handshake. SYN
is a request to sync, and ACK
is the returned acknowledgement that this is OK. It happens in both directions.[SYN]
and [RST,ACK]
instead. RST
means that the connection was refused (reset). This suggests that the M2 is receiving the connection request, but is actively refusing the attempt to connect and sending back an [RST,ACK]
packet. The client continues to send the connection request over and over again.
There is a list of causes for RST
on this page. One of them is that there is no open port on the server. So I think we have to check when the server is actually listening on the right port and the right interface. It could be something like an extra space in local-settings.json
in the specified port or a malformed JSON file that is silently failing.
OTHER CHECKS
http://<ip-addr>/assets
mcp-srv
work? This is a separate express server for centralized asset hosting. To test, stop the GEMSTEP server and then do npm run mcp:multi
to start the resource host server and browse to http://<ip-addr>:8080
.gs_packages/gem-srv/config/local-settings.json
file to check for weirdness. OVERRIDES
for import by mcp-settings
and gem-settings.js
, so if there was an error it would choke (?) during build. GS_APP_PORT
works for strings that are numbers, and malformed numbers will throw an error, so this probably isn't the issue...In GitLab by @daveseah on Apr 25, 2023, 13:29
In GitLab by @daveseah on Apr 25, 2023, 14:10
ANOTHER THING TO TRY
The particular node binary for v14.18.1 being blocked despite the firewall being off due to MacOS security. Each version of node that is installed is a different binary, so this may be why NetCreate works and GEMSTEP doesn't IF they are using different versions of NodeJS as determined by nvm use
and the .nvmrc
file.
nvm uninstall v14.18.1
(if this is the version being used by GEMSTEP via nvm use
)rm -fr ~/.nvm/versions/node/v14.18.1
nvm install v14.18.1
- this should be a new binary presumably distinct from the previous one, even though the path is the same...NOTE: I don't think nvm use
permanently sets the node version in a folder. If you change it to something in another app project that required a different version, and then switch back, you have to run nvm use
each time.
NOTE: Each version of node switched-in by nvm use
has its own set of global node_modules
, so you will have to reinstall lerna
. Also, you should nuke node_modules
in the GEMSTEP directory after changing the node version because they may be incompatible with the version you're using.
In GitLab by @jdanish on Apr 25, 2023, 15:18
Tried this, and this is what the helper script asked for so this is what I ran:
nvm install v14.18.1 nvm alias default v14.18.1 nvm use npm install -g lerna npm ci npm run bootstrap
In GitLab by @jdanish on Apr 25, 2023, 15:21
This did it! With the new node it asked me to sign off on node accepting connections and I did (I have an admin password now) and it worked. So it was somehow caching that I couldn't before. Anyhow, thanks!! Apologies for the hassle!!!
Joshua reports having trouble getting GEMSTEP to run as a server on his new M2 laptop.
It runs fine on localhost: Main, Viewers, and Character Controllers all work.
But on a client machine, it seems that no connection is being made to the server. On the client, if you go to http://(serverip) you get no response at all — the network console reports no response, and the terminal on the server does not show any kind of connection request.
On the client, we CAN see the outgoing request, we just don’t see a response from the server. There’s no browser console output. I would think that even if the socket / server communication is broken, you would still at least be able to serve the HTML files...
It’s probably not a browser security issue because he used two different clients: an old MPB and an iPhone, and neither could connect to the server.
The firewall has been turned off. He's using the right node version, and we've tried a fresh install. MEME is on node v10.20.1, and GEMSTEP on v14.18.1.
The run log looks like this:
So everything appears normal.
Wireshark log for GEMSTEP looks like this: NOTE that the first 4 lines are probably MEME/NetCreate calls to port 3000. GEMSTEP starts with Number 518, the [SYN] on port 80.
In contrast, here's Wireshark output with MEME, note all the ACK messages from the server:
Tests
Other Mac
Ben is able to get it to run on his M1 MacBook Air with a clean install.
Use port 8888 instead of 80
We tried changing GS_APP_PORT to 8888, and are able to run Main on port 8888 on the server, but the client had the same connection problem, e.g. http://192.168.50.186:8888 from the client was unable to connect to the server. (edited)
Use another app
NetCreate does run, so we also tried changing GS_APP_PORT to 3000 but still the same problem. So it doesn't seem like it's an issue with port 80. I was at first thinking it was some kind of Ventura security/firewall/permissions issue, but given that NetCreate runs, it seems odd that GEMSTEP wouldn't. The compiled MEME Electron app also runs.
Other Ideas We Haven't Tried Yet
Try installing and running MAMP or MAMP Pro and try to serve a PHP site on port 80. Pay particular attention to security permissions that are being requested as you run it. And then see if Terminal (or VSCode, if you're running the server from VSCode) has similiar permissions.
Try running GEMSTEP on the other mac
Try running NetCreate or MEME with Node v14 (may not work).
Try adding more verbose server logging to monitor connection status and any failures
Review IU security / restrictions that might still be enabled on the machine