FreezyMTA Posted February 9 Share Posted February 9 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. Link to comment
Moderators IIYAMA Posted February 9 Moderators Share Posted February 9 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) Link to comment
FreezyMTA Posted February 17 Author Share Posted February 17 When we log in manually using this URL, it gives a timed out error. Link to comment
Moderators IIYAMA Posted February 18 Moderators Share Posted February 18 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) Link to comment
Moderators Vinyard Posted May 3 Moderators Share Posted May 3 Closing this as solved. Link to comment
Recommended Posts