Writing commands to BungeeCord Process OutputStream does not appear to execute them - bungeecord

Here is the code I am using to read / write to a BungeeCord process. Only issue is it appears that writing commands to the output stream does not appear to work.
http://pastebin.com/JvsetSUq
I believe my code is working correctly for the following reasons:
I have checked that that the code that writes to the output stream is being reached with the correct command
This code works flawlessly using the Spigot server jar.

Fixed by disabling JLine in command arguments.

Related

Love2d console on PyCharm only writes to console after closing

I'm using PyCharm community edition to create a love2d application. I've created a hotkey that runs a .bat file to run it with lovec.exe which is opens the console as the app runs, then i've created an external tool to run the .batfile through a keyboard shortcut, when i use it, the console opens within PyCharm, which doesn't write anything, and after closing the app, everything that was meant to have been written appears, when i run the .bat file outside of PyCharm it functions perfectly.
I would like to know if there's either an obvious fix to that or, just how to run the console outside of pycharm through an external tool.
This issue is due to the way Lua delays writing files, known as "buffering." To change it, put the following command at the top of your file:
io.stdout:setvbuf( 'no' ) -- Switches buffering for stdout to be off
Read more in Lua's manual:
file:setvbuf (mode [, size])
Sets the buffering mode for an output file. There are three available modes:
"no": no buffering; the result of any output operation appears immediately.
"full": full buffering; output operation is performed only when the buffer is full or when you explicitly flush the file (see io.flush).
"line": line buffering; output is buffered until a newline is output or there is any input from some special files (such as a terminal device).
For the last two cases, size specifies the size of the buffer, in bytes. The default is an appropriate size.

Rails Runner hanging with specific job

I have a Rails project and I am trying to run a script using Rails runner. This script runs fine on my local machine, but I am trying to run it on a new EC2 instance that I just set up.
When I run the script, it exhibits some very odd behavior. The first line in the script is a debug statement "Starting". When I say "hang" I mean that "Starting" is never printed.
rails runner Script.run //hangs forever
It is worth mentioning that the purpose of this script is to make several HTTP requests. So, in debugging it, I commented out various lines until I had the maximal program that would actually run.
The only line I needed to comment out is the one that actually called Net::HTTP.request. Then, the script would run, and print all of the debug statements that it was supposed to, but it wouldn't actually function as intended (obviously).
What seems odd to me is that the script will not even print "Starting" when the line that makes the HTTP request is present. The error would make some sense if it got to the HTTP request itself and then hung forever, or at least got some part of the way into the program.
What can cause Rails to behave this way? Any suggestions are appreciated.
Thanks!
I actually made a dumb mistake, but I am going to answer my question for anyone who makes the same mistake in the future.
I forgot to add "$stdout.sync = true" to the config file, so Rails just appeared to be hanging because it was not writing to stdout. When the HTTP request was disabled, it ran fast enough so that I didn't notice the writing was delayed.

Ruby on Rails. Returning output of exe file to browser

First time using Ruby or Rails, so bear with me :) I am trying to output the results of an exe file to my browser, possibly with some processing before hand. I am using Open3
#stdout,#stderr,#status = Open3.capture3('c:\server.exe','')
This works, but the output only seems to return anything when the exe file has finished, eg if its closed manually, or if it returns an error.
What actually happens when I execute the file is a server runs and returns info to the console. I need this data in the console while its running, not after.
My question: How do I return, process, and display each line from the console in real time? Is that even possible?

"not enough storage is available to process this command" after using the start command in a batch file with windows 7

I am creating a batch file that needs to open a second batch script in a separate cmd window. I can use all my code successfully if I use the "call" command instead of "start" but that doesn't launch the script in its own window. I have gotten this error many times in the past and its always related to the start command. I change how I do the process and all works well. Why is the start command causing this error and how can I fix it? Below is a sample of my code.
start "" /w "k:\Bundle Support files\record serial.cmd"
The second batch file opens and completes all tasks except the last one which is
goto :exit
:exit
I have changed the last command in the file several times and it always makes it through the entire batch but the last command that would finish that batch fails with the "not enough storage is available to process this command" error. This happens on multiple machines (varying hardware) and multiple OS's. I have attempted the IRPStackSize fix with no luck. Any suggestions as to why I am getting this error?
Thanks,
Kevin
I have encountered a similar problem and the solution for me was rather strange. It appears that setting the title of the window to nothing ("") causes the error.
So, instead of
start "" /w "k:\Bundle Support files\record serial.cmd"
try
start "Placeholder Name" /w "k:\Bundle Support files\record serial.cmd"
I can't test whether this will work in your case (and I doubt it matters as you're long gone) but hopefully this will help someone experiencing any similar errors.
Replace goto :exit with goto :EOF. Do not define the EOF label (it is predefined).
That's what the START command does when you launch a cmd. If you ran START cmd you wouldn't expect CMD to exit immediately - it stays there ready for use. So you either CALL a cmd file and it will finish, or you START a cmd, and it will not finish - but you can make it finish by using the EXIT command. The issue of the stack overflow was also answered correctly by SEIPIA - instead of using start "" filename.cmd, put something between the quotes to act as the title - that will prevent the stack overflow error.

Using the spawn command inside of IDL

I'm very new to IDL (trying to do a POC for someone using it) and I am trying to run an external command. The line of code I have added is this:
spawn, 'C:\Program Files\ITT\IDL\IDL80\products\envi48\save_add\visual.exe'
I thought this was all that was needed to launch an external command. When I run the app, i can use the debugger to step through the code, and when I get to this line and Step over, my executable does not run. I see no messages in the debugger indicating any type of error.
I put the file visual.exe in the directory and can run it by hand with no issues. It just seems to step right over the code without executing it or reporting any error.
You can use the form:
spawn, cmd, result, errResult
to get the any error messages that might be generated from the cmd. In your particular case, I think you need to quote the path to the executable because of the space in the path.
Your usage of the spawn command is correct. Perhaps visual.exe is exiting prematurely
for some reason (for example, maybe the working directory when run via spawn isn't what
your external program is expecting.)
You might try writing a little script that starts visual.exe, then does a pause,
and then spawn the wrapper script instead of visual.exe directly. That might
give you a chance to see any error messages before the DOS window disappears.

Resources