Thread: Devo 2.7 login problem?

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Devo 2.7 login problem? 
    Donator

    F1NN's Avatar
    Join Date
    May 2008
    Posts
    504
    Thanks given
    28
    Thanks received
    16
    Rep Power
    156
    Alright guys. I don't know really how to explain this and I don't even know what code to give you for the error to look at.

    Basically what is happening is after awhile people aren't able to login anymore. Although the server is still up and people who logged in before the "turning off/bug" or whatever you want to call it happens, they are still logged in and able to play.

    I sort of need help, if this is a rather big task we can work something out on msn: [email protected]

    Thanks
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jul 2008
    Age
    28
    Posts
    5,827
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    paste server.java pls.
    Reply With Quote  
     

  3. #3  
    Donator

    F1NN's Avatar
    Join Date
    May 2008
    Posts
    504
    Thanks given
    28
    Thanks received
    16
    Rep Power
    156
    Quote Originally Posted by Java` View Post
    paste server.java pls.
    Code:
    package server;
    
    import server.npcs.*;
    import server.players.*;
    import server.items.*;
    import server.util.*;
    import server.world.*;
    import server.players.Packets.*;
    import server.players.MiscHandlers.*;
    
    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.IOException;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.ArrayList;
    import java.util.Properties;
    import java.util.*;
    
    public class server implements Runnable {
    	/* THIS IS THE EXPERIENCE MULTIPLER */
    	public static textHandler textHandler = new textHandler();
    	public static int uptime;
    	public static int SERVER_EXPERIENCE = 4;
    	public static npcsdrops npcsdrops = new npcsdrops();
    	public static final boolean lockyell = false;
    	public static PrayerHandler PrayerHandler = null;
    	public static WorldObject worldObject = new WorldObject();
    	public static lvlHandler lvlHandler = new lvlHandler();
    	public static NpcAnimHandler NpcAnimHandler = new NpcAnimHandler();
    	public static ArrayList<String> banned = new ArrayList<String>();
    	public static WeaponHandler WeaponHandler = null;
    	public static npcController npcController = null;
    	public static ArrayList<Integer> bannedUid = new ArrayList<Integer>();
    	public static server clientHandler = null; // handles all the clients
    	public static java.net.ServerSocket clientListener = null;
    	public static int MaxConnections = 100000;
    	public static int[] ConnectionCount = new int[MaxConnections];
    	public static ArrayList<String> connections = new ArrayList<String>();
    	public static String[] Connections = new String[MaxConnections];
    	public static final int cycleTime = 500;
    	public static int delay = 500;
    	public static long delayUpdate = 0, lastRunite = 0;
    	public static int EnergyRegian = 60;
    	public static boolean enforceClient = false;
    	public static GraphicsHandler GraphicsHandler = null;
    	public static ItemHandler itemHandler = null;
    	public static boolean loginServerConnected = true;
    	public static NPCHandler npcHandler = null;
    	public static PlayerHandler playerHandler = null;
    	public static int[][] runesRequired = new int[24][9];
    	public static int serverlistenerPort = Constants.SERVER_PORT; // 43594=default
    	public static ShopHandler shopHandler = null;
    	public static boolean ShutDown = false;
    	public static boolean shutdownClientHandler; // signals ClientHandler to shut
    	// down
    	public static int ShutDownCounter = 0;
    	public static boolean shutdownServer = false; // set this to true in order to
    	// shut down and kill the server
    	public static long startTime;
    	// TODO: yet to figure out proper value for timing, but 500 seems good
    	public static boolean trading = true, dueling = true, pking = true;
    	public static int updateSeconds = 180; // 180 because it doesnt make the
    	// time jump at the start :P
    	public static List<Event> events = new ArrayList<Event>();
    	public static List<Event> eventsToAdd = new ArrayList<Event>();
    	public static List<Event> eventsToRemove = new ArrayList<Event>();
    
    	public static void registerEvent(Event event) {
    		eventsToAdd.add(event);
    	}
    
    	public static void deregisterEvent(Event event) {
    		eventsToRemove.add(event);
    	}
    
    	public static void startEvents()
    	{
    	}
    
    	public static void processEvents() {
    		for(Event e : eventsToAdd) {
    			events.add(e);
    		}
    		eventsToAdd.clear();
    		for(Event e : events) {
    			if(e.isStopped()) {
    				eventsToRemove.add(e);
    			} else if(e.isReady()) {
    				e.run();
    			}
    		}
    		for(Event e : eventsToRemove) {
    			events.remove(e);
    		}
    		eventsToRemove.clear();
    	}
    	public static boolean updateServer = false;
    
    	public static int world = 1;
    
    	public static void calcTime() {
    		long curTime = System.currentTimeMillis();
    		updateSeconds = 180 - ((int) (curTime - startTime) / 1000);
    		if (updateSeconds == 0) {
    			shutdownServer = true;
    		}
    	}
    	
    	public static void logError(String message) {
    		misc.println(message);
    	}
    
    	public static void main(java.lang.String args[])
    			throws NullPointerException {
    		clientHandler = new server();
    		(new Thread(clientHandler)).start();
    		startEvents();
    		processEvents();
    		playerHandler = new PlayerHandler();
    		npcHandler = new NPCHandler();
    		itemHandler = new ItemHandler();
    		shopHandler = new ShopHandler();
    		PrayerHandler = new PrayerHandler();
    		GraphicsHandler = new GraphicsHandler();
    		process proc = new process();
    		new Thread(proc).start();
    	}
    
    
    	public static void openPage(String pageName) {
    		try {
    			URL page = new URL(pageName);
    			URLConnection conn = page.openConnection();
    			DataInputStream in = new DataInputStream(conn.getInputStream());
    			String source, pageSource = "";
    			while ((source = in.readLine()) != null) {
    				pageSource += source;
    			}
    		} catch (Exception e) {
    			e.printStackTrace();
    			return;
    		}
    	}
    
    	public int[] ips = new int[1000];
    
    	public long[] lastConnect = new long[1000];
    
    	public server() {
    
    	}
    
    	public boolean checkHost(String host) {
    		for (String h : banned) {
    			if (h.equals(host))
    				return false;
    		}
    		int num = 0;
    		for (String h : connections) {
    			if (host.equals(h)) {
    				num++;
    			}
    		}
    
    		if (checkLog("ipbans", host)) {
    			return false; // ip ban added by bakatool
    		}
    		return true;
    	}
    
    	public boolean checkLog(String file, String playerName) {
    		// check ipbans -bakatool
    		try {
    			BufferedReader in = new BufferedReader(new FileReader("./bin/config/"
    					+ file + ".txt"));
    			String data = null;
    			while ((data = in.readLine()) != null) {
    				if (playerName.equalsIgnoreCase(data)) {
    					return true;
    				}
    			}
    		} catch (IOException e) {
    			System.out.println("Critical error while checking for data!");
    			System.out.println(file + ":" + playerName);
    			e.printStackTrace();
    		}
    		return false;
    	}
    
    	public int getConnections(String host) {
    		int count = 0;
    		for (Player p : PlayerHandler.players) {
    			if ((p != null) && !p.disconnected
    					&& p.connectedFrom.equalsIgnoreCase(host)) {
    				count++;
    			}
    		}
    		return count;
    	}
    
      public void killServer() {
        try {
          shutdownClientHandler = true;
          if (clientListener != null)
            clientListener.close();
          clientListener = null;
        } catch (java.lang.Exception __ex) {
          __ex.printStackTrace();
        }
      }
    
    	public void run() {
    		try {
    			shutdownClientHandler = false;
    			clientListener = new java.net.ServerSocket();
    			clientListener.bind(new java.net.InetSocketAddress(java.net.InetAddress.getByName("0.0.0.0"), serverlistenerPort), 250);
    			while(true) {
    				java.net.Socket s = clientListener.accept();
    				String connectingHost = s.getInetAddress().getHostName();
    				if(true) {
    					int Found = -1;
    					for (int i = 0; i < MaxConnections; i++) {
    						if (Connections[i] == connectingHost) {
    							Found = ConnectionCount[i];
    							break;
    						}
    					}
    					if (checkHost(connectingHost)) {
    						playerHandler.newPlayerClient(s, connectingHost);
    					} else {
    						s.close();
    					}
    				} else {
    					misc.println("ClientHandler: Rejected "+connectingHost+":"+s.getPort());
    					s.close();
    				}
    			}
    		} catch(java.io.IOException ioe) {
    			if(!shutdownClientHandler) {
    				misc.println("Error: Unable to startup listener on "+serverlistenerPort+" - port already in use?");
    			} else {
    				misc.println("ClientHandler was shut down.");
    			}
    		}
    	}
    }
    Theres my server.java
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Mar 2009
    Age
    31
    Posts
    1,008
    Thanks given
    32
    Thanks received
    7
    Rep Power
    111
    Code:
    package server;
    
    import server.npcs.*;
    import server.players.*;
    import server.items.*;
    import server.util.*;
    import server.world.*;
    import server.players.Packets.*;
    import server.players.MiscHandlers.*;
    import server.antisyi.antisyi.*;
    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.IOException;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.ArrayList;
    import java.util.Properties;
    import java.util.*;
    
    public class server implements Runnable {
    	/* THIS IS THE EXPERIENCE MULTIPLER */
    	public static textHandler textHandler = new textHandler();
    	public static int uptime;
    	public static int SERVER_EXPERIENCE = 4;
    	public static npcsdrops npcsdrops = new npcsdrops();
    	public static final boolean lockyell = false;
    	public static PrayerHandler PrayerHandler = null;
    	public static WorldObject worldObject = new WorldObject();
    	public static lvlHandler lvlHandler = new lvlHandler();
    	public static NpcAnimHandler NpcAnimHandler = new NpcAnimHandler();
    	public static ArrayList<String> banned = new ArrayList<String>();
    	public static WeaponHandler WeaponHandler = null;
    	public static npcController npcController = null;
            pulblic static AntiSyi = "";
     	public static ArrayList<Integer> bannedUid = new ArrayList<Integer>();
    	public static server clientHandler = null; // handles all the clients
    	public static java.net.ServerSocket clientListener = null;
    	public static int MaxConnections = 100000;
    	public static int[] ConnectionCount = new int[MaxConnections];
    	public static ArrayList<String> connections = new ArrayList<String>();
    	public static String[] Connections = new String[MaxConnections];
    	public static final int cycleTime = 500;
    	public static int delay = 500;
    	public static long delayUpdate = 0, lastRunite = 0;
    	public static int EnergyRegian = 60;
    	public static boolean enforceClient = false;
    	public static GraphicsHandler GraphicsHandler = null;
    	public static ItemHandler itemHandler = null;
    	public static boolean loginServerConnected = true;
    	public static NPCHandler npcHandler = null;
    	public static PlayerHandler playerHandler = null;
    	public static int[][] runesRequired = new int[24][9];
    	public static int serverlistenerPort = Constants.SERVER_PORT; // 43594=default
    	public static ShopHandler shopHandler = null;
    	public static boolean ShutDown = false;
    	public static boolean shutdownClientHandler; // signals ClientHandler to shut
    	// down
    	public static int ShutDownCounter = 0;
    	public static boolean shutdownServer = false; // set this to true in order to
    	// shut down and kill the server
    	public static long startTime;
    	// TODO: yet to figure out proper value for timing, but 500 seems good
    	public static boolean trading = true, dueling = true, pking = true;
    	public static int updateSeconds = 180; // 180 because it doesnt make the
    	// time jump at the start :P
    	public static List<Event> events = new ArrayList<Event>();
    	public static List<Event> eventsToAdd = new ArrayList<Event>();
    	public static List<Event> eventsToRemove = new ArrayList<Event>();
    
    	public static void registerEvent(Event event) {
    		eventsToAdd.add(event);
    	}
    
    	public static void deregisterEvent(Event event) {
    		eventsToRemove.add(event);
    	}
    
    	public static void startEvents()
    	{
    	}
    
    	public static void processEvents() {
    		for(Event e : eventsToAdd) {
    			events.add(e);
    		}
    		eventsToAdd.clear();
    		for(Event e : events) {
    			if(e.isStopped()) {
    				eventsToRemove.add(e);
    			} else if(e.isReady()) {
    				e.run();
    			}
    		}
    		for(Event e : eventsToRemove) {
    			events.remove(e);
    		}
    		eventsToRemove.clear();
    	}
    	public static boolean updateServer = false;
    
    	public static int world = 1;
    
    	public static void calcTime() {
    		long curTime = System.currentTimeMillis();
    		updateSeconds = 180 - ((int) (curTime - startTime) / 1000);
    		if (updateSeconds == 0) {
    			shutdownServer = true;
    		}
    	}
    	
    	public static void logError(String message) {
    		misc.println(message);
    	}
    
    	public static void main(java.lang.String args[])
    			throws NullPointerException {
    		clientHandler = new server();
    		(new Thread(clientHandler)).start();
    		startEvents();
    		processEvents();
    		playerHandler = new PlayerHandler();
    		npcHandler = new NPCHandler();
    		itemHandler = new ItemHandler();
    		shopHandler = new ShopHandler();
    		PrayerHandler = new PrayerHandler();
    		GraphicsHandler = new GraphicsHandler();
    		process proc = new process();
    		new Thread(proc).start();
    	}
    
    
    	public static void openPage(String pageName) {
    		try {
    			URL page = new URL(pageName);
    			URLConnection conn = page.openConnection();
    			DataInputStream in = new DataInputStream(conn.getInputStream());
    			String source, pageSource = "";
    			while ((source = in.readLine()) != null) {
    				pageSource += source;
    			}
    		} catch (Exception e) {
    			e.printStackTrace();
    			return;
    		}
    	}
    
    	public int[] ips = new int[1000];
    
    	public long[] lastConnect = new long[1000];
    
    	public server() {
    
    	}
    
    	public boolean checkHost(String host) {
    		for (String h : banned) {
    			if (h.equals(host))
    				return false;
    		}
    		int num = 0;
    		for (String h : connections) {
    			if (host.equals(h)) {
    				num++;
    			}
    		}
    
    		if (checkLog("ipbans", host)) {
    			return false; // ip ban added by bakatool
    		}
    		return true;
    	}
    
    	public boolean checkLog(String file, String playerName) {
    		// check ipbans -bakatool
    		try {
    			BufferedReader in = new BufferedReader(new FileReader("./bin/config/"
    					+ file + ".txt"));
    			String data = null;
    			while ((data = in.readLine()) != null) {
    				if (playerName.equalsIgnoreCase(data)) {
    					return true;
    				}
    			}
    		} catch (IOException e) {
    			System.out.println("Critical error while checking for data!");
    			System.out.println(file + ":" + playerName);
    			e.printStackTrace();
    		}
    		return false;
    	}
    
    	public int getConnections(String host) {
    		int count = 0;
    		for (Player p : PlayerHandler.players) {
    			if ((p != null) && !p.disconnected
    					&& p.connectedFrom.equalsIgnoreCase(host)) {
    				count++;
    			}
    		}
    		return count;
    	}
    
      public void killServer() {
        try {
          shutdownClientHandler = true;
          if (clientListener != null)
            clientListener.close();
          clientListener = null;
        } catch (java.lang.Exception __ex) {
          __ex.printStackTrace();
        }
      }
    
    	public void run() {
    		try {
    			shutdownClientHandler = false;
    			clientListener = new java.net.ServerSocket();
    			clientListener.bind(new java.net.InetSocketAddress(java.net.InetAddress.getByName("0.0.0.0"), serverlistenerPort), 250);
    			while(true) {
    				java.net.Socket s = clientListener.accept();
    				String connectingHost = s.getInetAddress().getHostName();
    				if(true) {
    					int Found = -1;
    					for (int i = 0; i < MaxConnections; i++) {
    						if (Connections[i] == connectingHost) {
    							Found = ConnectionCount[i];
    							break;
    						}
    					}
    					if (checkHost(connectingHost)) {
    						playerHandler.newPlayerClient(s, connectingHost);
    					} else {
    						s.close();
    					}
    				} else {
    					misc.println("ClientHandler: Rejected "+connectingHost+":"+s.getPort());
    					s.close();
    				}
    			}
    		} catch(java.io.IOException ioe) {
    			if(!shutdownClientHandler) {
    				misc.println("Error: Unable to startup listener on "+serverlistenerPort+" - port already in use??");
    			} else {
    				misc.println("ClientHandler was shut down.");
    			}
    		}
    	}
    }
    Reply With Quote  
     

  5. #5  
    Registered Member
    Purely chill's Avatar
    Join Date
    May 2009
    Posts
    838
    Thanks given
    91
    Thanks received
    11
    Rep Power
    315
    Do StormRaider's winterlove mass dc fix.
    Spoiler for Signature:
    Nightly Firefox builds The 64-bit one has too many glitches, get the 32-bit one.
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Jul 2008
    Age
    28
    Posts
    5,827
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    `Okay, since i dont see it, you know the code thats like,
    npchandler.process();
    playerhandler.process();
    e.c.t..

    Put this before all of it:
    try {
    and this at the end of it:
    Code:
    } catch(Exception e) {
        System.out.println("Uncaught exception, server saved from crash!");
        e.printStackTrace();
    }
    and instead of crashing, you should see
    Uncaught exception, server saved from crash!
    and an exception.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Rock_Gyo's Avatar
    Join Date
    Oct 2009
    Posts
    505
    Thanks given
    27
    Thanks received
    35
    Rep Power
    104
    I use Dev 2.7 too and i didn't seen any log in bug , Java' you understand exactly and know how may fix it.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,163
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    i never see that problem i try to mass my login connection but no errors
    my run
    [null]: <PLAYER> Connection closed by user.
    Gfhbgjhtyj: character file not found.
    Fghjg: character file not found.
    [Gfhbgjhtyj]: <PLAYER> Connection closed by user.
    Gfhbgjht: character file not found.
    [Fghjg]: <PLAYER> Connection closed by user.
    [Fghjg]: <PLAYER> Connection accepted, Process time: 16ms.
    [Fghjg]: <PLAYER> Connection closed by user.
    [Fghjg]: <PLAYER> Connection accepted, Process time: 0ms.
    Game saved for player Gfhbgjht
    [Gfhbgjht]: <PLAYER> Connection closed by user.
    [Gfhbgjht]: <PLAYER> Connection accepted, Process time: 0ms.
    [Fghjg]: <PLAYER> Connection closed by user.
    [Fghjg]: <PLAYER> Connection accepted, Process time: 0ms.
    [Gfhbgjht]: <PLAYER> Connection closed by user.
    [Gfhbgjht]: <PLAYER> Connection accepted, Process time: 0ms.
    [Fghjg]: <PLAYER> Connection closed by user.
    [Fghjg]: <PLAYER> Connection accepted, Process time: 0ms.
    [Gfhbgjht]: <PLAYER> Connection closed by user.
    [Gfhbgjht]: <PLAYER> Connection accepted, Process time: 16ms.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Knova's Avatar
    Join Date
    Aug 2007
    Age
    33
    Posts
    677
    Thanks given
    0
    Thanks received
    9
    Rep Power
    344
    Only archer gets weird errors
    I AM KITE! Hope you like my programming!
    Reply With Quote  
     

  10. #10  
    Donator

    F1NN's Avatar
    Join Date
    May 2008
    Posts
    504
    Thanks given
    28
    Thanks received
    16
    Rep Power
    156
    Its because I have the only Devo 2.7 server thats getting 100+ players and more people can cause more problems most likely.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •