Closed Assambra closed 1 year ago
@Assambra, I guess your both plugins are the same package name.
When you run ezyfox server, it will print logs like this one:
{
"settings": {
"nodeName": "ezyfox",
"udp": {
"channelPoolSize": 16,
"address": "0.0.0.0",
"maxRequestSize": 1024,
"port": 2611,
"active": true,
"handlerThreadPoolSize": 5
},
"debug": true,
"maxSessions": 999999,
"sessionManagement": {
"sessionMaxRequestPerSecond": {
"action": "DROP_REQUEST",
"value": 15
},
"sessionMaxIdleTime": 15000,
"sessionMaxWaitingTimeInSecond": 15,
"sessionMaxIdleTimeInSecond": 15,
"sessionMaxWaitingTime": 15000
},
"logger": {
"ignoredCommands": "[PONG, PING]"
},
"zones": {
"size": 1,
"zones": [{
"maxUsers": 999999,
"userManagement": {
"allowGuestLogin": false,
"userMaxIdleTime": 0,
"allowChangeSession": true,
"guestNamePrefix": "Guest#",
"maxSessionPerUser": 5,
"userMaxIdleTimeInSecond": 0,
"userNamePattern": "^[a-zA-Z0-9_.#]{3,64}$"
},
"streaming": {
"enable": false
},
"plugins": {
"size": 1,
"plugins": [{
"listenEvents": "[USER_LOGIN]",
"folder": "hello-world",
"threadPoolSize": 0,
"configFile": "",
"name": "hello-world",
"activeProfiles": null,
"entryLoader": "com.example.hello_world.startup.HelloWorldStartup$DecoratedPluginEntryLoader",
"id": 1,
"packageName": null,
"priority": 0
}]
},
"configFile": "",
"name": "example",
"id": 1,
"eventControllers": {
"eventControllers": []
},
"applications": {
"size": 1,
"apps": [{
"maxUsers": 999999,
"folder": "hello-world",
"threadPoolSize": 0,
"configFile": "",
"name": "hello-world",
"activeProfiles": null,
"entryLoader": "com.example.hello_world.startup.HelloWorldStartup$DecoratedAppEntryLoader",
"id": 1,
"packageName": null
}]
}
}]
},
"eventControllers": {
"eventControllers": [{
"controller": "com.example.hello_world.startup.ServerInitializingController",
"eventType": "SERVER_INITIALIZING"
}, {
"controller": "com.example.hello_world.startup.ClientHandshakeController",
"eventType": "CLIENT_HANDSHAKE"
}]
},
"streaming": {
"enable": false
},
"threadPoolSize": {
"extensionRequestHandler": 8,
"socketUserRemovalHandler": 3,
"streamHandler": 8,
"socketDisconnectionHandler": 2,
"socketDataReceiver": 1,
"statistics": 1,
"systemRequestHandler": 8
},
"websocket": {
"codecCreator": "com.tvd12.ezyfox.codec.JacksonCodecCreator",
"address": "0.0.0.0",
"sslConfig": {
"file": "ssl-config.properties",
"loader": "com.tvd12.ezyfoxserver.ssl.EzySimpleSslConfigLoader",
"contextFactoryBuilder": "com.tvd12.ezyfoxserver.ssl.EzySimpleSslContextFactoryBuilder"
},
"port": 2208,
"sslActive": false,
"active": true,
"sslPort": 2812,
"maxFrameSize": 2048,
"managementEnable": false,
"writerThreadPoolSize": 8
},
"socket": {
"codecCreator": "com.tvd12.ezyfox.codec.MsgPackCodecCreator",
"address": "0.0.0.0",
"maxRequestSize": 512,
"sslConnectionAcceptorThreadPoolSize": 8,
"port": 3005,
"sslType": "CERTIFICATION",
"sslHandshakeTimeout": 350,
"sslActive": true,
"active": true,
"connectionAcceptorThreadPoolSize": 1,
"tcpNoDelay": false,
"writerThreadPoolSize": 8
},
"admins": {
"count": 0,
"admins": []
}
},
"version": "1.0.0",
"config": {
"loggerConfigFile": "default",
"enableAppClassLoader": false,
"ezyfoxHome": ""
}
}
Could you give me your logs?
@Assambra I see the both plugin free-game-server
and free-account-server-plugin
are using the same "entryLoader": "com.assambra.plugin.PluginEntryLoader",
I think it's the issue, could you check it?
<applications>
<application>
<name>free-account-server</name>
<folder>free-account-server-app-entry</folder>
<entry-loader>com.assambra.app.AppEntryLoader</entry-loader>
<config-file>config/config.properties</config-file>
</application>
</applications>
<applications>
<application>
<name>free-game-server</name>
<folder>free-game-server-app-entry</folder>
<entry-loader>com.assambra.app.AppEntryLoader</entry-loader>
<config-file>config/config.properties</config-file>
</application>
</applications>
<plugins>
<plugin>
<name>free-game-server</name>
<folder>free-game-server-plugin</folder>
<priority>-1</priority>
<entry-loader>com.assambra.plugin.PluginEntryLoader</entry-loader>
<config-file>config/config.properties</config-file>
<listen-events>
<event>USER_LOGIN</event>
<event>USER_ADDED</event>
<event>USER_REMOVED</event>
</listen-events>
</plugin>
</plugins>`
<plugins>
<plugin>
<name>free-account-server</name>
<folder>free-account-server-plugin</folder>
<priority>-1</priority>
<entry-loader>com.assambra.plugin.PluginEntryLoader</entry-loader>
<config-file>config/config.properties</config-file>
<listen-events>
<event>USER_LOGIN</event>
<event>USER_ADDED</event>
<event>USER_REMOVED</event>
</listen-events>
</plugin>
</plugins>
@Assambra you need to use difference entry-loader
for plugins and apps, example:
<applications>
<application>
<name>free-account-server</name>
<folder>free-account-server-app-entry</folder>
<entry-loader>com.assambra.free_account.app.AppEntryLoader</entry-loader>
<config-file>config/config.properties</config-file>
</application>
</applications>
<applications>
<application>
<name>free-game-server</name>
<folder>free-game-server-app-entry</folder>
<entry-loader>com.assambra.free_game.app.AppEntryLoader</entry-loader>
<config-file>config/config.properties</config-file>
</application>
</applications>
<plugins>
<plugin>
<name>free-game-server</name>
<folder>free-game-server-plugin</folder>
<priority>-1</priority>
<entry-loader>com.assambra.free_game.plugin.PluginEntryLoader</entry-loader>
<config-file>config/config.properties</config-file>
<listen-events>
<event>USER_LOGIN</event>
<event>USER_ADDED</event>
<event>USER_REMOVED</event>
</listen-events>
</plugin>
</plugins>`
<plugins>
<plugin>
<name>free-account-server</name>
<folder>free-account-server-plugin</folder>
<priority>-1</priority>
<entry-loader>com.assambra.free_account.plugin.PluginEntryLoader</entry-loader>
<config-file>config/config.properties</config-file>
<listen-events>
<event>USER_LOGIN</event>
<event>USER_ADDED</event>
<event>USER_REMOVED</event>
</listen-events>
</plugin>
</plugins>
Thank you i will try it this way
Is there some additional steps or do i need do some refactoring/renaming now i get class not found exception see log file: ezyfox-server.log
Ok it works as it should now i've done a lot of renaming packages and look for the correcting strings, but i think if i missed some it gives later on problems. So i copy my code later into two new projects with different packages names to be sure following problems didn't come from i missed something.
Thanks again
So, can I close this issue?
Yes, thank you
Describe the bug I have two Seperate Apps one for Account related things and one for Game related things. The works perfect from the IDE but not both at the same time because they use the same port. So i deploy the server created two Zones:
The client send login request to the free-game-server with the correct Zone/App to the Game Server but the ezyfox server internal routes to the false free-account-server login plugin on the other Zone/App.
To Reproduce if you want see the behaviour:
Expected behavior if the client send login with Zone/App it should lead on the Server to the right App/Zone
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context