When I try to log into Ansible Tower or navigate around, I'm getting a 500 error. The /var/log/tower.log shows:
2016-12-20 14:34:59,659 ERROR django.request Internal Server Error: /api/v1/config/
Traceback (most recent call last):
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
return func(*args, **kwargs)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/rest_framework/views.py", line 466, in dispatch
response = self.handle_exception(exc)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/rest_framework/views.py", line 463, in dispatch
response = handler(request, *args, **kwargs)
File "/lib/python2.7/site-packages/awx/api/views.py", line 234, in get
File "/lib/python2.7/site-packages/awx/main/models/projects.py", line 57, in get_local_path_choices
OSError: [Errno 13] Permission denied: '/var/lib/awx/projects'
But the /var/lib/awx/projects directory is fully owned by the awx user.
$ ls -la /var/lib/awx/projects/
total 4
drwxr-xr-x. 2 awx awx 6 Dec 19 16:01 .
drwxr-xr-x. 9 awx awx 4096 Dec 20 10:38 ..
Has anyone ever experienced this? What's the way to fix it? Thanks!
You've got SElinux enabled and blocking access to the file. Notice the dot at the end:
drwxr-xr-x.
Check the details with ls -Z /var/lib/awx/projects/.
Refer to SELinux - Contexts Labeling Files. Also this answer on Unix.SE might be of help.
Related
I just wanted to export a project for android and here is this error.
How to fix this problem?
error code:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/android.rpy", line 507, in <module>
File "game/mobilebuild.rpy", line 204, in call
TypeError: a bytes-like object is required, not 'str'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "launcher/game/android.rpyc", line 505, in script
File "C:\renpy-8.0.0-sdk\renpy\ast.py", line 1111, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\renpy-8.0.0-sdk\renpy\python.py", line 1049, in py_exec_bytecode
exec(bytecode, globals, locals)
File "game/android.rpy", line 507, in <module>
File "C:\renpy-8.0.0-sdk\rapt\buildlib\rapt\install_sdk.py", line 356, in install_sdk
check_java(interface)
File "C:\renpy-8.0.0-sdk\rapt\buildlib\rapt\install_sdk.py", line 52, in check_java
if not run_slow(interface, plat.javac, plat.path("buildlib/CheckJDK8.java"), use_path=True):
File "C:\renpy-8.0.0-sdk\rapt\buildlib\rapt\install_sdk.py", line 37, in run_slow
interface.call(args, cancel=True, **kwargs)
File "game/mobilebuild.rpy", line 204, in call
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/traceback.py", line 163, in print_exc
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/traceback.py", line 105, in print_exception
TypeError: a bytes-like object is required, not 'str'
Windows-10-10.0.18363 AMD64
Ren'Py 8.0.0.22062402
Ren'Py Launcher 8.0.0.22062402
Fri Jul 1 02:39:10 2022
I see output like:
ERROR:duckietown_challenges:evaluation: weird exception: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/zuper_nodes_wrapper/wrapper_outside.py", line 62, in __init__
os.mkfifo(fnin)
FileExistsError: [Errno 17] File exists
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/duckietown_experiment_manager/experiment_manager.py", line 34, in wrap
asyncio.run(main(cie, logdir, attempts), debug=True)
File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/site-packages/duckietown_experiment_manager/code.py", line 211, in main
sim_ci = ComponentInterface(
File "/usr/local/lib/python3.8/site-packages/zuper_nodes_wrapper/wrapper_outside.py", line 65, in __init__
raise Exception(msg) from e
Exception: Cannot create fifo /fifos/simulator-in
This is running inside of a container so I'm not sure why or how I can control the existence or absence of this file.
The solution is to remove the volume, for example with
docker system prune --volumes
Team, im getting permission denied error [Errno 13] Permission denied while extracting spark package (2.1.0) in local installation. I have admin access to folders and verified in Security as well. Any pointers will be helpful
Environment details
OS - **Windows 7**
(C:\conda) C:\conda>conda --version
**conda 4.3.30**
(C:\conda) C:\conda>python --version
**Python 3.6.3 :: Anaconda, Inc.**
(C:\conda) C:\conda>jupyter --version
**4.3.0**
(C:\conda) C:\conda>pip --version
**pip 9.0.1** from C:\conda\lib\site-packages (python 3.6)
From anaconda terminal - jupyter pixiedust install
←[32;1mStep 1: **PIXIEDUST_HOME**: C:\conda\pixiedust-master←[0m
Keep y/n [y]? **y**
←[32;1mStep 2: **SPARK_HOME**: C:\conda\pixiedust-master\bin\spark←[0m
Keep y/n [y]? y
←[32;1mDirectory C:\conda\pixiedust-master\bin\spark does not contain a valid SPARK install←[0m
**Download Spark** y/n [y]? y
←[32;1mWhat version would you like to download? 1.6.3, 2.0.2, 2.1.0, 2.2.0 [2.2.0]: ←[0m**2.1.0**
F 82%
F 100%
Error Details - Below
←[FExtracting Spark 2.1.0 to C:\conda\pixiedust-master\bin\spark
Traceback (most recent call last): File "c:\conda\lib\runpy.py",
line 193, in _run_module_as_main
"main", mod_spec)
File "c:\conda\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\conda\Scripts\jupyter-pixiedust.EXE__main__.py", line 9,
in
File "c:\conda\lib\site-packages\install\pixiedustapp.py", line 41,
in main
PixiedustJupyterApp.launch_instance()
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 296, in initialize
self.parse_command_line(argv)
File "", line 2, in parse_command_line
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 514, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "", line 2, in initialize_subcommand
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 452, in initialize_subcommand
self.subapp.initialize(argv)
File "", line 2, in initialize
File "c:\conda\lib\site-packages\traitlets\config\application.py",
line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\conda\lib\site-packages\jupyter_core\application.py", line
239, in initialize
self.parse_command_line(argv)
File "c:\conda\lib\site-packages\install\createKernel.py", line 150,
in parse_command_line
self.download_spark(silent, silent_spark_version)
File "c:\conda\lib\site-packages\install\createKernel.py", line 409,
in download_spark
self.extract_temp_file(temp_file, self.spark_home)
File "c:\conda\lib\site-packages\install\createKernel.py", line 478,
in extract_temp_file
tar = tarfile.open(temp_file.name, "r:gz")
File "c:\conda\lib\tarfile.py", line 1586, in open
return func(name, filemode, fileobj, **kwargs)
File "c:\conda\lib\tarfile.py", line 1633, in gzopen
fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj)
File "c:\conda\lib\gzip.py", line 163, in init
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
PermissionError: [Errno 13] Permission denied: 'C:\Temp\tmpnt0i718r.tgz'
Unfortunately, Windows is not a supported platform by the PixieDust install script as mentioned in the PixieDust site documentation: https://ibm-watson-data-lab.github.io/pixiedust/install.html.
As a workaround I suggest to use a docker container with Linux or MacOS.
I'm currently putting together a temperature sensor for my Raspberry Pi and ran into this issue. In order to run the driver designated in the code, I had to run it was a shell command. I'm having a difficult time figuring out why my syntax is incorrect.
Code:
def read_dht22( PiPin ):
output = subprocess.check_output([shell=True], ['/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit__DHT_Driver", "2302", str(PiPin)])
Error:
sudo python scr6.py
File "scr6.py", line 31
output = subprocess.check_output([shell=True], ['/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_DHT_Driver', '2302', str(PiPin)])
^
SyntaxError: invalid syntax
Error Prior to Adding shell=True
sudo python scr5.py
Traceback (most recent call last):
File "scr5.py", line 46, in <module>
temp_c, temp_f = read_dht22(4)
File "scr5.py", line 31, in read_dht22
output = subprocess.check_output(["/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_DHT_Driver", "2302", str(PiPin)])
File "/usr/lib/python2.7/subprocess.py", line 537, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
This should fix your syntax error:
def read_dht22( PiPin ):
output = subprocess.check_output(["/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit__DHT_Driver", "2302", str(PiPin)], shell=True)
I got this Error if i want to Setup the Datastax Cassandra Cluster (Community Edition), i have used this:
http://www.datastax.com/docs/1.2/install/install_ami
[EXEC] 06/05/13-10:52:05 sudo rm -rf /etc/motd
[EXEC] 06/05/13-10:52:05 sudo touch /etc/motd
[INFO] Started with user data set to:
[INFO] --clustername myDSCcluster --totalnodes 3 --version community
[INFO] Using instance type: m1.large
[ERROR] Exception seen in ds1_launcher.py:
Traceback (most recent call last):
File "/home/ubuntu/datastax_ami/ds1_launcher.py", line 31, in initial_configurations
ds2_configure.run()
File "/home/ubuntu/datastax_ami/ds2_configure.py", line 932, in run
File "/home/ubuntu/datastax_ami/ds2_configure.py", line 125, in get_ec2_data
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
It seems as though you may have attempted to launch the cluster within a VPC, which isn't supported.
I did, however, notice that we don't specifically mention that VPC's aren't supported. I'll make sure we get that fixed.