SRL Archive - S.M.A.R.T.

SMART - Session has ended issues


HKbotz

2014-11-07 20:54:28

Sometimes when I try to log back into RS after my script has finished, and it has booted me to lobby or logged me all the way out, it says session has ended. I know that after 6 hours this will happen, but it randomly does it WAY before 6 hours. For example I had left a script running for about 30 minutes, and when I came back I was in lobby, so I tried to log back in and it had ended, meaning I had to reload client. It's not a huge deal, but if I'm working on a script and I don't pay attention and get booted to lobby it's really annoying to have to reload it all the time.
I've also seen this happen if my internet connection drops, no matter how long it's been open. I can load it, disconnect and reconnect to my network and will have to reload no matter what.

I can't figure out any pattern to it other than the connection dropping, but that usually isn't the case. Sometimes It'll go for the full 6 hours like it's suppose to, and other times it goes for 15 minutes and makes me reload. I assume it's SMART since this never happens if I use the actual RS client, it only happens with the SMART client. I only bot RS3 so I have no idea if this occurs with OSRS or not.

Sorry if this issue has been addressed already. Any help would be appreciated.

riwu

2014-11-07 21:07:44

the SRL include has fix for that, it will automatically detect the session ended message when trying to log in and restart SMART. Just make sure u dont have infinite loop and call .login()

Justin

2014-11-07 21:17:37

"I can't figure out any pattern to it other than the connection dropping,"

There is the issue. Game sessions are set to a IP-based connection. I'm assuming your IP changes when you are disconnected. Try going to www.whatismyip.com and noting down the IP address, then next time you get Session Expired, check the site again and compare the IPs.

E: I've just checked your Forum IP, you're connecting from a dedicated server (from the post), are you VPNing to the server and then the VPN connection is dropped therefore making your home IP connecting to RS? Or are you doing this all from the server?

HKbotz

2014-11-07 21:28:29

the SRL include has fix for that, it will automatically detect the session ended message when trying to log in and restart SMART. Just make sure u dont have infinite loop and call .login()

I will try that if nothing else works, but restarting SMART from SRL takes a bit I've noticed and if I'm actively doing something it's faster to just restart SMART myself.

There is the issue. Game sessions are set to a IP-based connection. I'm assuming your IP changes when you are disconnected. Try going to whatismyip.com and noting down the IP address, then next time you get Session Expired, check the site again and compare the IPs.

E: I've just checked your Forum IP, you're connecting from a dedicated server (from the post), are you VPNing to the server and then the VPN connection is dropped therefore making your home IP connecting to RS? Or are you doing this all from the server?


I'm currently using a VPN on my home machine, but it's connected almost 24/7. I've also had this happen without being connected to my VPN, and the last few times it's happened neither my VPN connection or my home network connection dropped. I will try checking my IP for future reference and comparing them though.

Justin

2014-11-07 21:44:58

From: HKbotz
I will try that if nothing else works, but restarting SMART from SRL takes a bit I've noticed and if I'm actively doing something it's faster to just restart SMART myself.



I'm currently using a VPN on my home machine, but it's connected almost 24/7. I've also had this happen without being connected to my VPN, and the last few times it's happened neither my VPN connection or my home network connection dropped. I will try checking my IP for future reference and comparing them though.


Check your MTU settings, I know I've had some problems with it when I VPN from Work -> Dedicated Server, what type of VPN protocol are you using?

riwu

2014-11-07 21:53:31

From: HKbotz
I will try that if nothing else works, but restarting SMART from SRL takes a bit I've noticed and if I'm actively doing something it's faster to just restart SMART myself.

It should be the same. In the end, u are just calling the same method SmartSpawnClient()

Justin

2014-11-07 22:01:34

From: riwu
It should be the same. In the end, u are just calling the same method SmartSpawnClient()



If you let SRL handle the reload it will wait for ~5 minutes before loading the client


smartReloadClient((5 * 60000) + random(15000));

procedure smartReloadClient(waitTime: integer);
print('Killed our current client, waiting ' + intToStr(waitTime) + ' ms before reloading client');

HKbotz

2014-11-07 22:27:44

From: Justin
Check your MTU settings, I know I've had some problems with it when I VPN from Work -> Dedicated Server, what type of VPN protocol are you using?

Not sure if this is relevant, but I am on a Linux box and running Win7 in a virtual machine, the host is connected to VPN, so both host and VM are sharing the same connection which is using a VPN.
My MTU settings are set to automatic in Network Manager(Ubuntu). It just happened again. I have two SMART clients open, both were in lobby, and neither have been open for anywhere close to 6 hours(1-2 tops). One logged back in, other had session ended. I checked IP, it was the same as before.
I'm using OpenVPN through Ubuntu's network manager.

riwu

2014-11-07 22:31:54

From: Justin
If you let SRL handle the reload it will wait for ~5 minutes before loading the client


smartReloadClient((5 * 60000) + random(15000));

procedure smartReloadClient(waitTime: integer);
print('Killed our current client, waiting ' + intToStr(waitTime) + ' ms before reloading client');

Ah i see. I used the glx include and i don't wait 5min unless rs has updated is detected.

HKbotz

2014-11-07 23:30:49

One other thing I forgot to mention is it sometimes does it if I try to switch accounts. I can be logged into an account, log out, and try to log into a different one and I get the session ended message, even if 6 hours hasn't been up and my connection hasn't dropped.