macOS Big Sur issues

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

bibbinator
Posts: 10
Joined: 03 Jul 2020, 20:02

macOS Big Sur issues

Postby bibbinator » 23 Mar 2021, 20:55

On a fresh boot SFS (latest 2.17) starts up and I can access as normal using localhost admin panel. If I restart the server or just quit and try to start it again, it fails most of the time. Below is the session and after it's "ready" I try to login with admin panel and I get an error box in the web page of "A disconnection occurred due to unknown reason; please reconnect."

Here is the session log with the error starting at "21:48:40,468 WARN [http-nio-8080-exec-1] websocket.SFS2XWSService - Upgradre request data not found for: [0:0:0:0:0:0:0:1]:49490"

Any ideas?

Code: Select all

21:48:22,717 INFO  [main] v2.SmartFoxServer     - Boot sequence starts...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/Applications/SmartFoxServer_2X/SFS2X/lib/xstream-1.3.1.jar) to field java.util.Properties.defaults
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
21:48:23,322 INFO  [main] core.SFSEventManager     - SFSEventManager initialized
21:48:23,361 INFO  [main] impl.DefaultFileReplicator     - Using "/var/folders/73/jjnmrrrd5x37q4nkd863mq7h0000gp/T/vfs_cache" as temporary files store.
21:48:23,477 INFO  [main] v2.SmartFoxServer     - License loaded:

==========================================
LICENSE DETAILS
------------------------------------------
Type            : Community Edition
Max users       : 100
==========================================

21:48:23,479 INFO  [main] managers.SFSBannedUserStorage     - BanUserStorage initialized
21:48:23,518 INFO  [main] managers.SFSBannedUserManager     - BanUser data loaded: 0 records.
21:48:23,527 INFO  [main] v2.SmartFoxServer     - Protocol Type is: BINARY
21:48:23,532 INFO  [main] config.DefaultConfigLoader     - Loading: zones/BasicExamples.zone.xml
21:48:23,585 INFO  [main] config.DefaultConfigLoader     - Loading: zones/TestZone.zone.xml
21:48:23,616 INFO  [main] managers.SFSZoneManager     -

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 >> Zone: BasicExamples
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

21:48:23,799 INFO  [main] managers.SFSRoomManager     - Room created: { Zone: BasicExamples }, [ Room: The Lobby, Id: 0, Group: default, isGame: false ], type = SFSRoom
21:48:23,800 INFO  [main] managers.SFSZoneManager     -

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 >> Zone: TestZone
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

21:48:23,812 INFO  [main] Extensions     - {HelloWorldExtension}: Hello world from Brett
21:48:23,817 INFO  [main] managers.SFSRoomManager     - Room created: { Zone: --=={{{ AdminZone }}}==-- }, [ Room: AdminRoom, Id: 1, Group: default, isGame: false ], type = SFSRoom
21:48:23,933 INFO  [main] core.AdminToolService     - AdminTool Service started
21:48:24,051 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - Listening Sockets: { 0.0.0.0:9933, (Tcp) } { 127.0.0.1:9933, (Udp) }
21:48:24,053 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - 
 _____ _____ _____    ___ __ __
|   __|   __|   __|  |_  |  |  |
|__   |   __|__   |  |  _|-   -|
|_____|__|  |_____|  |___|__|__|                                         
 _____ _____ _____ ____  __ __
| __  |   __|  _  |    \|  |  |
|    -|   __|     |  |  |_   _|
|__|__|_____|__|__|____/  |_| 
[ 2.17.0 ]

