1. Alexis Colon Lugo
  2. as SQLite DB Server
  3. Mittwoch, Mai 01 2019, 11:57 AM
  4.  Abonnieren via E-Mail
Hi
i need to made one app for iPad but i need to sync with my local mini server with valentina sqlite server.

can this works or no

thanks
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
i see /opt/VServer/vlogs this ok or no
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Yes, that's correct.

Do you have any entries in the latest log for the moment you were trying to connect?

Here's how to check log from the terminal dynamically:

# cd /opt/VServer/vlogs
# ls
vserver_20190621_200138.log
# tail -f vserver_20190621_200138.log
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
ok
what port number i have to use to connect to the Db
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
It can be found/changed
- using the Port REST property of connection in the Valentina Studio
or
- in the /opt/VServer/vserver.ini, PORT_REST = option.

It is necessary to restart after changing
Anhänge
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
2019-06-25 12:38:00.526117 (TID 1751102256): (UID 20) ERROR 0x82501: Connection limit reached.
2019-06-25 12:38:00.526317 (TID 1767887664): (UID 21) Connection timeout end.
2019-06-25 12:38:00.527750 (TID 1767887664): (UID 21) ERROR 0x82501: Connection limit reached.
2019-06-25 12:38:00.528607 (TID 1751102256): (UID 20) Closing vSqlite-connection. ( vSqlite-connections count: '2'. Available: '0')
2019-06-25 12:38:00.529136 (TID 1767887664): (UID 21) Closing vSqlite-connection. ( vSqlite-connections count: '1'. Available: '0')
2019-06-25 12:38:57.980549 (TID 1751102256): (UID 16) Connection established with '10.123.0.3:49519'. ( vSqlite-connections count: '1')
2019-06-25 12:38:57.984154 (TID 1734316848): (UID 16) ERROR 0x82515: Received packet is broken.
2019-06-25 12:38:57.984855 (TID 1734316848): (UID 16) Closing connection. ( vSqlite-connections count: '1'. Available: '0')
2019-06-25 12:41:48.256012 (TID 1759494960): (UID 16) Connection established with '10.123.0.3:49529'. ( vSqlite-connections count: '1')
2019-06-25 12:41:48.257713 (TID 1767887664): (UID 16) Closing connection. ( vSqlite-connections count: '1'. Available: '0')
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
1) Is the license loaded?
2) This log shows connection to SQLite port, not the REST port.

With REST, log entry looks like:
Tue Jun 25 2019 20:18:44.416478 (TID 123145510604800): (UID 28) REST connection 5922523de3dc5f1316bf4aba57eebedb established with '127.0.0.1:61753'. ( available: '4')
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
ok
So what is rest port number, I can check
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
You define port yourself, there is no default value.

Check /opt/VServer/vserver.ini

You can change it right here, like:
PORT_REST=8080

and restart the server
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
if i use 8080 then no logs create but if I use 15532, i have logs.
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
thanks, Sergey
Now works I set my own ports
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
Hi
Is working but if i have an error i have to reboot the PI to reconnect way is this, any idea
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
HTTPStatus=503
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Please attach a few latest log files from the server
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
2019-06-27 16:42:07.565759 (TID 1882952496): (UID 20) Closing database '(null)': OK
2019-06-27 16:42:07.565850 (TID 1882952496): (UID 20) Database 'ipadprojects.vdb' object memory released.
2019-06-28 11:04:58.341703 (TID 1795158832): (UID 20) REST connection 1ffdbcd76c93572181502759320f56e7 established with '10.123.0.3:49476'. ( available: '0')
2019-06-28 11:05:05.293381 (TID 1786766128): Start parsing 'iPadProjects.db' Access Control List (ACL).
2019-06-28 11:05:05.295106 (TID 1786766128): Finish parsing 'iPadProjects.db' Access Control List (ACL).
2019-06-28 11:05:05.297256 (TID 1786766128): (UID 20) Database '(null)' remoteID 1796267000 registered.
2019-06-28 11:05:05.297427 (TID 1786766128): (UID 20) Database '(null)' remoteID 1796267000 unregistered.
2019-06-28 11:05:05.298853 (TID 1786766128): (UID 20) URI: "/rest/session_1ffdbcd76c93572181502759320f56e7;/sql_fast". Error - ""ipadprojects.vdb" invalid database name.".
2019-06-28 11:05:11.050732 (TID 1778373424): (UID 0) ERROR 0x82501: Connection limit reached.
2019-06-28 11:05:11.051316 (TID 1778373424): (UID 20) URI: "/rest". Error - "Service unavailable".
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
There are a few questions about this log file entries.

1) The name of your database is "ipadprojects.vdb" in lower case, right? It is important because linux filesystem is case-sensitive.
Please check it with ls -l /opt/VServer/databases

It is better to keep it in lower case.

2) To execute SQL, you specify database without an extension, like here:

Dim sqlLocation As Text = App.mSessionURL + "/sql_fast"
mSQLSocket.Start( App.mHost, App.mSessionID, sqlLocation, "Valentina", "valentina_sakila", "SELECT * FROM actor WHERE actor_id = 1" )


3) Are you sure the license is recognized? Please check at the beginning of the log file

Licence license_lin_4439408093954748 is registered to user_name.
Valid until 9999-12-31. Subscription valid until 2019-12-30.


And the following row:

Maximum number of REST connections :


How many connections are there?
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
Hi this is correct or no
i do no see my db names ?

pi@raspberrypi:/opt/VServer/databases $ sudo ls -l /opt/VServer/databases
total 2352
-rw------- 1 root root 2461696 Apr 9 11:49 master.vdb
-rw------- 1 root root 4096 Jul 2 09:19 master.vdb.journal
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
look Valentina Studio
Anhänge
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
So SQLite database has upper-case letters, and you query it like here

Dim sqlLocation As Text = App.mSessionURL + "/sql_fast"
mSQLSocket.Start( App.mHost, App.mSessionID, sqlLocation, "SQLite", "iPadProjects.db", "SELECT * FROM ..." )


Right?

What about the license, according to the log it is not properly loaded - you should check the beginning of the log file like I wrote before.
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
My Code
Dim sqlLocation As Text = App.mSessionURL + "/sql_fast"
mSQLSocket.Start( App.mHost, App.mSessionID, sqlLocation, "SQLite", "ipadcr", "SELECT * FROM main WHERE accnum = 1" )


pi@raspberrypi:/opt/VServer/vlogs $ sudo tail -f vserver_20190702_125935.log
2019-07-02 12:59:49.220448 (TID 1996377472): WARNING: Not found any valid license.
vServer is still working though (single connection allowed).
You need to get a FREE license with 5 Valentina DB, 10 SQLite, and 10 REST connections
OR purchase a license with more connections at Paradigma Store <http://www.valentina-db.com/en/store>;.
You will get your license file by email. Drop it into licenses folder and start server.

2019-07-02 13:00:14.101969 (TID 1866392368): (UID 20) REST connection 20892e654aac205efd602227a00bbcb1 established with '10.123.0.3:52271'. ( available: '0')
2019-07-02 13:00:15.460726 (TID 1857999664): Start parsing 'ipadcr' Access Control List (ACL).
2019-07-02 13:00:15.470052 (TID 1857999664): Finish parsing 'ipadcr' Access Control List (ACL).
2019-07-02 13:00:15.506974 (TID 1857999664): (UID 20) URI: "/rest/session_20892e654aac205efd602227a00bbcb1;/sql_fast". Error - "Sqlite db "/opt/VServer/databases_sqlite/ipadcr": Error : "unable to open database file".".
Anhänge
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
For SQLite databases it is necessary to write database name with extension - ipadcr.db

Do you have a license in /opt/VServer/licenses?
Kommentar
There are no comments made yet.
  • Seite :
  • 1
  • 2
  • 3


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories