Some friends and I are trying to create a game using the UDK 3. Right now it's nothing special; we've got a Pawn that spawns and moves around a custom map, and it's all written over the example game that comes with the UDK. I'm trying to get a dedicated server set up so we can test our changes (it's going to be a multiplayer only game). We're all on beefy Windows machines on the same network, and the server is not being run through Steam.
I've been using the Unreal Frontend to compile and package the game. The installer works fine, and the game it installs works as well. We can set up a simple peer-to-peer multiplayer game, and that works. The problem is when I try to run it as a dedicated server from the command line. The command I type in is
UDK.exe server provinggrounds.udk?bIsLanMatch=true
This executes and brings up a second console that says the game engine has initialized, and then waits. Unfortunately, none of the other copies of the game on the network can see this server, which is a problem. Now here's where it gets crazy.
I discovered this in the "try random things to see what works" phase of troubleshooting. If I run the game as a dedicated server from the command line, then open a second instance of the game on the same machine but in normal game mode, and then have that instance host a multiplayer match, any other instances of the game on the network will see one server and when they connect to it they will connect to the dedicated command line server on my computer. Once they join, I can close the normal hosting game without affecting the server, but then nobody can see the server anymore.
I really don't understand what is going on here. Why can't anybody's game find the server under normal circumstances? Why is the server only visible when there is a game instance hosting a peer to peer game on the same computer? Is there a way to fix this?
Try:
UDK.exe server map.udk?listen=true?bIsLanMatch=true?dedicated=true
That is what I use to launch a dedicated server. What you were properly missing was the listen=true part.
For more details see the documentation.
EDIT 1:
As a workaround you could force your game to connect to a given IP. In your game open with console with Tab and type Open #SERVER_IP# (replace #SERVER_IP# with the actual IP of course).
You can have your game connecting to a server passing the server's IP to it as an argument in the command line: UDK.exe #SERVER_IP#
EDIT 2:
Another problem might the firewall, perhaps UDK uses different ports when run as a dedicated server. Although unlikely, here are the ports that UDK needs to be opened/forwarded 6500, 7777, 7778, 7787, 13000, 27900 for UDP.
Related
I am a developer of ROS projects. Recently I am trying using ROS(melodic) on WSL2(Windows Subsystem for Linux), and all things works just great. But I got some trouble when I want to use another PC which also in the same local area network(LAN) to communicate with. Before setting the environment variables like "ROS_MASTER_URI, ROS_IP", I know that since WSL 2 work on Hyper-V so the IP show on WSL2 is not the one in the real LAN. I have to do some command like below in order to make everyone in LAN communicate with the specific host:PORT on WSL2.
netsh interface portproxy delete v4tov4 listenport=$port listenaddress=$addr
But here comes a new question:
The nodes which use TCPROS to communicate with each other have a random PORT every time I launch the file.
How can I handle this kind of problem?
Or is there any information on the internet that I can have a look?
Thank you.
The root problem is described in WSL issue #4150. To quote from that thread,
WSL 2 seems to NAT it's virtual network, instead of making it bridged
to the host NIC.
Option 1 - Port forwarding script on login
Note: From #kraego's comment (and the edited question, which I'm just seeing based on the comment), this is probably not a good option for ROS, since the port numbers are randomly assigned. This makes port forwarding something that would have to be dynamically done.
There are a number of workarounds described in that issue, for which you've already figured out the first part (the port forwarding). The primary technique seems to be to create a PowerShell script to detect the IP address and create the port forwarding rules that runs upon Windows login. This particular comment near the top of the thread seems to be the canonical go-to answer, although many people have posted their tweaks or alternatives throughout the very long thread.
One downside - I believe the script that is mentioned there needs to be run at logon since the WSL subsystem seems to only want to run when a user is logged in. I've found that attempting to run a WSL service or instance through Windows OpenSSH results in that instance/service shutting down soon after the SSH session is closed, unless the user is already logged into Windows with a WSL instance opened.
Option 2 - WSL1
I would also propose that, assuming it fits your workflow and if the ROS works on it (it may not, given the device access you need, but not sure), you can simply use WSL1 instead of WSL2 to avoid this. You can try this out by:
Backing up your existing distro (from PowerShell or cmd, use wsl --export <DistroName> <FileName>
Import the backup into a new WSL1 instance with wsl --import <NewDistroName> <InstallLocation> <FileNameOfBackup> --version 1
It's possible to simply change versions in place, but I tend to like to have a backup anyway before doing it, and as long as you are backing up, you may as well leave the original in place.
I'm facing a challenging problem here that don't know how to resolve:
Context: I have a game launcher that connects to my server and if doesn't detect any cheating software on the player computer, launches the game and tells the server to allow that IP to connect to the game server.
This has many potential issues like if there are multiple players under the same IP but I make a queue in that case so all is fine until here.
Now the main problem is that I don't have control over what information sends the game, I can only modify the launcher. For this reason all is IP based as that's the only way I have to identify that a certain player is logging in and has been authorised by launcher. It goes:
Launcher connects to Server and tells him to Allow IP A.
Server replies: ok (save IP A)
Launcher starts game.
Player tries to login.
A connection is established to the server, server checks if origin IP (IP A) is allowed to log in, if yes, go ahead.
So, the system even though far from ideal, does the job, and considering game is compiled and we cannot modify it, I couldn't think of better way.
Anyway now we come to the problem:
Certain players, when they open the launcher, all goes fine, game launches but then when player tries to login server denies connection as it comes from a different origin IP!
That broke up my mind, how can two tcp connections made within a few seconds of difference from client A to server B have a different client source IP? obviously this ruins all my system. I even tried to periodically fetch IP from sites like whatismyip to see if it was changing overtime but it wasn't the case, it seems like maybe because it goes to another port, or I don't know the reason, sometimes changes it and sometimes it doesn't.
It seems to be related to players being using tethering internet connections,as I e never seen this before on a common internet connection.
So basically, I'm not sure what could I do to identify/relate those two connections and this is a big problem as many players are unable to join my game and I cannot let them join without the launcher for obvious reasons.
My random ideas to resolve it range from bad to terrible:
open multiple connections to server on different ports and see if that gives different source iOS
let player connect and then do some kind of validation based on netstat check on client: when player is connected to game server I should see it there and could send that info to server, server would kick any client connected if there's no validation from launch, however, I think I would still have the problem to link both connections.
maybe there's another way that I'm not aware of to identify this connections. Assume I have full control in server side and in launcher, but I cannot change the game server packet that does the "login" attempt.
Based on your assumptions (IP-based only, game/server unmodifiable), it looks like we are hitting a wall indeed..
For the moment the only thing that comes to mind is performing multiple requests to the server instead of one, and until the user finally logs in.
I mean:
Periodically: launcher connects to server and tells him to Allow current IP. Server saves this IP and hopefully at some point you will have discovered all IPs.
Do this in the backgound until the player is finalizing its login (or a fixed period of time)
With some luck, if you open multiple connections during the whole period of time needed to start the game and login, you will have discovered and allowed all IPs of the user. This will mitigate the issue but not eliminate it.
I'll edit this post if I think about something else.
I'm currently using AutoHotKey to create a variety of macros. I have two desktops side-by-side in a private (home) network. It is my desire to have the AHK Run command on PC1 make some sort of call to PC2. Both PCs are running Windows 10 (non-domain), and both use the same login credentials (same account via microsoft.com).
What I've tried: I have tried a few things, such as WMI, WinRM, schtasks. Each of these options work when dealing with non-interactive scripts. I am trying to call scripts that a) open GUI windows or b) send key strokes to PC2.
Other requirements:
The solution cannot require the password to be type in a prompt nor provided in the command-line call. The desired effect is that I press a button on my keyboard -> ahk command triggers -> script on PC2 is called.
As this network is shared with roommates (and whoever they allow to connect to our wifi), basic security is still a necessity.
This is not a language specific question - I am looking for the simplest/easiest/cleanest method. Thanks for reading.
Try a remote access connection app like TeamViewer. They allow you to control one PC from another across a network. https://www.teamviewer.com/en/
I have an astronomical observatory in my yard with four computers connected to all the observatory equipment. These four computers are controlled over my home network from one PC in the house.
The remote access app allows you to run an .exe on another computer which in my case is usually a compiled AHK script.
I have a number of tasks that require several PC's. A script running on the main PC will start secondary scripts on the observatory PC'c which in turn will send messages back and forth by sending text files to each others shared files. The PC receiving the text file will perform a specific action based on the message.
Here's a link to the observatory startup procedure. I a startup script on the main PC which turns on all the observatory equipment then starts a secondary startup script on each of the observatory PC's to load and position all the software and then connect all the cameras and associated equipment.
https://www.youtube.com/watch?v=UN4VoOKOcXo&feature=youtu.be
This just shows how the various scrips running on the observatory PC's load and position all the various app windows. Not exactly what you may need but it may give you some ideas about what you can do with the remote access software.
Lorence
I'm not sure if I'm asking the question properly. I'm referring to locally installed software, often called an "Agent" that keeps in regular communication with some host via HTTP. e.g. When you install LogMeIn, the Agent keeps in communication with the logmein.com server so that when you visit logmein.com with your web browser and connect to the agent, the server is able to initiate communication. The Agent, however, isn't a webserver, nor are any ports forwarded to the Agent. So, is the Agent constantly polling the server asking like a broken record, "Can I help you? Can I help you? Can I help you?" Or is the http connection from Agent to server somehow kept open? I know you can keep an http connection open, but A) how, and B) for how long? Does the Agent need to act like a less annoying broken record asking, "Can I help you? Yet? Yet? Yet?" with much more time in between each question? Or can the Agent ask once and wait indefinitely, asking again only once it learns that the connection has been dropped?
Bottom line is, I'd like to create a small little sample program for trying my hand at writing a client/server application that communicates via the Internet using HTTP. Either side needs to be able to initiate commands / requests. The Agent would likely communicate with the Server using some sort of API, perhaps RESTful. When I start the experiment, I'll be using Perl. It'd be fun to create a Hello World project that would have samples in many languages for many platforms how to write the agent and how to communicate with the server. The agent code would do client side things (e.g. determine public IP address) and send the data to the server. The server would act on the data (e.g. store IP address in a database). The server might also initiate a command to the Agent (e.g. Hey, Agent! What's your CPU type?) Proper authentication / authorization between Agent and Server is of course a necessity.
Are there any existing projects to model off of? Any existing documents? Perhaps I'm just missing terminology and if I just knew that everything I was asking can be summarized by the term foo, then the doors would be opened wide for what I could find in searches!
I looked into the code of Ubuntu's Landscape. It uses Python's Twister -- a web server for HTML5 Websockets. So I'd say what I was looking for in an answer is Websockets (bi-directional communication). That now has opened up a wealth of options, node.js, twister, mojolicious, and many many more as web servers. Turns out using Ajax to poll every few seconds is a very bad idea -- an overwhelming slam on web servers. Keep the connection open.
On my Win7-PC the network takes up to 10 minutes until it's shown as ready (through network icon). The weird thing is that even in the meantime (blue circle is spinning) network activities like mail, internet and access to network shares are working.
How does Win7 decide that a network is ready?
The issue is that one of my installed apps which uses the IP stack (runs on localhost) doesn't work until the network is in ready-state. I found out that if I disable the Windows Management Instrumentation service the network state switches to ready immediately. However, this prevents a couple of other services from starting what could lead to a security issue. (To me it seems like my PC waits until it gets a GO from our network... but no evidence here)
Any hints?
Try to apply this hotfix, sometimes it works:
http://support.microsoft.com/kb/2617858
When it happens to me I have to kill the process tree of two services:
SMS Agent Host
Winmgmt
(select the service, right click, select "go to process", right click on the process, select "end process tree"; if you cannot see the process remember to click the "show processes from all the users" button).
Finally delete the "c:\windows\system32\wbem\repository" folder as fast as possible.
The "repository" folder will be re-created and the network will start working properly.
This worked for me.
Click on run dialog and type msconfig.
In the pop up click on services.
Then check/tick Hide Microsoft services.
In the ensuing dialog uncheck/untick Nividia Network service.
Finally click Apply. restart computer.
Your problem will be solved.
Disabling NVidia Network services stopped that for me.
While updating drivers etc. is good practice, it is usually just a wild goosechase.