Putty Server unexpectedly closed network connection

Hello, I have tried looking around on the web for answers and I am not a expert in any of this stuff but would like to know more.
Any-who, I have been having some issues with my server randomly stop functioning and I am trying to look for logs that can tell me what is going on.

My server does not have a monitor so I thought putty (which i know little about) would be a good way for my to connect visually to my server instead how having to unplug my keyboard and monitor from my main pc to check this stuff out.

I keep getting a error ever time I try to connect saying “Server unexpectedly closed network connection” and nothing appears in the box.

Does anyone know how to teach me the fix in layman’s terms?

also once on my server how do I find the logs I need to find out why my server is doing what it is doing, it ran for 40 hrs and 2 scheduled restarts with zero issues and some time lastnight it became unresponsive and booted me from the game and the webui.

The log for mineos.log itself:
/var/log/mineos.log

The log for your minecraft server:
/var/game/minecraft/servers/(servername)/logs/latest.log

hi the_scruffy_guy,

it’s me again. i can see you are well on your way in the adventure we have also been on. have fun!

about putty, i tried it a very long time ago and found the command line interface not much more helpful than the CLI that already comes with MineOS. there is even another GUI that has a CLI called Webmin that i found useful. it is still there but has now been disabled by default.

i digress. let me make a wild guess since you failed to provide the most basic of information. you tried to log in with putty as root. true or false?

root log in is still there but has also been disabled by default.

you can enable both webmin and root access via putty and SFTP with the CLI provided in MineOS by using a file editor called nano.and edit some config files. allow root login is found here /etc/ssh/sshd_config for example.

trust me when i say you do not need to do any of that to access your logs or “see” what is going on in your server.

i recommend d/l and install Filezilla to your pc, log in to your server via SFTP port 22 with the mc credentials you have installed, not as root. recall, Mine OS will not allow root log on by default but just in case it was enabled via nano, there is nothing you need to do as root.
this

and allow access to your log files found via the path provided by iMelsom above.

best regards,

tNt

EDIT: another guess on my part here but this; "some time lastnight it became unresponsive and booted me from the game and the webui.
" sounds like the server ip changed as happens sometimes to mine but usually not as it is being used.

since you have a ‘headless’ server, you can not ‘see’ what ip is issued to your server via MineOS or if it has changed.

you can try looking on you modem interface to see what ip have been issued and what ip your server is using.

i have solved these issues with my headless server by deploying vmware and vsphere then MineOS, no need for ubuntu or anything else. i find the versatility satisfying but keep in mind support can not be found at this fourum as the topic here is MineOS.

whatever you do, good luck!

1 Like

LOL wow! Well I didn’t realized I needed to use port 22 I was using 25565. It works lol Thank You!

1 Like

When I try to look at the mineos.log I get “-bash: /var/log/mineos.log: Permission denied”
I tried in root and mc.

ROTF!

ok, again just guessing here (note that my root log in guess was wrong, it was the wrong port). i am guessing you did not enable root log in at /etc/ssh/sshd_config?

if not, you can not use root with putty. but you should be able to ‘view’ the file as mc so i’m not sure the real issue here.

again, i would try to utilize nano as root from the MineOS command line console to view and/or edit files such as iptables to open other ports as required etc., and all of which would be easily viewable with filezilla (free) and editable with root enabled.

disclaimer: be very wise how root is used. it is very easy to brick your mc server (not the main server). easy to start over too thanks to the utilities povided by MineOS, lol.

keep trying!

tNt

Using the shell, SSH and putty, from the MineOS wiki: https://minecraft.codeemo.com/mineoswiki/index.php?title=PuTTY

PuTTY user guide: https://the.earth.li/~sgtatham/putty/0.58/htmldoc/

You use PuTTY (or an equvivalent SSH client) to connect to your servers console through the network to be able to run commands.

You use Filezilla or an equvivalent FTP client supporting secure FTP) to connect to your servers file system to transfer files.

To run commands needing elevated privileges (things needing root) you use SUDO (SuperUser DO) to run one command, or SU to connect to the root user from a normal user (if this is activated). You can also run “sudo -s” to elevate your current session to root, if root access is not activated. Root accsess is deactivated by default, since using it is a shortcut to doing irreparable damage to your system, and your minecraft servers behaves in a really weird way if you use root to manage them. The only thing you really need root for is updating MineOS or the system OS itself.

To read the logs log into the system with putty, using the default “mc” user. then run the following command:

sudo nano /var/log/mineos.log

(to exit press ctrl-x)

OR 

sudo vi /var/log/mineos.log

vi and nano are two text editors in your files system.
(vi : https://www.cs.colostate.edu/helpdocs/vi.html, I do not really know vi, I always used nano)

@tNt: Using the console is really just usable if you can run driectly on the physical machine, or through the Virtual Machine session. If I understand @the_scruffy_guy correct, that installation MineOS installed through a VM, and do not have a monitor, keyboard or mouse connected. This makes a direct connection to the console impratctical. PuTTY is therefore a better choice. Another reason for using putty is that it supports hilighting text and pasting it back by rightclicking.

no it is ran as the only OS on a physical PC that sits next to my Gaming PC, not a VM. You are correct on the no monitor, keyboard and mouse thing thought. (not enough to go around) Also I am in the log files and not sure what I am looking for so the next time it happens I will hopefully be able to find it quickly.

I will post more info as I get it.