[Logo] Serotonin Software Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: gomez
Forum Index » Profile for gomez » Messages posted by gomez
Author Message
1) Thank you, i'll try soon
2) Good idea, i can get the data from the table generate in the mobile UI with php!

I'll post something if it's working!
Regards and thank you again.
Andrea.
Solved! The problem wasn't in Mango ( sorry if i stole you guys a lot of time. It was on php code.... when the publisher publish its data, it publish the value that it's just updated, not all the point declared. The php side $_request didn't found any data and create a variable with 0 value!! With the statement isset() or exits() I think i'll solve the problem!!
In the meanwhile...

1) if i include in a webpage ( i.e. drupal a public view from mango and a "view1.jsp", only one of them is update. In addition, with google chrome after a few seconds, the data from "view1.jsp" disapper.....
2) Is there any other way to get the last update data from mango's point without using the .jsp page? ( i.e. to create my own ajax live chart?

Regards, Andrea.
Yes! I can try maybe with a new apache installation. But what about mysql? Best regards, Andrea.
I tried to upgrade to 1.10 release by following site instrunction, maybe it can solve my "0" problem, but i get thie error:
log4j: WARN No appenders could be found for logger (org.springframework.util.classUtils)
log4j: WARN Please initialize the log4j system properly
Every time i go to wath list page... i receive a popup message that say "Error"!
I'm saving data to a mysql database....but on 1.10 release i cannot found ..\webinf\classes\env.proprieties....
Regards, Andrea.
Hi... I'm so sorry but there wasn't errors. I however tried to change for a test the offset, but i'm still having 0 on update/changes of the publisher. And the data sources is never 0. What modbus client simulatar did you try? I don't understand where is the problem. I'd like to upgrade to version 1.10, but i'm recording data on mysql database. Am I going to loose all my data?
Thanks in advance, andrea.
Hi, i checked my modbus device configuration and maybe i found some error.... i'll let you know. If can be interesting, when the project is finished, i can put the final release. I moved from php.serial.class to serproxy, an arduino with lcd, and a php file that open a socket stream to serproxy to output my formatted string. Regards and thank for the time you're spending for my problem. Andrea.
Hi I hope the attached file can help you to understand!
Yes, i belive you about double request on all context update.... but i don't know why 0 value. I checked a lot, and the 0 value is alway when there is a data source update, regular snapshot are always ok.

Same device:
a,b,c refresh 60 sec.
d,e,f refresh 60 sec.
Meta data device:
x = a+b+c
y = d+e+f

Publisher do,on update: x = 1234 y=0 and immediatly after x=1234 y=5678
Snapshot are always: x=1234 y=5678.
Regards, Andrea
For example, i just got this from Alarm:

1376 20:21:55 OK - 0 - OK- 52290 - No RTN
1375 20:21:54 OK - 0 - OK- 52290 - No RTN
1374 20:21:54 OK - 0 - OK- 0 - No RTN
1373 20:21:50 OK - 0 - OK- 52290 - No RTN
1372 20:21:45 OK - 0 - OK- 52290 - No RTN

Andrea.

Hi, i tried a possible solution:
Meta data do the operation, in my example it's just a sum.
One variable is the sum of 3 other variables refreshing every 15 sec.
The other is the sum of 3 variables with refresh time of 1 minute.
The meta data tags are set to be updated on :
"context update";
"no delay".

I set up a publisher, that invoke a php page served locally on the server that read the variable from the publisher in the url and print them by the serial port to any device!

Php page:
require("php_serial.class.php");
$powernow = $_REQUEST['powernow'];
$energytot = $_REQUEST['energytot'];
$powernow = round($powernow);
$energytot = round($energytot);
//echo curPageURL();
$serial->deviceOpen();
$serial->sendMessage("powernow");
echo "OK - ".$powernow." - ";
$serial->sendMessage("energytot");
echo "OK- ".$energytot." - ";
$serial->deviceClose();

The setup for the publisher is:
http://localhost/grafici/serial.php,
no key, no value.
Just 2 points without timestamp called powernow and energytot.
Update event: All updates.

Everything seems to working fine, but when i set on "Raise result warning" to debug and send "regular snapshot" i got this error:

20:21:50: com.serotonin.web.i18n.LocalizableMessage@a4ee1cd3
20:21:45: com.serotonin.web.i18n.LocalizableMessage@a4ee1cd3
20:21:40: com.serotonin.web.i18n.LocalizableMessage@a4ee1cd3

