Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno 2] No such file or directory #90

Open
ChadOhman opened this issue Jan 12, 2020 · 8 comments
Open

OSError: [Errno 2] No such file or directory #90

ChadOhman opened this issue Jan 12, 2020 · 8 comments

Comments

@ChadOhman
Copy link

ChadOhman commented Jan 12, 2020

Hi!

I'm not super versed in python, so you'll have to forgive me...

Got things up and running, however I'm facing this error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/chad/autowx2/autowx2_functions.py", line 722, in mainLoop
    while not runTest():
  File "/home/chad/autowx2/autowx2_functions.py", line 268, in runTest
    stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/chad/autowx2/autowx2_functions.py", line 722, in mainLoop
    while not runTest():
  File "/home/chad/autowx2/autowx2_functions.py", line 268, in runTest
    stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Logfile: 2020-01-12.txt

Has anyone seen this before? Is this normal?
Also, how do you change what IP the flask server is listening on? Trying to access the webserver from another device returns a "refused to connect".

Thanks!

@SA7BNT
Copy link
Contributor

SA7BNT commented Jan 13, 2020

Try to reboot your system. Or change the port from flask before you start autowx2.py

webInterfacePort = 5010

@ChadOhman
Copy link
Author

ChadOhman commented Jan 13, 2020

Thanks for your reply, @SA7BNT.

Changing the port didn't work to get the flask server up - however I'm not seeing the error I was seeing before anymore. I think it's listening on localhost so it won't accept traffic on eth0.

Flask seems to be running in debugging mode - I'm not familiar with Flask at all, how do I take it out of debug mode?

@SA7BNT
Copy link
Contributor

SA7BNT commented Jan 13, 2020

You may try to install lighttpd or apache2.
Then point the autowx2 config to your page

# where to place the www data (static html pages)

Maybe that will help you

@ChadOhman
Copy link
Author

Thanks. Installed apache2, pointed autowx2 to /var/www/html, and nada.
Manually copied autowx2/var/www/ to the apache2 web root and while that did create content, I've noted all of the referenced elements on the page have an extra / in front of them. I tried stripping out all of them but something doesn't seem right. I don't know if this is the solution.

@ChadOhman
Copy link
Author

ChadOhman commented Jan 13, 2020

Update: used nginx reverse proxy - I now have a functioning webserver! :) I'm going to go ahead and close this. Thanks for your help!

@ChadOhman ChadOhman reopened this Jan 13, 2020
@ChadOhman
Copy link
Author

ChadOhman commented Jan 13, 2020

Just kidding - I can't view the table - the hyperlink is pointed to http://server/table - not table.html. pointing to table.html gives me a 404 though the file exists in var/www/. Interesting. Polling is also returning a 400, pointing to /socket.io/?EIO=3&transport=polling&t=M-T_x_-&sid=0a1ecc1616ab4fd2a2b78bba53099303... etc.

@SA7BNT
Copy link
Contributor

SA7BNT commented Jan 13, 2020

OK. The config on my side is pointing at /var/www/
Take a look inside autowx2 there you will see a map var/www/
Inside this there will be your DashBoard. I just pointing symlinks to this map and all was running fine at my side.

sa7bnt@owncloud:/var/www/html/autowx2$ ls -lisa
insgesamt 12
390981 4 drwxrwxr-x 3 www-data www-data 4096 Apr 19 2019 .
390984 4 drwxrwxr-x 44 www-data www-data 4096 Jan 13 02:00 ..
398943 0 lrwxrwxrwx 1 www-data www-data 32 Nov 21 2018 css -> /home/sa7bnt/autowx2/var/www/css
390986 0 lrwxrwxrwx 1 www-data www-data 39 Nov 21 2018 index.html -> /home/sa7bnt/autowx2/var/www/index.html
390991 0 lrwxrwxrwx 1 www-data www-data 38 Nov 21 2018 index.tpl -> /home/sa7bnt/autowx2/var/www/index.tpl
398891 0 lrwxrwxrwx 1 www-data www-data 42 Nov 21 2018 nextpass.html -> /home/sa7bnt/autowx2/var/www/nextpass.html
398893 0 lrwxrwxrwx 1 www-data www-data 41 Nov 21 2018 nextpass.png -> /home/sa7bnt/autowx2/var/www/nextpass.png
398901 0 lrwxrwxrwx 1 www-data www-data 46 Nov 21 2018 noaa_dirlist.html -> /home/sa7bnt/autowx2/var/www/noaa_dirlist.html
398921 0 lrwxrwxrwx 1 www-data www-data 39 Nov 21 2018 recordings -> /home/sa7bnt/autowx2/var/www/recordings
398927 0 lrwxrwxrwx 1 www-data www-data 39 Nov 21 2018 table.html -> /home/sa7bnt/autowx2/var/www/table.html
415504 4 drwxr-xr-x 2 sa7bnt sa7bnt 4096 Apr 19 2019 wiki_bilder
sa7bnt@owncloud:/var/www/html/autowx2$

@Eric738
Copy link

Eric738 commented Aug 20, 2020

hello Chad
when you use nginx reverse onwhich file or directory are you pointing to in the nginx configuration file? and flask becomes what? Thank you for the info

eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants