@joeamiraglia Have you had a chance to review the traces I sent you? Any idea why Mango keeps restarting continuously when launched as a service? For us to consider migrating our applications to Mango 5, we would need it to work properly as a service so that it starts correctly in case of a restart or failure.
Posts made by jcaballeroa
-
RE: Error while checking certificates
-
RE: Error while checking certificates
I've uploaded the ma.log and syslog files to the following WeTransfer link:
I currently have 3 data sources, 50 data points, and 25 publishers solely for testing purposes.
Looking at the following extract from the syslog file, I understand that the mango service restarts the application because it detects that it hasn’t finished starting up. A timer expires, interpreting that mango hasn't completed all necessary startup steps to mark it as fully initialized, which is why systemctl relaunches it. Is that correct?:
2024-10-24T15:29:30.776837+00:00 navarraserver3 start-mango.sh[257343]: INFO 2024-10-24T15:29:30,775 (com.infiniteautomation.mango.spring.MangoRuntimeContextConfiguration.contextRefreshed:168) - Spring context 'rootWebContext' refreshed: Root WebApplicationContext 2024-10-24T15:29:31.223949+00:00 navarraserver3 start-mango.sh[257343]: INFO 2024-10-24T15:29:31,222 (com.infiniteautomation.mango.spring.MangoRuntimeContextConfiguration.contextRefreshed:168) - Spring context 'restDispatcherContext' refreshed: WebApplicationContext for namespace 'REST_DISPATCHER-servlet' 2024-10-24T15:29:33.664510+00:00 navarraserver3 start-mango.sh[257343]: INFO 2024-10-24T15:29:33,663 (com.infiniteautomation.mango.spring.MangoRuntimeContextConfiguration.contextRefreshed:168) - Spring context 'restV3Context' refreshed: WebApplicationContext for namespace 'restV3DispatcherServlet-servlet' 2024-10-24T15:30:00.171984+00:00 navarraserver3 systemd[1]: Starting sysstat-collect.service - system activity accounting tool... 2024-10-24T15:30:00.221033+00:00 navarraserver3 systemd[1]: sysstat-collect.service: Deactivated successfully. 2024-10-24T15:30:00.222035+00:00 navarraserver3 systemd[1]: Finished sysstat-collect.service - system activity accounting tool. 2024-10-24T15:30:08.789340+00:00 navarraserver3 systemd[1]: Reloading requested from client PID 257711 ('systemctl') (unit session-386.scope)... 2024-10-24T15:30:08.789874+00:00 navarraserver3 systemd[1]: Reloading... 2024-10-24T15:30:09.153917+00:00 navarraserver3 systemd[1]: Configuration file /run/systemd/system/netplan-ovs-cleanup.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway. 2024-10-24T15:30:09.320285+00:00 navarraserver3 systemd[1]: Configuration file /run/systemd/system/systemd-networkd-wait-online.service.d/10-netplan.conf is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway. 2024-10-24T15:30:09.764634+00:00 navarraserver3 systemd[1]: Reloading finished in 974 ms. 2024-10-24T15:30:48.652351+00:00 navarraserver3 systemd[1]: mango.service: start operation timed out. Terminating. 2024-10-24T15:30:48.659307+00:00 navarraserver3 start-mango.sh[257343]: INFO 2024-10-24T15:30:48,656 (com.serotonin.m2m2.Lifecycle.terminate:371) - Mango Lifecycle terminating... 2024-10-24T15:30:48.726801+00:00 navarraserver3 start-mango.sh[257343]: INFO 2024-10-24T15:30:48,725 (com.serotonin.m2m2.rt.RuntimeManagerImpl.stopPublisher:606) - Publisher (name=Alsasua, id=1, type=HttpSenderRT) stopped in 3ms 2024-10-24T15:30:48.728599+00:00 navarraserver3 start-mango.sh[257343]: INFO 2024-10-24T15:30:48,727 (com.serotonin.m2m2.rt.RuntimeManagerImpl.stopPublisher:606) - Publisher (name=Etxegarate, id=2, type=HttpSenderRT) stopped in 1ms
-
RE: Error while checking certificates
I changed the value from 25% to 0.25 as you suggested, and indeed Mango no longer throws an error at startup—at least, no errors appear in the ma.log file.
The locale issue seems strange to me because we have the Spanish locale (es_ES) configured, so the % symbol should also be valid in this language.
LANG=es_ES.UTF-8 LANGUAGE= LC_CTYPE="es_ES.UTF-8" LC_NUMERIC="es_ES.UTF-8" LC_TIME="es_ES.UTF-8" LC_COLLATE="es_ES.UTF-8" LC_MONETARY="es_ES.UTF-8" LC_MESSAGES="es_ES.UTF-8" LC_PAPER="es_ES.UTF-8" LC_NAME="es_ES.UTF-8" LC_ADDRESS="es_ES.UTF-8" LC_TELEPHONE="es_ES.UTF-8" LC_MEASUREMENT="es_ES.UTF-8" LC_IDENTIFICATION="es_ES.UTF-8" LC_ALL=
However, it continues to restart every 1-2 minutes, this time without any apparent reason, as no error traces appear. From what I’ve seen, it seems that the issue lies with the service; if I manually start Mango via the start-mango.sh script, it works perfectly without restarting, but if I start it as a service through systemctl, that’s when the problem occurs. The script we use for the service is the one provided on the installation webpage:
[Unit] Description=Mango Automation After=mysqld.service StartLimitIntervalSec=0 [Service] EnvironmentFile=/etc/environment Type=forking WorkingDirectory=/opt/mango PIDFile=/opt/mango/bin/ma.pid ExecStart=/opt/mango/bin/start-mango.sh SuccessExitStatus=0 SIGINT SIGTERM 130 143 Restart=always RestartSec=5s User=mango NoNewPrivileges=true [Install] WantedBy=multi-user.target
-
RE: Error while checking certificates
Hi @BG, thanks for your quick response.
- Which Mango version are you using in v3, v3.7.12? We usually use Mango v3.7.7
- Did this error start after upgrading to v5.2.1, or did you start with a clean install and your overrides added? I downloaded the latest version of Mango Free v5.2.1 from the Radix website and installed it on a clean version of Ubuntu 24.04.
- Please share your SSL properties settings (those you feel comfortable sharing).
I kept the default SSL configurations that come in the mango.properties file, as they seemed coherent and sufficient to me:
# SSL/TLS setup # Note: Enabling SSL/TLS also turns on HSTS by default, see the ssl.hsts.enabled setting below #ssl.on=true #ssl.port=8443 # Configure the key store from which to load X.509 certificate chain and private key. # All key store settings are reloaded dynamically. # If the keystore file does not exist, a temporary self-signed certificate is used instead. # Path to a PKCS #12 or JKS key store, relative to ${paths.data} # By default, use the path to the key store created by the Mango PKI service. #ssl.keystore.location=${pki.keyStore} # Key store password #ssl.keystore.password=${pki.keyStorePassword} # Key password (if not set, it is assumed to be the same as the key store password) #ssl.key.password= # Watch the key store file for changes and reload the certificates/keys for SSL/TLS when it changes #ssl.keystore.watchFile=true #Time socket can be idle before being closed (ms) #ssl.socketIdleTimeout=70000 # Enable ALPN (Application-Layer Protocol Negotiation) for HTTP/2 support. # Current browsers only support HTTP/2 for SSL/TLS connections. #ssl.alpn.on=true # Configure HSTS (HTTP Strict Transport Security) # Enabled by default when ssl.on=true # Sets the Strict-Transport-Security header, web browsers will always connect using HTTPS when they # see this header and they will cache the result for max-age seconds #ssl.hsts.enabled=true #ssl.hsts.maxAge=31536000 #ssl.hsts.includeSubDomains=false
-
Also, can you confirm that you are running Java 17 for the v5 Mango?
This is my Java version:
openjdk 17.0.12 2024-07-16
OpenJDK Runtime Environment (build 17.0.12+7-Ubuntu-1ubuntu224.04)
OpenJDK 64-Bit Server VM (build 17.0.12+7-Ubuntu-1ubuntu224.04, mixed mode, sharing) -
Sharing your ma.log file would greatly help in diagnosing the issue. Thank you.
I tried to attach the ma.log file, but it tells me I don't have permission to do so. I've uploaded it to Wetransfer, link attached. If you prefer another method to receive it, I have no problem doing it another way.
Thanks and Best Regards
-
Error while checking certificates
I just installed Mango 5 Free to try it out since we are regular users of Mango 3 and we want to see if we can migrate our system, but when starting up, I continuously get the following error when renewing certificates.
(I'm uploading the trace information in text mode since uploading the images gives an error.)
ERROR 2024-10-23T07:57:49,179 (com.infiniteautomation.mango.spring.pki.DefaultCertificateMonitor.lambda$initialize$0:80) - Error while renewing certificates
org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [double] for value '25%'; nested exception is java.lang.NumberFormatExcep
tion: For input string: "25%"Every minute and a half or so, it restarts, showing the following message,without displaying any other error messages. Could you tell me what might be happening? Any installation issues?
INFO 2024-10-23T07:59:05,364 (com.serotonin.m2m2.rt.DataSourceGroupTerminator.process:35) - Terminating 1 LAST priority data sources in 1 threads
INFO 2024-10-23T07:59:05,371 (com.serotonin.m2m2.rt.RuntimeManagerImpl.stopDataSource:356) - Data source (name=status, id=2, type=MetaDataSourceRT) stopped in 5ms
INFO 2024-10-23T07:59:05,372 (com.serotonin.m2m2.rt.DataSourceGroupTerminator.process:40) - Termination of 1 LAST priority data sources in 1 threads took 8 ms
INFO 2024-10-23T07:59:05,372 (com.serotonin.m2m2.rt.DataSourceGroupTerminator.process:35) - Terminating 1 NORMAL priority data sources in 1 threads
INFO 2024-10-23T07:59:05,375 (com.serotonin.m2m2.rt.RuntimeManagerImpl.stopDataSource:356) - Data source (name=Mango Internal, id=1, type=InternalDataSourceRT) stopped in 1ms
INFO 2024-10-23T07:59:05,377 (com.serotonin.m2m2.rt.DataSourceGroupTerminator.process:40) - Termination of 1 NORMAL priority data sources in 1 threads took 5 ms
INFO 2024-10-23T07:59:05,380 (com.infiniteautomation.mango.io.serial.JsscSerialPortManager$1.run:74) - Mango Serial Port Event Processor Terminated
INFO 2024-10-23T07:59:05,385 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:452) - All low priority tasks exited gracefully.
INFO 2024-10-23T07:59:05,385 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:459) - All medium priority tasks exited gracefully.
INFO 2024-10-23T07:59:05,386 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:466) - All high priority tasks exited gracefully.
INFO 2024-10-23T07:59:05,423 (com.infiniteautomation.mango.spring.components.executors.MangoExecutors.destroy:93) - Shutting down shared executor and scheduled executor
INFO 2024-10-23T07:59:05,425 (com.infiniteautomation.mango.spring.components.executors.MangoExecutors.awaitTermination:150) - Executors shutdown successfully
INFO 2024-10-23T07:59:05,431 (com.serotonin.m2m2.db.H2Proxy.terminateImpl:408) - Terminating database.
INFO 2024-10-23T07:59:05,817 (com.serotonin.m2m2.Lifecycle.terminate:507) - Mango Lifecycle terminated: SHUTDOWN_HOOK -
Send publisher when datasource modbus fail
Currently, we have Mango 3 in our projects, and we are testing the new version of Mango 5 for the next one we are going to implement. In Mango 3, we usually use many Modbus I/P type datasources for communication with peripherals. To determine if the devices are out of communication, we have MetadaSource that checks every minute the last time values were received for each measurement. If that time exceeds 2 minutes, we set a virtual DataPoint to a value of 0, which triggers an HTTP Publisher to an endpoint on a server that manages the corresponding JSON to indicate that this measurement is out of communication. Before that, we used event management through the "Poll aborted" option, but we stopped doing so because sometimes there were communication drops and the event did not trigger correctly, so we were unaware of the issue.
We would like to know if there is a better option in Mango 5 for sending a publisher if a Modbus I/P datasource stops communicating with the corresponding peripheral. We have seen significant changes in event management at the DataPoints level, allowing customization, but we only see information being sent via email, Slack, or other methods, not through a Publisher.
-
Mango Values Storage
Is there a way to configure Mango so that it does not save the DataPoint values to the internal TSDB?
We do not need Mango to store this information since we send it through a publisher to another SW that is actually the one who stores it, and we want to prevent Mango from opening many files (as in the image) to save system resources.
-
Handle start time
We have a Mango 3.7.4 with about 590DS configured and about 10,000DP. We are observing that when starting it is taking us between 8 and 10 min to do it as we see in the ma.log file. Is this a normal time for this volume of data? Are there any settings that can improve boot time?
-
RE: JSON Quantize Configuration
Hi @terrypacker.
We have seen that you have already solved this problem in the new Mango 4.0: "Fixed the bug where the quantization settings in a data source were not imported in a JSON import".
If we need to use this functionality, is it necessary for us to buy an upgrade from our Mango 3.6 to version 4.0?
-
RE: Force read SNMP
Of course, the time you need. Thank you very much for the feedback.
-
RE: Force read SNMP
Yes, I'm pretty sure it's correct.
In fact, the usual polling of the datasource does work correctly. If I configure it for example every 10 minutes, I get the value without problem. The problem is if I need to force the value at a given moment before those 10 minutes, I have tried to force the reading and that is when it gives the error. The difference between both requests is the capture of the wireshark that I put in a previous post, by means of polling the datasource the oid is included in the datagram, but if I make a forced request the oid does not appear in the datagram.
-
RE: Force read SNMP
@craigweb said in Force read SNMP:
The force read command does a batch poll then only updates that point. Is the point perhaps a Trap point only ?
Hi @CraigWeb, thanks for your answer.
I have only two options to configure this DataPoint: "Poll and trap" or "Trap only".
My configuration is "Poll and trap" and the force read command not work properly or i am made something bad.
-
RE: How to trace connected devices to Mango
I am having a similar problem. I would need a way to know if a device is connected or not (performing data acquisition polling), for example through an event, and that information is automatically saved, for example in a virtual data point.
Any ideas? -
RE: Force read SNMP
Any idea????
I have been able to see through wireshark captures that the difference between a polling and forcing the reading of the SNMP datapoint is that through the forced reading, Mango does not send the requested oid in the UDP datagram. It's a bug?
-
Force read SNMP
I am trying to force reading multiple SNMP type DataPoints via button in "Data Point Details" window and also via script using RuntimeManager.refreshDataPoint (XID) function.
But in both ways I get a binding error with the equipment and the acquisition of the OID information does not work. I have tried it with SNMP peripherals of different types and it happens to me with all.
Is it not possible to do the immediate acquisition of the datapoint in this way? Do I need to additionally configure anything to use this method?
-
Change Encoding
I have a DataSource of type SNMP in which I have configured a DataPoint of type octectstring.
I need to make a set of this datapoint with the following information:
0xFF 0xFF 0xFF 0x03 0x00 0x01 0x00 0x00 0x7F 0x00 0x00 0x01The problem is that when making the DataPoint SET, Mango uses a UTF-8 encoding, in which 1 byte is used to encode the values from 0x00 to 0x7F, and those values above (between 0x80 and 0xFF) encode them in 2 bytes, in such a way that the characters 0xFF converts them into 0xC3 0xBF, so it ends up sending:
0xC3 0xBF 0xC3 0xBF 0xC3 0xBF 0x03 0x00 0x01 0x00 0x00 0x7F 0x00 0x00 0x01
and the server that receives the message does not accept it since it interprets it as wrong.
Is it possible to change the encoding so that Mango uses ISO-8859-1, or is there another way to do the conversion so that it correctly sends the 0xFF byte?
Thanks and Regards!
-
RE: JSON Quantize Configuration
Thank you @terrypacker, I am glad that the issue has served to resolve this issue. We will wait for the 4.0 update then to fix it.