Giter VIP home page Giter VIP logo

tgstation / tgstation-server Goto Github PK

View Code? Open in Web Editor NEW
61.0 16.0 78.0 1.13 GB

A production scale tool for DreamMaker server management

Home Page: https://tgstation.github.io/tgstation-server/

License: GNU Affero General Public License v3.0

C# 96.29% DM 3.12% Shell 0.24% Dockerfile 0.05% Batchfile 0.02% Makefile 0.05% PowerShell 0.17% HTML 0.02% Roff 0.03%
tgstation game-server byond ss13 client-lib tgstation-server uptime-monitor api discord-bot dreammaker

tgstation-server's People

Contributors

affectedarc07 avatar alexkar598 avatar anturk avatar bobbah avatar chipitsine avatar coolguy3289 avatar cyberboss avatar cyprex avatar distributivgesetz avatar elgohr avatar fikou avatar hawk-v3 avatar j-mie avatar jamieh avatar lzimann avatar maltvinegar avatar mrstonedone avatar ninjanomnom avatar optimumtact avatar out-of-phaze avatar peliex avatar remierichards avatar spookydonut avatar tgstation-server avatar thunder12345 avatar tiviplus avatar vuonojenmustaturska avatar waffle-iron avatar zephyrtfa avatar zewaka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tgstation-server's Issues

Canceling compiling doesn't work right. (and other bugs around the compiling state)

The compiling state is the longest active state the tools will be in (by far).

Atm, canceling during compiling waits for the compile to finish, and then just doesn't stage the update. This isn't how one would expect that to work. It should just proc kill the compiler process.

Starting a new job while it's already compiling doesn't do anything right. It just fails to start the compiler, then the original compile job continues. No warning about an active task, nothing.

Ideally it should be a pop up modal. Giving 3 options, abort, cancel current job and continue, and forcefully continue.

Actually, if it's a compile its in the middle of doing, it should just abort the compile and do the new job, no prompts.

The way tgs2 did this, was actually a 10 second prompt before the compile started, giving the user the chance to stop, as well as the ability to just close it during the compile to abort, and a double warning next update run about a unfinished state, and the possibility the update job was still running. (because it had no way of knowing)

Being forced to wait 3 to 5 minutes to do something else if you realized you made a mistake or want to amend the update job isn't ideal

Discord Bot spam connecting

Bot Token Reset Due to Potential Abuse

It appears your bot, MimeBot, has connected to Discord more than 1000 times within a short time period. Since this kind of behavior is usually a result of a bug we have gone ahead and reset your bot's token.

RSC corruption likely caused by an old rsc sticking around in the staging folder.

If there is a rsc in the folder, byond will try to re-use it, and even use it for resources not in the actual project folder.

This (feature) of byond is horribly bugged, random bits of old versions of now not used files will get interspaced where nulls or rsc metadata should be.

Example:

ร“....x">Photocopied papers will now retain their stamps</li>.... (. = unprintable character)
The ร“ is the exact spot the last file ended (an ogg) at this point, there should be 18 bytes of meta data, followed by 4 bytes of payload size, a null terminated file name string (not part of the payload size), and the payload

Instead we have a random changelog entry.

This is a real example, from hippie.

tgs2 deleted the old staging folder every time before copying over from the repo to prevent things like this (and prevent now deleted files sticking around)

Update and testmerge pushes compiled changelogs after test merging, causing the test merge commits to get pushed too

Update and testmerge pushes compiled changelogs after test merging, causing the test merge commits to get pushed too

tgstation/tgstation#29155

[00:09:50] <Mr_Bagil> REPO: Updating origin branch...(Hard Reset)
[00:09:53] <Mr_Bagil> REPO: Test merging PR #29155...
[00:09:54] <TheGhostOfWhibyl1> https://github.com/tgstation/tgstation/pull/29155 - '[wip][dnm]A* improvements' by MrStonedOne
[00:10:04] <TheGhostOfWhibyl1> [tgstation] tgstation-server pushed 6 new commits to master: https://github.com/tgstation/tgstation/compare/5836c10e3097...86c41964b99f
[00:10:04] <TheGhostOfWhibyl1> tgstation/master 85de154 MrStonedOne: astar improvements...
[00:10:04] <TheGhostOfWhibyl1> tgstation/master e5d3cd8 MrStonedOne: commiting debug version just so its on record somewhere if i want it again.
[00:10:04] <TheGhostOfWhibyl1> tgstation/master f952583 MrStonedOne: And the comparison debug version
[00:10:11] <TheGhostOfWhibyl1> [tgstation] tgstation-server closed pull request #29155: [wip][dnm]A* improvements (master...betterastar) https://github.com/tgstation/tgstation/pull/29155
[00:10:13] <TheGhostOfWhibyl1> [tgstation] tgstation-server pushed 1 new commit to master: https://github.com/tgstation/tgstation/commit/73f60400e86483abb1ab0842d30852bda5afcae0
[00:10:13] <TheGhostOfWhibyl1> tgstation/master 73f6040 tgstation-server: Automatic changelog generation for PR #29155 [ci skip]

@Cyberboss This can't happen. Me even having commit access to push compiled changelogs is on shaky grounds, and I kept it because I made damn sure shit like this never happened by treating the compile and push changelog code in tgs2 with more care and attention then I treat player facing non-parameterized sql code. I basically treated it like a loaded bomb.

Add a way to send host announcements

In dream daemon, there was a button that allowed you to send announcements to all connected players shown as message from host.
It can be useful in certain scenarios, and it bypasses most gamecode and lag.

Topic delivery failed! after update

Detached the service, got an error about the service being dead after running the command line, updated, ran server tools and got "Topic delivery failed!" as my status

Service crashed

Application: TGServerService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
   at Discord.Net.WebSockets.GatewaySocket+<ProcessMessage>d__17.MoveNext()

Exception Info: System.AggregateException
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean)
   at System.Threading.Tasks.Task.Wait(Int32, System.Threading.CancellationToken)
   at Discord.Net.WebSockets.WebSocket.<.ctor>b__33_1(System.Object, Discord.Net.WebSockets.TextMessageEventArgs)
   at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b-CENSORED-9]].Invoke(System.Object, System.__Canon)
   at Discord.Net.WebSockets.WS4NetEngine.OnTextMessage(System.String)
   at Discord.Net.WebSockets.WS4NetEngine.OnWebSocketText(System.Object, WebSocket4Net.MessageReceivedEventArgs)
   at WebSocket4Net.WebSocket.FireMessageReceived(System.String)
   at WebSocket4Net.Command.Text.ExecuteCommand(WebSocket4Net.WebSocket, WebSocket4Net.WebSocketCommandInfo)
   at WebSocket4Net.WebSocket.ExecuteCommand(WebSocket4Net.WebSocketCommandInfo)
   at WebSocket4Net.WebSocket.OnDataReceived(Byte[], Int32, Int32)
   at WebSocket4Net.WebSocket.client_DataReceived(System.Object, SuperSocket.ClientEngine.DataEventArgs)
   at SuperSocket.ClientEngine.ClientSession.OnDataReceived(Byte[], Int32, Int32)
   at SuperSocket.ClientEngine.SslStreamTcpSession.OnDataRead(System.IAsyncResult)
   at System.Net.LazyAsyncResult.Complete(IntPtr)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)
   at System.Net.Security._SslStream.ProcessFrameBody(Int32, Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
   at System.Net.Security._SslStream.ReadFrameCallback(System.Net.AsyncProtocolRequest)
   at System.Net.AsyncProtocolRequest.CompleteRequest(Int32)
   at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32)
   at System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult)
   at System.Net.LazyAsyncResult.Complete(IntPtr)
   at System.Net.ContextAwareResult.CompleteCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Net.ContextAwareResult.Complete(IntPtr)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

On that note, what is the best way to recover from this, the round is still going and what not, is there a way to start the service so it reattached, does it default to that, or would I have to wait for the round to end, task kill DD, then start the service?

