New Installation first login

Hello,

I installed Dreamfactory on my VServer and I also executed df:setup to setup the user. In the table “user” I can see this user with his data.

When I use my url to the server I see the login page where I insert the users email - address and the password. If I now hit login, nothing happens. How can I check, why there is no reaction? Is there a log file?

Best Regards

MrSpock

Hi @MrSpock,

Were there any issue that arose when installing? Can you please inspect that page and take a look at the console to see what errors are being thrown when you try to login?

During Installation there were no errors reported.
In the console there are warnings and errors:
window.controllers/Controllers sollte nicht mehr verwendet werden. Verwenden Sie es nicht für die Browser-Erkennung. ace.js:1:18447

Synchrone XMLHttpRequests am Haupt-Thread sollte nicht mehr verwendet werden, weil es nachteilige Effekte für das Erlebnis der Endbenutzer hat. Für weitere Hilfe siehe http://xhr.spec.whatwg.org/ app.8949778b.js:1:267531

Passwort-Felder sind auf einer unsicheren (http://) Seite vorhanden. Dies ist ein Sicherheitsrisiko, durch das Zugangsdaten gestohlen werden können.[Weitere Informationen]

index.html

Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf https://dreamfactory.com/in_product_v2/notifications.php. (Grund: fehlendes Token ‘x-dreamfactory-api-key’ in CORS-Kopfzeile ‘Access-Control-Allow-Headers’ aus dem CORS-Preflight-Kanal).[Weitere Informationen]

Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf https://dreamfactory.com/in_product_v2/notifications.php. (Grund: CORS-Anschlag schlug fehl).

Object { data: null, status: -1, config: {…}, statusText: “”, xhrStatus: “error” }

vendor.ef0c91cf.js:1:251532

TypeError: “reject.data.error is undefined”

Thanks for including links to your site. It appears /api doesn’t exist on your server (404). I suspect this has something to do with Apache configuration - maybe rewrite rules or vhosts got broken?

On my server /api gives the top level available APIs. http://api.vtrans.vermont.gov/api

Errors I get, I’m obviously using an incorrect credential.

@Kevin_Mcgahey - are there any known bugs in 2.12 that could cause /api to get lost? I’ve never hit this issue.
@MrSpock - which installation method did you use? Github, Bitnami, etc.

1 Like

There are currently no known issues regarding /api to get lost.

@MrSpock Were there any other changes made in your instance that may have caused this? At what point did this error start happening?

I rechecked on the server. There is no folder named api :flushed:

I used the “manual way of installation” via Github as described here: https://wiki.dreamfactory.com/DreamFactory/APT/Ubuntu_16.04/Installation, although my server runs debian 9 instead of ubuntu. I also deviated from the description by using php7.2 instead of 7.1

All other steps did not show an error. The database was correctly initialized and I do have a user in it.

So which step of installation do I have to repeat, to create an folder /api with all the necessary content?

Hello Kevin, as mentioned in the title, I did setup the dreamfactory framework as decribed in https://wiki.dreamfactory.com/DreamFactory/APT/Ubuntu_16.04/Installation. I am using froxlor on my server so I did insert the setup data:
<VirtualHost *:80>
DocumentRoot /opt/dreamfactory/public

<Directory /opt/dreamfactory/public>
    AddOutputFilterByType DEFLATE text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript
    Options -Indexes +FollowSymLinks -MultiViews
    AllowOverride All
    AllowOverride None
    Require all granted
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^.*$ /index.php [L]

    <LimitExcept GET HEAD PUT DELETE PATCH POST>
        Allow from all
    </LimitExcept>
</Directory>

in the field “Own Server Setings” of the froxlor webserver settings of the domain. I checked that this enty has been correctly included in /etc/apache2/sites-enabled/35_froxlor_normal_vhost_.conf.

After all setups and restart of apache2, I was routed login page. My first login there did not work. And by now I found that there is no /api folder on the server. I do not know why or how I can create one. I thought it would be created by calling install --no-dev

I am a step further. The problem seems to be that I had activated the linux ufw firewall. I allowed port 80 and 443 access from all ip addresses. And port 22 access only from my personal ip address. When I disabled the firewall, the access worked. Since I do not want to disable the firewall, which port do I have to allow access to for dreamfactory to work?

1 Like

So /api is a routing folder that only exists virtually in the php framework - it’s not physically present on the filesystem.

Can you check database connectivity? If UFW is blocking that it could be the issue. The login not working also suggests this issue. Also ensure there are tables in the dreamfactory database.

The only other thing I could think of that would be port/firewall related is the php process itself, but I’ve never run into that unless I was using nginx.

1 Like

As I have written above. Once I deactivated ufw, I can use dreamfactory on my server. The test application under iOS swift works. Since I do not want to deactivate ufw, I need to know which ports I would have to allow to be used for inbound and outbound traffic when using the DF framework. I did allow port 80 (HTTP), 443(HTTPS) and 22 (SSH). But this was not sufficient. Which ports are used by the database? I have configured using mysql (mongodb).