21:48:24,053 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - SmartFoxServer 2X (2.17.0) READY!
21:48:26,799 INFO  [TomcatRunner] bluebox.BBSessionFilter     - BlueBox Service (4.0.2) READY.
21:48:40,468 WARN  [http-nio-8080-exec-1] websocket.SFS2XWSService     - Upgradre request data not found for: [0:0:0:0:0:0:0:1]:49490
21:48:40,477 WARN  [SFSWorker:Sys:3] v290.SystemReqController     - java.lang.NullPointerException
   com.smartfoxserver.v2.util.CryptoUtils.getUniqueSessionToken(CryptoUtils.java:34)
   com.smartfoxserver.v2.controllers.system.Handshake.execute(Handshake.java:107)
   com.smartfoxserver.v2.controllers.v290.SystemReqController.processRequest(SystemReqController.java:172)
   com.smartfoxserver.v2.controllers.v290.SystemReqController.enqueueRequest(SystemReqController.java:127)
   com.smartfoxserver.bitswarm.io.protocols.AbstractProtocolCodec.dispatchRequestToController(AbstractProtocolCodec.java:39)
   com.smartfoxserver.bitswarm.websocket.tomcat.WebSocketBinaryProtocolCodec.dispatchRequest(WebSocketBinaryProtocolCodec.java:217)
   com.smartfoxserver.bitswarm.websocket.tomcat.WebSocketBinaryProtocolCodec.onPacketRead(WebSocketBinaryProtocolCodec.java:78)
   sfs2x.ws.tomcat.websocket.SFS2XWSService$WSIOExecutor.run(SFS2XWSService.java:520)
   java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
   java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
   java.base/java.lang.Thread.run(Thread.java:832)
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: macOS Big Sur issues

Postby Lapo » 24 Mar 2021, 10:11

Hi,
from the first messages in the logs it looks like you're running SFS2X with a custom Java runtime.
What version (and vendor) is it?
Also, can you reproduce the problem with the default JRE provided with the SFS2X installer?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
bibbinator
Posts: 10
Joined: 03 Jul 2020, 20:02

Re: macOS Big Sur issues

Postby bibbinator » 24 Mar 2021, 10:32

Interesting. I only ran the SFS installer I didn't run any specific JDK installer. I also installed the Intellij IDEA IDE too. Command line version check returns "javac 14.0.1". Looking in Intellij I see JDK 14 and have set it to language level "8".

Do you suggest I download and install an earlier JDK such as version 11?

Screen Shot 2021-03-24 at 11.29.24 AM.jpg
(92.98 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: macOS Big Sur issues

Postby Lapo » 24 Mar 2021, 10:58

Well, it looks like you have found a macOS issue we were not even aware of :shock: :?
Since we have upgraded the installation software (Install4J) they have changed the way they bundle the JRE for macOS targets and our launch script (sfs2x.sh) does not work correctly anymore.

The script is supposed to look for the bundled JRE first and, if not found, revert to the global Java command installed in the system. This way the default JRE 8 always has the precedence over the system JRE. But this is no longer the case with the new macOS installer we distribute, apparently. As the JRE is bundled differently and the script can't find it.

This means that both the sfs2x.sh script and the SFS2X launcher application will always default to the global Java installed in the system.

We'll have to look into this. I'll post an update here when it is fixed.
Lapo

--

gotoAndPlay()

...addicted to flash games
bibbinator
Posts: 10
Joined: 03 Jul 2020, 20:02

Re: macOS Big Sur issues

Postby bibbinator » 24 Mar 2021, 11:00

Ok great, thanks for letting me know.

Is there a workaround that's easily undoable in the meantime?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: macOS Big Sur issues

Postby Lapo » 24 Mar 2021, 11:12

Hi,
as a matter of fact there is, I've just tested it on a freshly installed SFS2X 2.17

Open the sfs2x.sh script and replace the content with this:

Code: Select all

JRE_FOLDER="../.install4j/jre.bundle/Contents/Home/bin/"
JAVA_CMD="java"
if [ -d "$JRE_FOLDER" ]; then
    JAVA_CMD="../.install4j/jre.bundle/Contents/Home/bin/java"
fi

CPATH="./:lib/*:lib/apache-tomcat/bin/*:extensions/__lib__/*"
${JAVA_CMD} -cp ${CPATH} -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main $1 $2


This fixes the path pointing to the embedded JRE 8 for macOS.
Save and launch from terminal or by running the SFS2XLauncher app.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
bibbinator
Posts: 10
Joined: 03 Jul 2020, 20:02

Re: macOS Big Sur issues

Postby bibbinator » 24 Mar 2021, 11:38

It works, thanks! And the errors/warnings now gone.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: macOS Big Sur issues

Postby Lapo » 25 Mar 2021, 10:35

Hi,
quick update --> we have uploaded a new installer for the macOS version of SFS2X 2.17.0. with the hotfix for the JRE issue.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
bibbinator
Posts: 10
Joined: 03 Jul 2020, 20:02

Re: macOS Big Sur issues

Postby bibbinator » 25 Mar 2021, 11:27

I noticed in the 2 fixes this week (dark theme issue on Mac and this one) that the version number is the same. Why isn't it now 2.17.2? How does one know which fixes are in which builds?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: macOS Big Sur issues

Postby Lapo » 25 Mar 2021, 15:46

Sorry, we decided to just re-released the OSX installer. It wasn't in our plans to make a new full release for all platforms, especially when there's no actual changes to the server code.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
kevin69832@gmail.com
Posts: 1
Joined: 29 May 2021, 08:52

Re: macOS Big Sur issues

Postby kevin69832@gmail.com » 29 May 2021, 09:01

Hi @Labor

I also have a problem with macOs Big Sur, I can only start the server by using "sh start.sh". I cannot using SmartServerPro icon to start it. Also, when I start by terminal, I got some warning like below:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.modules.time.Time (file:/Applications/SmartFoxServer%20PRO%201.6.6/Server/lib/jython.jar) to method sun.util.calendar.ZoneInfo.getDSTSavings()
WARNING: Please consider reporting this to the maintainers of org.python.modules.time.Time
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release


The server can start, but when I go to localhost:8080, I got:

Code: Select all

org.apache.jasper.JasperException: Unable to load class for JSP
   at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:592)
   at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:285)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:239)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
   at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:334)
   at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   at org.python.core.PyReflectedFunction.__call__(Unknown Source)
   at org.python.core.PyMethod.__call__(Unknown Source)
   at org.python.core.PyObject.__call__(Unknown Source)
   at org.python.core.PyInstance.invoke(Unknown Source)
   at org.python.pycode._pyx1043.doGet$3(/Applications/SmartFoxServer PRO 1.6.6/Server/webserver/webapps/root/examples.py:30)
   at org.python.pycode._pyx1043.call_function(/Applications/SmartFoxServer PRO 1.6.6/Server/webserver/webapps/root/examples.py)
   at org.python.core.PyTableCode.call(Unknown Source)
   at org.python.core.PyTableCode.call(Unknown Source)
   at org.python.core.PyTableCode.call(Unknown Source)
   at org.python.core.PyFunction.__call__(Unknown Source)
   at org.python.core.PyMethod.__call__(Unknown Source)
   at org.python.core.PyObject.__call__(Unknown Source)
   at org.python.core.PyObject._jcallexc(Unknown Source)
   at org.python.proxies.main$examples$3.doGet(Unknown Source)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   at org.python.proxies.main$examples$3.service(Unknown Source)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.python.util.PyServlet.service(Unknown Source)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
   at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
   at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
   at org.mortbay.jetty.Server.handle(Server.java:324)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
   at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
Caused by: java.lang.ClassNotFoundException: org.apache.jsp._005fexamples_jsp
   at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
   at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
   at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
   at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:590)
   ... 52 more


- Currently, I use openjdk 11.0.2 2019-01-15 and Python 3.7.3.

Could you please give some advice for the issue?
Thank you!
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: macOS Big Sur issues

Postby Lapo » 31 May 2021, 07:35

Hi,
you are referring to SmartFoxServer PRO 1.x, which is an old legacy product we don't support anymore.

Unless there are very specific reasons to keep using it I would highly recommend to download and use SmartFoxServer 2X which is the most up to date version of our multiplayer server. It also comes with lots more features and a richer support for all the various client platforms.

Download here:
https://www.smartfoxserver.com/download ... =installer

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 98 guests