Commands to run on certain actions

I'm in the middle of building a docker container framework that can be used to host "edge" cdn byond servers that send the user the resources and then send them on to the real server.

The last step would be some way to know when the server's rsc has changed and trigger a rebuild of the docker image (I'll have it grab the rsc via the smb share that already exists for the game folder, that part isn't hard)

So I was thinking, it would be handy to create events that ran things.

You could do this the user friendly way and make an interface for the different types of events (restart, round end, crash, update, compile, etc), or you can just push unique event ids in windows event viewer and i can just make scheduled tasks based off of them.

Just try to be as granular as sanely possible and very particular in your documentation about what events trigger when.

Service can only host one server instance

Theoretically it should be easy to host multiple instances by opening multiple WCF hosts. The main issue is EVERY file access relies on CWD, so, that'll have to stop

It's impossible to update the service without restarting the server

I have an idea for how this could be done. Instead of killing the DD process, we merely let it go and reattach to it on service startup.

  • Attachment can be done at any startup if there is a DD process running in the context of the service account
  • This does mean we will miss any relays sent to the service during the operation. Maybe require an ACK from the service for each?
  • Having this all be initiated by an installation is the problem we have a couple of options for notifying the server
  1. Call a function through the interface: Ideal, but may be too dependency heavy
  2. Write to a file the service looks out for: Too hacky imo
  3. Use a native service command: https://msdn.microsoft.com/en-us/library/system.serviceprocess.servicebase.oncustomcommand(v=vs.110).aspx
  4. Write an immutable base executable that loads a dll with the code and switch it out on updates: May be too complex

The hard part about any of the is getting our installer to dance to this tune

Discord Security Issue

We shouldn't be verifying users using the username on Discord as it can be changed. Use the user ID instead

discord bot triggered by its own name in its own messages if its nick had been changed

[2:52 PM] MrStonedOne: @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] MrStonedOne: @Cyberboss
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] MrStonedOne: fuck me
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:52 PM] BOTMrs_Sybil: Invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  invalid command:  @Mrs_Sybil check
[2:52 PM] BOTMrs_Sybil: Type '?' or 'help' for available commands.
[2:53 PM] MrStonedOne: @Mr_Bagil check
[2:53 PM] BOTMr_Bagil: 60 players on Box Station, Mode: secret; Round Active -- 45.58.127.134

Test merges are erroring.

Enter command: testmerge 28900
Error: System.ServiceModel.FaultException: The server was unable to process the request du
e to an internal error.  For more information about the error, either turn on IncludeExcep
tionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> config
uration behavior) on the server in order to send the exception information back to the cli
ent, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect
the server trace logs.

Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, Me
ssageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operat
ion, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, Prox
yOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage me
thodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMess
age retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32
type)
   at TGServiceInterface.ITGServerUpdater.UpdateServer(TGRepoUpdateMethod updateType, Bool
ean push_changelog_if_enabled, UInt16 testmerge_pr)
   at TGCommandLine.TestmergeCommand.Run(IList`1 parameters)
   at TGCommandLine.RootCommand.Run(IList`1 parameters)
   at TGCommandLine.Program.RunCommandLine(IList`1 argsAsList)

The server doesn't auto restart

Not sure if DD crashed or hung but this came up in logs: Failed to send topic: serviceCommsKey=;command=irc_check

Had to manually restart it

Push: tgstation-server pushed 0 commits to master

[02:31:14] <Mr_Bagil> REPO: Updating origin branch...(Hard Reset)
[02:31:20] <Mr_Bagil> REPO: Merging PR #30610...
[02:31:21] [tgstation] Push: tgstation-server pushed 0 commits to master

Did somebody forget to verify that commit didn't error out?

Update fails if the symlinks are missing

Not sure why but in my B folder (A was live) the symlinks were missing, I clicked Update and the compilation failed. I assume this is because it couldn't read 'blank.png' in the title_screens folder. Would be nice to check if it exists before running DM.exe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.