Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web server problems #4

Open
ferrebam opened this issue Sep 20, 2021 · 4 comments
Open

Web server problems #4

ferrebam opened this issue Sep 20, 2021 · 4 comments
Assignees

Comments

@ferrebam
Copy link

Hi,

Both the docker version and the version with java binary, the web server does not respond, the shortcuts to the functions and a solid color background are displayed but it does not allow interacting with the environment.

web

In the application logs, it seems to show some kind of error but I don't know how to interpret it:

2021-09-19 23:40:18.237 INFO [https-jsse-nio-8003-exec-7] r.m.k.s.UserSessionListener : User successfully authenticated: UserInfo(id=1, timestamp=2021-09-09 18:17:58.104, createdBy=null, username=admin, name=Admin, phone=null, admin=true) 2021-09-19 23:40:20.848 INFO [MessageBroker-2] o.s.w.s.c.WebSocketMessageBrokerStats : WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 3, active threads = 1, queued tasks = 1, completed tasks = 1]
I have tried adding a device and apparently it initiates some sort of communication but causes an error anyway:

2021-09-20 18:00:12.993 INFO [pool-1-thread-799] r.m.k.device.MessageConnector : [f135f902] Device messages connection accepted 2021-09-20 18:00:13.069 ERROR [pool-1-thread-799] r.m.k.device.DeviceConnector : [f135f902] Unable to proceed, closing ru.mecotrade.kidtracker.exception.KidTrackerParseException: Leading symbol '[' not found in message "�AQSH+���~��|���C�� $$Z|��T�%�U�|aH� �" at ru.mecotrade.kidtracker.device.MessageConnector.process(MessageConnector.java:66) at ru.mecotrade.kidtracker.device.DeviceConnector.run(DeviceConnector.java:67) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Sorry I can't give more detailed information but I don't know too much about spring, java, etc. environment.

Platform data:

Ubuntu 21.04 (Linux 5.11.0-1015-raspi aarch64)
Docker version 20.10.7, build 20.10.7-0ubuntu1~21.04.1
docker-compose version 1.25.0, build unknown

Thanks in advance,

@mecotrade
Copy link
Owner

Hi @ferrebam ,
Thank you for reporting this issue! I have see two potential problems:

  1. The no interaction problem might be related with a 3d party libraries I'm using, namely the Leaflet which is responsible for frawing the map. I also experience the very same problem, especially when log in from my phone. In my case it is sporadic: from other device, or after cleaning the cache or something I usually start seeing the map. BTW, did you allowed the webapp to use you geolocation? If not, it alows might entail such a behavior.
  2. The server side is using a specific communication protocol, which is implemented in such baby smart watch as Q50, Q90 etc. Other models might use another protocol or version of protocol, which is not compatible with the server. Please let me know which model of watches you are binding to the server. Also, since the port is accessible from the Internet, any scammer could scan it. It might happen that the exception you have observed is not related to your watch, just an alien package trying to scan you server.

@ferrebam
Copy link
Author

Hi @mecotrade ,

Thanks for your quickly response!

Today i was try to capture all trace from container boot to user input credentials, this is the result:

2021-09-21 21:02:59.785 INFO [main] r.m.kidtracker.KidTracker : Starting KidTracker v2.1.0 using Java 1.8.0_302 on f5e1ed76c937 with PID 7 (/app/kidtracker.jar started by root in /app)
2021-09-21 21:02:59.813 DEBUG [main] r.m.kidtracker.KidTracker : Running with Spring Boot v2.5.2, Spring v5.3.8
2021-09-21 21:02:59.815 INFO [main] r.m.kidtracker.KidTracker : No active profile set, falling back to default profiles: default
2021-09-21 21:03:09.548 INFO [main] o.s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-09-21 21:03:10.595 INFO [main] o.s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 946 ms. Found 7 JPA repository interfaces.
2021-09-21 21:03:17.376 INFO [main] o.s.b.w.e.t.TomcatWebServer : Tomcat initialized with port(s): 8003 (https)
2021-09-21 21:03:17.474 INFO [main] o.a.c.http11.Http11NioProtocol : Initializing ProtocolHandler ["https-jsse-nio-8003"]
2021-09-21 21:03:17.479 INFO [main] o.a.c.core.StandardService : Starting service [Tomcat]
2021-09-21 21:03:17.481 INFO [main] o.a.c.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.48]
2021-09-21 21:03:17.944 INFO [main] o.a.c.c.C.[.[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-09-21 21:03:17.946 INFO [main] o.s.b.w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 17212 ms
2021-09-21 21:03:18.287 INFO [main] c.z.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-09-21 21:03:21.236 INFO [main] c.z.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-09-21 21:03:21.313 INFO [main] o.s.b.a.h.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:file:./data/data'
2021-09-21 21:03:23.471 INFO [main] o.h.j.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-09-21 21:03:24.305 INFO [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.32.Final
2021-09-21 21:03:25.985 INFO [main] o.h.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-09-21 21:03:27.460 INFO [main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2021-09-21 21:03:35.792 INFO [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-09-21 21:03:35.901 INFO [main] o.s.o.j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-09-21 21:03:46.830 INFO [Thread-4] r.m.k.device.DeviceServer : Device Server started on port: 8002 for class ru.mecotrade.kidtracker.device.DebugConnectorFactory
2021-09-21 21:03:46.825 INFO [Thread-3] r.m.k.device.DeviceServer : Device Server started on port: 8001 for class ru.mecotrade.kidtracker.device.MessageConnectorFactory
2021-09-21 21:03:50.562 INFO [main] o.s.s.w.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6f80fafe, org.springframework.security.web.context.SecurityContextPersistenceFilter@4204541c, org.springframework.security.web.header.HeaderWriterFilter@5e8f9e2d, org.springframework.security.web.authentication.logout.LogoutFilter@533b266e, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@6c345c5f, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@1849db1a, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@3af17be2, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@4602c2a9, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@79e18e38, org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter@1568159, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@f9879ac, org.springframework.security.web.session.SessionManagementFilter@fd46303, org.springframework.security.web.access.ExceptionTranslationFilter@71e5f61d, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@841e575, ru.mecotrade.kidtracker.security.UserDeviceFilter@37f21974]
2021-09-21 21:03:52.168 INFO [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
2021-09-21 21:03:53.215 INFO [main] o.a.c.http11.Http11NioProtocol : Starting ProtocolHandler ["https-jsse-nio-8003"]
2021-09-21 21:03:57.081 INFO [main] o.s.b.w.e.t.TomcatWebServer : Tomcat started on port(s): 8003 (https) with context path ''
2021-09-21 21:03:57.098 INFO [main] o.s.m.s.b.SimpleBrokerMessageHandler : Starting...
2021-09-21 21:03:57.100 INFO [main] o.s.m.s.b.SimpleBrokerMessageHandler : BrokerAvailabilityEvent[available=true, SimpleBrokerMessageHandler [org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry@74a9c4b0]]
2021-09-21 21:03:57.105 INFO [main] o.s.m.s.b.SimpleBrokerMessageHandler : Started.
2021-09-21 21:03:57.210 INFO [main] r.m.kidtracker.KidTracker : Started KidTracker in 62.724 seconds (JVM running for 67.672)
2021-09-21 21:04:48.295 INFO [MessageBroker-2] o.s.w.s.c.WebSocketMessageBrokerStats : WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 3, active threads = 1, queued tasks = 1, completed tasks = 1]

I see an error in boot process without user actions:

**WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)],**

After the startup process, I have connected through the portal but it shows the same screen that I sent yesterday, with no option to interact with the buttons or the map.
The log file only shows the user's connection, no other data:

2021-09-21 21:06:11.973 INFO [https-jsse-nio-8003-exec-1] o.a.c.c.C.[.[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2021-09-21 21:06:11.975 INFO [https-jsse-nio-8003-exec-1] o.s.w.s.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2021-09-21 21:06:11.985 INFO [https-jsse-nio-8003-exec-1] o.s.w.s.DispatcherServlet : Completed initialization in 8 ms 2021-09-21 21:06:27.749 INFO [https-jsse-nio-8003-exec-6] r.m.k.s.UserSessionListener : User successfully authenticated: UserInfo(id=1, timestamp=2021-09-09 18:17:58.104, createdBy=null, username=admin, name=Admin, phone=null, admin=true)

As for the device, I could see that the requests are from the watch that I tried to pair, the good news is that the sms worked and I was able to pass the parameters but it seems that it is not compatible with the server.
I don't know what version or gps system it uses internally, I know only the watch brand, https://www.savefamilygps.com/.
I have tried to get the current configuration by sending the command "pw,13456,ts#" getting the following:

ver:G72SC_ZMD_DF34_V1_HW_0.2_2019.08.15_09.16.01;
ID:0903379569;
imei:869609XXXXXXXX;
ZCM:50980XXXXXXXX;
ip_url:XXXX.XXXX.XXX;
port:8001;
center:685XXXXXX;
slave:;
sos1:679XXXXX;
sos2:685XXXXX;
sos3:;
profile:1;
upload:60S;
bat level:100;
language:4;
zone:2.00;
GPS:NO(0);
NET:NO(100);

This is all I have been able to get.

Thank you very much

Regards,

@mecotrade mecotrade self-assigned this Oct 1, 2021
@Mr-Groch
Copy link

I can confirm same problem with not functional web frontend and no error in logs in:

  • Play with Docker sandbox
  • Docker Desktop on Windows
  • docker engine on Raspberry Pi running debian

@DisappointedMoose
Copy link

DisappointedMoose commented Jul 27, 2022

Same problem here, although I only face the issue in Browsers based on Chrome. In Firefox everything works.
Chrome doesn't even ask for Location permissions. Even if I allow them manually it doesn't work.

Edit: Nevermind. I've changed nothing and it doesn't work in Firefox anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants