FreezyMTA Posted February 9, 2024 Posted February 9, 2024 Now I have 2 servers. I want to send the current player count every time there is onPlayerJoin and onPlayerQuit from server 1 to server 2. However, I could send the data from the 1st server to the 2nd server, but the 2nd server could not send the data to the 1st server, now none of them can send it and it gives a TIMED OUT error. Port 22005 is open on both servers, I gave HTTP authorization from ACL and meta.xml, but it still does not work. I searched a lot and couldn't find a solution, please help. server.lua file of the 1st server. function getPlayerCount() return #getElementsByType("player") end function joinQuit() callRemote("http://185.136.206.116:22005/cdm_connection/call/getPlayerCount", function(responseData, errorID) responseData = tostring(responseData) if responseData == "ERROR" then outputDebugString("callRemote: ERROR #" .. errorID) elseif not tonumber(responseData) then outputDebugString("callRemote: Unexpected reply: " .. responseData) else print(tonumber(responseData)) setElementData(root, "cdm", tonumber(responseData)) end end) end addEventHandler("onPlayerJoin", root, joinQuit) addEventHandler("onPlayerQuit", root, joinQuit) addEventHandler("onResourceStart", resourceRoot, joinQuit) server.lua file of the 2nd server. function getPlayerCount() return #getElementsByType("player") end function joinQuit() callRemote("http://193.223.107.111:22005/cr_connection/call/getPlayerCount", function(responseData, errorID) responseData = tostring(responseData) if responseData == "ERROR" then outputDebugString("callRemote: ERROR #" .. errorID) elseif not tonumber(responseData) then outputDebugString("callRemote: Unexpected reply: " .. responseData) else print(tonumber(responseData)) setElementData(root, "cdp", tonumber(responseData)) end end) end addEventHandler("onPlayerJoin", root, joinQuit) addEventHandler("onPlayerQuit", root, joinQuit) addEventHandler("onResourceStart", resourceRoot, joinQuit) And this is the TIMED OUT error: https://imgur.com/6wIOIEe Please help.
Moderators IIYAMA Posted February 9, 2024 Moderators Posted February 9, 2024 4 hours ago, FreezyMTA said: I gave HTTP authorization from ACL and meta.xml, but it still does not work. You probably already did the following, but just checking. What happens if you visit those URL's manually? (maybe it is asking for a login authorisation)
FreezyMTA Posted February 17, 2024 Author Posted February 17, 2024 When we log in manually using this URL, it gives a timed out error.
Moderators IIYAMA Posted February 18, 2024 Moderators Posted February 18, 2024 6 hours ago, FreezyMTA said: When we log in manually using this URL, it gives a timed out error. Is the web panel accessible? (and other resources)
Human Resources Staff Vinyard Posted May 3, 2024 Human Resources Staff Posted May 3, 2024 Closing this as solved.
Recommended Posts