(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged)
How to get AWS big data certification?
Which is the best institute for studying AWS?
How will I choose an institute for studying AWS?
Should Firebird driver work without additional config?
I have exactly the same problem. I tried to solve it by installing libfbclients.so as described in https://freepascalanswers.wordpress.com/2012/11/19/firebird-library/
in my host Ubuntu server folder: /usr/lib/x86-64-linux-gnu/ I have these two files: libfbclient.so.2 and libfbclient.so.3.0.5
I also executed the command: sudo ln /usr/lib/x86_64-linux-gnu/libfbclient.so.2 /usr/lib/x86_64-linux-gnu/libfbclient.so
But I still can’t select my Firebird database in Dreamfactory to create APIs - I get the error message: Dreamfactory Utility Mode - could not find driver
DreamFactory Utility Module: Could not find driver
On Ubuntu server, I created a Firebird installation by using the jacobalberty/firebird:latest image (version 3.0.7). From Windows, using IBExpert, I created a database on the Linux server and restored a backup.
I then use Dreamfactory in web browser, installed from bitnami/dreamfactory:latest image (version 4), to create a REST API by configuring a service for the populated database but when I select a the Firebird database as a DB Service I get the error message: “could not find driver”
Problem In Running Multiple Dreamfactory Instances
Hi @arpiticx,
You are correct, DreamFactory can be load balanced across many instances, all of which share the same system database or database cluster. Getting Started with DreamFactory Chapter 9 presents a diagram depicting what this looks like.
The DreamFactory installers are useful for quickly installing and configuring a new DreamFactory instance. However they do not take into account a load balanced configuration. You could nonetheless use the installer for this purpose and just skip the php artisan df:setup
step. Instead, you’ll copy your first DreamFactory instance’s .env
file over to the newly installed instance. This is important because the .env
file contains the APP_KEY
value, database configuration settings, and any other settings which you might have configured.
After installing the DreamFactory instances, you’ll want to place them behind a load balancer. For instance, on AWS you might use an ALB (Application load balancer).
These days many DreamFactory users are gravitating towards Dockerized instances using DreamFactory’s Docker container (also see Dockerhub), as well as scaling using Kubernetes. Regarding Kubernetes, we’ve recently released a Helm Chart.
Hope this helps!
Jason
DreamFactory Utility Module: Could not find driver for Firebird 3
Hi @NolsSmit,
Can you please highlight the steps you have taken to install the Firebird driver? Were the steps you followed the ones highlighted in our Getting Started Guide?
DreamFactory Utility Module: Could not find driver for Firebird 3
Hi Kevin,
Ok, I now did follow the steps in Getting Started Guide.
I also edited /etc/php/7.4/cli/php.ini to:
..
..
;extension=odbc
;extension=openssl
extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
...
...
On the command: $ php -m
I notice the following list of modules
[PHP Modules]
calendar
Core
ctype
date
dom
exif
FFI
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
I don’t recognize one Firebird related and I still get the same error: “Could not find driver” in DreamFactory Utility Mode
To mention: I’m running Dreamfactory in a docker container.
My docker-compose.yml file:
version: '2'
services:
mariadb:
restart: unless-stopped
container_name: mariadb
image: bitnami/mariadb:latest
volumes:
- ./mariadb_data:/bitnami/mariadb
environment:
- ALLOW_EMPTY_PASSWORD=yes
networks:
- dreamfactory-tier
mongodb:
restart: unless-stopped
container_name: mongodb
image: 'bitnami/mongodb:latest'
volumes:
- ./mongodb_data:/bitnami/mongodb
networks:
- dreamfactory-tier
redis:
restart: unless-stopped
container_name: redis
image: 'bitnami/redis:latest'
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- ./redis_data:/bitnami/redis
networks:
- dreamfactory-tier
# https://hub.docker.com/r/bitnami/dreamfactory/
dreamfactory:
restart: unless-stopped
container_name: dreamfactory
image: bitnami/dreamfactory:latest
environment:
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USER=nols.smit@gmail.com
- SMTP_PASSWORD=xxxxxxxxxxxxxxx
- SMTP_PROTOCOL=tls
- DREAMFACTORY_DATABASE_TYPE=mariadb
- DREAMFACTORY_ENABLE_MARIADB_DATABASE=yes
ports:
- '80:80'
- '443:443'
volumes:
- ./dreamfactory_data:/bitnami
networks:
- dreamfactory-tier
depends_on:
- mariadb
- mongodb
- redis
# https://hub.docker.com/r/jacobalberty/firebird/
firebird:
restart: unless-stopped
container_name: firebird
image: jacobalberty/firebird:latest
environment:
- TZ="Africa/Johannesburg"
- tmpfs=/data:rw
- ISC_PASSWORD=xxxxxxxxxxxxxxxx
ports:
- 3050:3050
volumes:
- ./firebird_data:/firebird
networks:
- dreamfactory-tier
- app-tier
# See: https://github.com/bitnami/bitnami-docker-apache#how-to-use-this-image
apache:
restart: unless-stopped
container_name: apache
image: bitnami/apache:latest
environment:
- APACHE_HTTP_PORT_NUMBER=8080
- APACHE_HTTPS_PORT_NUMBER=8443
ports:
- 8080:8080
- 8443:8443
volumes:
- ./apache_data:/app
- .my_vhost.conf:/vhosts/my_vhost.conf:ro
postgres:
restart: unless-stopped
container_name: postgres
image: bitnami/postgresql:latest
environment:
- TZ="Africa/Johannesburg"
- POSTGRES_DATABASE=sdb_risk
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=xxxxxxxxxxxxxxxx
ports:
- 5432:5432
- 5433:5433
volumes:
- ./postgres_data:/bitnami/postgresql
networks:
- dreamfactory-tier
- app-tier
networks:
dreamfactory-tier:
app-tier:
driver: bridge
volumes:
mariadb_data:
driver: local
mongodb_data:
driver: local
redis_data:
driver: local
dreamfactory_data:
driver: local
firebird_data:
driver: local
postgres_data:
driver: local
Regards,
Nols Smit
DreamFactory Utility Module: Could not find driver for Firebird 3 - Follow up
I followed these steps:
Start with:
$ sudo apt-get update
Install php
$ sudo apt install php7.4-cli
Install php dev
$ sudo apt install php7.4-dev
cd /tmp
git clone https://github.com/php/pecl-database-interbase.git
cd pecl-database-interbase/
sudo apt-get install firebird-dev autoconf build-essential
phpize --clean
phpize
./configure
make
sudo make install
Enable the driver in your /etc/php/7.4/cli/php.ini file.
cd /etc/php/7.4/cli
sudo nano php.ini … and search for firebird
and change to
…
…
;extension=odbc
;extension=openssl
;extension=pdo_firebird
extension=interbase
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
…
…
Jacob Alberty, owner of the jacobalberty/firebird image proposed the extension.
After saving the change in php.ini, with the command:
$ php -m
The output (without any error messages and notice interbase in the list) is:
nols@ubuntuserver:~$ php -m
[PHP Modules]
calendar
Core
ctype
date
dom
exif
FFI
fileinfo
filter
ftp
gettext
hash
iconv
interbase
json
libxml
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
To mention: I’m running Dreamfactory in a docker container.
My docker-compose.yml file:
version: ‘2’
services:
mariadb:
restart: unless-stopped
container_name: mariadb
image: bitnami/mariadb:latest
volumes:
- ./mariadb_data:/bitnami/mariadb
environment:
- ALLOW_EMPTY_PASSWORD=yes
networks:
- dreamfactory-tier
mongodb:
restart: unless-stopped
container_name: mongodb
image: ‘bitnami/mongodb:latest’
volumes:
- ./mongodb_data:/bitnami/mongodb
networks:
- dreamfactory-tier
redis:
restart: unless-stopped
container_name: redis
image: ‘bitnami/redis:latest’
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- ./redis_data:/bitnami/redis
networks:
- dreamfactory-tier
# https://hub.docker.com/r/bitnami/dreamfactory/
dreamfactory:
restart: unless-stopped
container_name: dreamfactory
image: bitnami/dreamfactory:latest
environment:
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USER=nols.smit@gmail.com
- SMTP_PASSWORD=xxxxxxxxxxxxxxx
- SMTP_PROTOCOL=tls
- DREAMFACTORY_DATABASE_TYPE=mariadb
- DREAMFACTORY_ENABLE_MARIADB_DATABASE=yes
ports:
- ‘80:80’
- ‘443:443’
volumes:
- ./dreamfactory_data:/bitnami
networks:
- dreamfactory-tier
depends_on:
- mariadb
- mongodb
- redis
# https://hub.docker.com/r/jacobalberty/firebird/
firebird:
restart: unless-stopped
container_name: firebird
image: jacobalberty/firebird:latest
environment:
- TZ=“Africa/Johannesburg”
- tmpfs=/data:rw
- ISC_PASSWORD=xxxxxxxxxxxxxxxx
ports:
- 3050:3050
volumes:
- ./firebird_data:/firebird
networks:
- dreamfactory-tier
- app-tier
# See: https://github.com/bitnami/bitnami-docker-apache#how-to-use-this-image
apache:
restart: unless-stopped
container_name: apache
image: bitnami/apache:latest
environment:
- APACHE_HTTP_PORT_NUMBER=8080
- APACHE_HTTPS_PORT_NUMBER=8443
ports:
- 8080:8080
- 8443:8443
volumes:
- ./apache_data:/app
- .my_vhost.conf:/vhosts/my_vhost.conf:ro
postgres:
restart: unless-stopped
container_name: postgres
image: bitnami/postgresql:latest
environment:
- TZ=“Africa/Johannesburg”
- POSTGRES_DATABASE=sdb_risk
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=xxxxxxxxxxxxxxxx
ports:
- 5432:5432
- 5433:5433
volumes:
- ./postgres_data:/bitnami/postgresql
networks:
- dreamfactory-tier
- app-tier
networks:
dreamfactory-tier:
app-tier:
driver: bridge
volumes:
mariadb_data:
driver: local
mongodb_data:
driver: local
redis_data:
driver: local
dreamfactory_data:
driver: local
firebird_data:
driver: local
postgres_data:
driver: local
But I still get the error: Dreamfactory Utility Module: could not find driver
Regards,
Nols Smit
Calling Oracle Stored Procedure with an OUT parameter
Calling the POST execute procedure api.
I have an oracle stored procedure with two parameters. One parameter is an IN parameter and the other parameter is an OUT parameters.
CREATE OR REPLACE PROCEDURE up_test_out (p_in IN VARCHAR2,
p_out OUT VARCHAR2)
IS
BEGIN
p_out := p_in;
END up_test_out;
/
I get this error when the value of the OUT parameter exceeds 1 character.
{
“error”: {
“code”: 500,
“context”: null,
“message”: “Failed to call database stored procedure.\nError Code : 6502\nError Message : ORA-06502: PL/SQL: numeric or value error: character string buffer too small\nORA-06512: at “UPENN.UP_TEST_OUT”, line 5\nORA-06512: at line 1\nPosition : 0\nStatement : BEGIN “UPENN”.“UP_TEST_OUT”(:P_IN, :P_OUT); END;\nBindings : [test,]\n”,
“status_code”: 500
}
}
What am I doing wrong? I have tried various different calls and fiddling with the json sent in the request body. I feel like I’m missing something here.
Here is the json request body I am sending in the POST:
{
“params”: [
{
“name”: “p_in”,
“value”: “test”
}
],
“schema”: {
“p_out”: “string”
}
}
When I call it with this request body it works:
{
“params”: [
{
“name”: “p_in”,
“value”: “T”
}
],
“schema”: {
“p_out”: “string”
}
}
Response:
{
“P_OUT”: “T”
}
A similar issues exists if the parameter is IN OUT - in that instance it will work as long as the returning value does not exceed the length of value being sent in to the call.
No 'Access-Control-Allow-Origin' header is present on the requested resource
I am having same issue in new deploy .
License Level: OPEN SOURCE
DreamFactory Version: 2.14.0
System Database: pgsql
Install Path: /opt/dreamfactory/
Log Path: /opt/dreamfactory/storage/logs/
Log Mode: daily
Log Level: warning
Cache Driver: file
Cache Path: /opt/dreamfactory/storage/framework/cache/data/
Demo: false
This issue is cmg up randomly and must be seen in details. for what is actually causing it ?
Whoops, looks like something went wrong
Please beware that all server credentials stored in your .env file are printed in the error page.
Facebook OAuth causes 500 Internal Server Error
Hi there
I have the same problem! I am adding the ‘state’ param. Are you still using this? If so, do you have any more information?
Thank you!
Calling Oracle Stored Procedure with an OUT parameter
Connect to PostgreSQL Database
Hello
I am hoping someone here can help me. I need auto-generate APIs to my PostgreSQL database. the database is hosted on my hosting provider shared server. I have to connect to it using SSH tunnels. Direct SSH access is not allowed.
I used the Bitnami Dreamfactory VM and got the instance up and running. On the terminal, I established an SSH tunnel connection to my hosting server. On the dreamfactory web interface, I created the Service to PostgreSQL but when I test on API Docs (Get /_Table), I get the following error:
“error”: {
“code”: “42P01”,
“message”: “SQLSTATE[42P01]: Undefined table: 7 ERROR: relation “pg_matviews” does not exist\nLINE 11: FROM pg_matviews\n ^ (SQL: SELECT all_views.table_name, all_views.table_schema\n FROM (\n SELECT table_name AS table_name,\n table_schema AS table_schema,\n table_type AS table_type\n FROM information_schema.tables\n UNION ALL\n SELECT matviewname AS table_name,\n schemaname AS table_schema,\n ‘VIEW’ AS table_type\n FROM pg_matviews\n ) AS all_views\n WHERE all_views.table_type = ‘VIEW’ AND table_schema = ‘public’)”
}
}
I have no wider why it is looking in the views table.
So either I am doing something wrong or I have not correctly connected to my postgreql database or I am connected buy but trying yo access system tables.
The strange this is when I try Get /_table/{table_name} and enter one of the tables I created I get the same error about pg_matviews.
Can someone help?
Where do you provide SSL keys when creating service
On the “Create New Services” page, I’m setting us a service and want to use SSL keys as part of the security model. I can see a place to provide the SSL mode (in my case, required) but there is no space to provide an SSL key.
I’ve two instances running - one connecting to a MySQL db and another to a PostgreSQL db - but do not see the input space for the certs.
Does anyone else have this issue? Or are only connections without certs available?
Thanks.
"Cannot add or update child row" error when creating role
My service is created however, I am now trying to create a role to use the service. I am receiving the error:
Api Error
SQLSTATE[23000]: Integrity constraint violation: 1452
Cannot add or update a child row: a foreign key constraint fails (`bitnami_dreamfactory`.`role_service_access`, CONSTRAINT
`role_service_access_service_id_foreign` FOREIGN KEY (`service_id`)
REFERENCES `service` (`id`) ON DELETE CASCADE) (SQL: insert
into `role_service_access` (`verb_mask`, `requestor_mask`, `component`,
`service_id`, `filters`, `filter_op`, `role_id`, `last_modified_date`,
`created_date`) values (1, 1, _table/*, 11, [], AND, 3, 2020-12-15 12:23:58,
2020-12-15 12:23:58))
I have no foreign keys specified for the tables in the db I am connecting with.
I’ve reviewed a couple of the other issues, particularly, this one which says that it’s supposed to be fixed as of September, but I cannot seem to figure out why this is happening.
Thanks if anyone can help.
Stored procedure with count of records
Hi
is there a way to get a records count when calling a stored procedure ? Like an include_count parameter.
As a workaround, the stores procedure returns 2 result sets : one with data, the second with a count of records. My problem is both result set are enclosed in array.
{
“components”: [
[
{
“count”: “1”
}
],
[
{
“ProductNumber”: “code”,
“description”: “description”
}
]
]
}
I would like to have an output like that :
{
“components”: [
{
“count”:1
},
{
“prmsProductNumber”:** “88787GR88” ,
“description”:** “Description of component” ,
}
]
]
Is it possible ?
Thank you
Gael
Can't save object with nil foreign keys
This is a stretch, but @Mark, or anyone else, if you’re out there. I’m having what might be the same problem. Running PostgreSQL and have a table with no foreign keys at all but getting the message. I made an issue at "Cannot add or update child row" error when creating role
Python3 Scripts Return Error 500 In All Cases
Hi all,
I am attempting to use python scripts as a service and as a pre-post process script but in either case but I am getting the below response along with my initial request.
“error”: {
“code”: 500,
“context”: null,
“message”: “Executed command returned with error code: 1”,
“status_code”: 500
}
This error occurs with any type of python code (including the sample code). Nodejs and PHP are working correctly.
print(‘Hello Python’)
return(‘Hello Python’)
raise ValueError(‘Hello Python’);
I have set the confirmed both Python3 (3.5) and Python are set paths.
I have added the below to my .env file and /etc/environment
DF_PYTHON3_PATH=/usr/bin/python3
I have confirmed that this is the actual location of the python executables.
I’ve installed munch using pip3 (confirmed installation in python3.5/site-packages)
I’ve restarted apache2 and
php artisan cache:clear
php/php artisan config:clear
Python installations:
"500 Failed to retrieve records" error using PostgreSQL
I’ve configured the service, app, and roles for my endpoint. I can successfully run API calls on /schema, /function, /table - basically all the single nodes that don’t have a table name.
When I do add a table name (e.g., /table/myTableName) I receive a 500 error:
{
"error": {
"code": 500,
"context": null,
"message": "Failed to retrieve records from 'getresidents'.\nSQLSTATE[42703]: Undefined column: 7 ERROR: column d.adsrc does not exist\nLINE 1: ...ER(format_type(a.atttypid, a.atttypmod)) AS type, d.adsrc, a...\n ^ (SQL: SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, d.adsrc, a.attnotnull, a.atthasdef,\n\tpg_catalog.col_description(a.attrelid, a.attnum) AS comment\nFROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum\nWHERE a.attnum > 0 AND NOT a.attisdropped\n\tAND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table\n\t\tAND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema))\nORDER BY a.attnum)",
"status_code": 500
}
}
This even occurs when running from the API Docs inside of the DreamFactory app.
Are there any specific permissions I need to have on the user? I’m even trying with the default postgres user and am getting this error.
I could really use help from anyone who can offer assistance. Thanks.