In addition, often when regular snapshot is off, the publisher send two http request, not just one, and one of the two points is often set to 0.... it seems that's because of the refreshing time is different between the 2 points...publisher send two requests on each context update....but....the really problem is that it send and set the value to 0! Any suggestion? I'm using mando 1.8.4 regards! Andrea
Thanks, I'll take a look!!
Regards, Andrea
Hi,
I'm interested to show (and log) a variable that's the sum of more variable read by different devices ( i.e. 7-8 solar inverter and also output the variable serially. Do you think it's possible? Maybe I can use put and get to pass the value to a php script that handle the serial port?? How to perform to sum of more than one variable??
Regards, Andrea.
Hey Arne, thank you so much!!!! Eveything works now!! You were right, in that file there was the "dbuser" username. Now I changed it with "adminstrator" and pass "admin". But...just a question.... why by creating a user for the mango's database.... i had this problem?? Who wrote that user in env.proprieties??? If i want a user to connect to pointvalues database..... what can i do??? However thank you again!
Hi Arne,
nothing happend because I already removed that user from privile of mysql when i saw some error with that name! Now there is no user called "dbuser" but mango is still generating error!
Yesterday i was playing with php and mysql, that's why i create that user from phpmyadmin. And everything ( mango, php web page <-> mysql were working ok!
I'm using Windows Server 2008 R2!
Regards!
Maybe it can help someone:
from localhost log:

13-lug-2010 11.50.22 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
13-lug-2010 11.50.22 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
13-lug-2010 11.50.23 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
13-lug-2010 11.50.23 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
13-lug-2010 11.50.23 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
13-lug-2010 11.50.24 org.apache.catalina.core.StandardContext listenerStart
GRAVE: Exception sending context initialized event to listener instance of class com.serotonin.mango.MangoContextListener
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'dbuser'@'localhost' (using password: YES))
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:381)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:42
at com.serotonin.mango.db.MySQLAccess.newDatabaseCheck(MySQLAccess.java:59)
at com.serotonin.mango.db.DatabaseAccess.initialize(DatabaseAccess.java:86)
at com.serotonin.mango.MangoContextListener.databaseInitialize(MangoContextListener.java:259)
at com.serotonin.mango.MangoContextListener.contextInitialized(MangoContextListener.java:89)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:987)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:28
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'dbuser'@'localhost' (using password: YES))
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1232)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:881)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
... 30 more
Caused by: java.sql.SQLException: Access denied for user 'dbuser'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:911)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3953)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1276)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:204
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:723)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:3
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1254)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:122
... 33 more
13-lug-2010 11.50.24 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext

from catalina log:

13-lug-2010 11.50.21 org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
13-lug-2010 11.50.22 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
13-lug-2010 11.50.22 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
13-lug-2010 11.50.23 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: c:\Program Files (x86)\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Fujitsu\ServerView Suite\PrimeUp\;C:\Program Files (x86)\OpenVPN\bin
13-lug-2010 11.50.23 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
13-lug-2010 11.50.23 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 212 ms
13-lug-2010 11.50.23 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
13-lug-2010 11.50.23 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
13-lug-2010 11.50.24 org.apache.catalina.core.StandardContext start
GRAVE: Error listenerStart
13-lug-2010 11.50.24 org.apache.catalina.core.StandardContext start
GRAVE: Context [] startup failed due to previous errors
13-lug-2010 11.50.24 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
13-lug-2010 11.50.24 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
13-lug-2010 11.50.24 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
13-lug-2010 11.50.24 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1452 ms

Thanks in advance!!
Hi guys! I have a big problem! Mango was working fine and perfectly until yesterday night.... today i found that the pc probably reboot by itself, and now.... everytime a try to access to the webpage, tomcat say always to me "The requested resource () is not available."
I don't know how to solve the problem. I'm running Mango with Mysql on Xampp.
Some details:
Mango v. 1.8.2
Mysql ( on xampp 5.1.41
Apache download from seratonin site v. 6.0.20.
The only thing i did yesterday was creating a "dbuser" on mysql to access to mango logged data by a custom webpage.
I always run and stop the service by using the startup and shutdown script into /apache..../bin folder.
Any help will be appreciated. Regards from Italy!

 
Forum Index » Profile for gomez » Messages posted by gomez
Go to:   
Powered by JForum 2.1.9 © JForum Team