have no permission to access superset tables either from load_examples or added manually after installation - apache-superset

i have airbnb superset setup on centos 6.6 and python 3.4 virtual env. the web server is booted up without error logged and also OK to browse the web ui. but neither the tables which are already there due to"superset load_examples" in setupup, nor the mysql tables i managed to add in web ui by myself, are accessable from web ui. all tables are reported "The endpoint requires the datasource tablenamexxx, database or 'all datasource_access' permission", "You do not have permission to access the datasource(s):multiformat_time_series."
Anyone familiar with superset can help check this?
Error prompt is like this pic:

I have encountered this issue myself by neglecting to run the superset init command during the installation and initialization process before starting the webserver. Shutting down the webserver, running superset init, then restarting the webserver with superset runserver solved the issue for me.

Related

Server Error (500) Django App on AWS server

Good day,
i have currently my django project running on an aws server. I have used Nginx and configured it all. The application is running, but when i try to login via the login page i have created or try to login via the admin panel it gives me a Server Error (500). I have my DEBUG=False and added my server dns to ALLOWED_HOSTS. As for the Database. I have got my SQL Database running on an Azure server and used environment variables (that i have permanently set in my ubuntu terminal) to get my password and username.
I have also tried to set DEBUG to False and trying to figure out the issue when running python manage.py runserver so i could experiment with it on my localhost, but no luck. I cant access 127.0.0.1 eventhough i have added it to my Allowed hosts.
How could i see what the error is? Thank you in advance
Ok, so fixed it!
After each change, you simply run the command sudo supervisorctl reload in your powershell after you ssh'ed into your aws ec2 server.
As for seeing what the error is, simply set DEBUG=True

Setting up Django on a clean VM: issue linking runserver to VM's ip

I'm setting up my Django site on a clean Ubuntu VM. Gone through the process of installing the necessary tools, I follow this tutorial and apart from the additional python packages I've added for my site it's the same process.
According to this instructional guide to check whether everything is running smoothly you run python manage.py runserver 0.0.0.0:8000 and it should then run on the IP:8000 of the site.
above is the instance of this running
and this above shows the external ip of the google cloud instance running this.
However when i try to visit http://35.227.49.155:8000/ I get This site can't be reached and it's double confirmed with no activity on the shell on a request picked up.
UPDATE
Since as suggested that likely google cloud's firewall might be blocking this I've tried made this port open
but still can't get it to work.

Django Deployment on windows

I am learning python and Django now. I have a question related to deploying Django project on windows 7. I know how to start the test server in django and see the project. But I have to do start the server manually every time I restart the PC. Also I have to keep the terminal window open.
Consider the below scenario for php projects.
We copy and paste the php files in htdocs or www folder in apache server and access them using the respected url. Web Server is running in the background. We dont have to start the server on windows restart.
Is something similar possible with Django on apache or any other server?
If yes, how should I go about it?
Thanks in advance.
For anyone stumbling around for an answer to a similar problem with deploying Django on a Windows server, here is a guide
Deploy Django with Apache and mod_wsgi on Windows Server 2019
To have Apache24 service automatically run on startup, make the changes in Windows Services dialog.

Django manage.py commands with Google App Engine and Vagrant

I have a Google App Engine app and I'm running Windows with Vagrant. I have an Ubuntu installation which I access via vagrant ssh. On that machine I installed the Google App Engine SDK for Python and I can successfully deploy my app with:
appcfg.py update myapp --oauth2 --noauth_local_webserver
The --noauth_local_parameter allows me to copy the oauth URL and paste in the browser on my Windows machine, because on the Linux machine I have no GUI. Everything is working fine.
But now I want to use the Django manage.py syncdb command, to create the tables in Google Cloud SQL. The problem is, when I execute that command, the text-based w3n browser starts for the authorization, and then I get the error message that the browser does not support javascript.
I'd like to run the manage.py commands with the --noauth_local_webserver flag, but that is not supported by the manage.py commands. How can I solve this? I have already installed an Ubuntu virtual machine with GUI and given the app the permission and manage.py works fine on that machine, but when I try to execute the command on the Vagrant (non GUI) machine, it stills want to open the browser for permission.
Hm, I manually copied the oauth .dat file to the vagrant server, and manage.py syncdb is now working, but the website still can't connect in the browser; it says:
No valid OAuth 2.0 credentials. Before using the Google SQL Service backend on dev_appserver, you must first run "manage.py syncdb" and proceed through the given instructions to fetch an OAuth 2.0 token.
It seems to be the same errors as here. In my case it seemed that the necessary GOOGLE_SQL_OAUTH2_REFRESH_TOKEN environment variable was not set. I copied this refresh token from the .dat file and set it in the app.yaml:
env_variables:
GOOGLE_SQL_OAUTH2_REFRESH_TOKEN: "..."
Now everything is working fine.

Django + GAE + Google Cloud SQL authentication issue in Windows

I've followed all steps required to configure Django with GAE + Google Cloud SQL (on Windows 7) but I am unable to authenticate (OAuth2) and run syncdb remotely. When I run manage.py syncdb the browser pops up and I am requested to allow access, but when I do that nothing happens. The browser is forwarded correctly to my local django instalation (the typical It worked! screen) but no OAuth2 token is in %USERPROFILE%\ and the console gets frozen:
C:\Users\me\myproject>python manage.py syncdb
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?state=None&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=my_id.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsqlservice&access_type=offline
If your browser is on a different machine then exit and re-run this
application with the command-line parameter
--noauth_local_webserver
There is no error message and I have to kill the console.
Anybody has faced a similar issue? Is there any log somewhere in GAE I can check?
I had the same problem, only on OS X.
I never figured out why, but it went away after a reboot.
I had the same issue, but it was because I had local appengine server running while I was running manage.py syncdb. Shutting it down and trying again worked as intended.
hope that helps.