Apache Won't Start, Encodings cannot be found - python-3.x

There are a lot of similar questions noting that they could not get Apache (2.4) started due to improperly created "PYTHONHOME" and "PYTHONPATH" variables.
I have installed mod_wsgi, I am using python 3.8.0, I am on Windows 10 x64 and have x64 bit installations of all my modules. When I start Apache, though, (httpd -k start, restart) the service does not start. I tried manually doing the same in the services tab of Task Manager, it also immediately stopped after I tried to run Apache.
Looking in the logs, it seems my issue is also related to the aforementioned variables, however in other peoples' cases, they were advised to remove the variables whereas it seems mine are not set to anything in the first place. I had read that setting these variables inadvertently masks system variables, but that does not seem to be the case for me.
The most explicit error in the logs seemed to be of the "encodings" module not being found. I have attached a screenshot of the log below.
Can anyone help me get Apache24 running?
P.S. I am using Apache Haus Distribution, I believe the name of the installation I have is.
Error.log Report

Yes, this error is reported when PYTHONHOME does not have a valid Python installation.
This answer may help: https://stackoverflow.com/a/69949005/2850706

Related

ghci only loads with admin

I've been trying to install Haskell platform with chocolatey but have been unable to get it working without running the command prompt as an administrator.
When I do so normally it just states that "ghci is not recognized as an internal or external command", but when I do so with admin privileges' it works fine.
I looked at this thread and attempted to add the pthread.dll file to my system but this seemed to just make the program run worse as admin. I'm confused why something that should be so basic as setting up a programming language is giving me so much headache
Ok, managed to fix it by making an environment variable directly to my C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.10.3\bin location.
I thought making an environment variable to C:\ProgramData\chocolatey\ would have been sufficient but clearly not. Weird too as Chocolatey added many of its own environment variables but not one that pointed to gchi

Upgraded Ubuntu 18.04 to 20.04 and JupyterLab won't respect my config file

I've had jupyterlab running on this Ubuntu machine for over a year, never really had any issues with it. I had created a configuration file that forced a password, specified cert and key files, listened on any interface (since it's not exposed anywhere but my LAN), possibly one or two other tweaks. JL was also started at boot with systemd.
I upgraded from Ubuntu 18.04 to 20.04 today and suddenly, JL will not honor my configuration file. It's listening on localhost only, no password protection, https doesn't respond, even simple port modifications don't get applied.
I disabled the systemd service and started troubleshooting manually; literally making no progress at all. I backed up my config file and ran the command to create a new one. With the new config file, all I changed was the port. Started JL manually and it listens on the default port of 8888. I launch JL with the --config=[full path] and it still completely ignores it. I thought maybe it was a permissions issue, but the config file has the right owner and group (same as it's always been as far as I know) and it's 644 so I would assume all should be good there, not to mention, I created a whole new file. I even went so far as to remove all jupyter packages via pip3 and reinstall, no joy.
So it seems to me the config file is being ignored no matter what I do. When I manually run it, I really don't get much information, i.e. I'm not getting an error that says "failed to read configuration file, falling back to defaults" or anything like that. These 2 warnings are all that comes up when I run it manually:
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.4) or chardet (4.0.0) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
/home/buee/.local/lib/python3.8/site-packages/jupyter_server/transutils.py:13: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
warnings.warn(warn_msg, FutureWarning)
But I'm pretty sure I caused this myself in the troubleshooting process.
Anyone have any ideas? Am I looking at a bug or pebkac?
Assuming that your current version is 3.x, and you previous version was 2.x you need to migrate the configuration files to new locations, as there was a change to the underlying infrastructure (which will help in maintenance and give you more benefits down the line in the future), mostly:
renaming jupyter_notebook_config.py file to jupyter_server_config.py, and
renaming c.NotebookApp traits to c.ServerApp;
in addition, some traits may be deprecated or moved to more appropriate apps (e.g. LabApp/ServerApp etc); follow run-time messages in the terminal (after opening the app) to adjust your configuration as needed.
See jupyter-server documentation for more details.

Trivial Node.js via Passenger on DreamHost - Permission Denied

I tried setting up a do-nothing Node app, and it failed.
I developed some Node.js code offline in containers. I now want to try deploying it on DreamHost. I am doing it incrementally, adding features one by one. Starting with “Hello World” and going from there.
I set up a new subdomain and enabled Passenger. I was able to serve up an index.html file. I followed https://help.dreamhost.com/hc/en-us/articles/360029083351-Installing-a-custom-version-of-NVM-and-Node-js and installed Node and nvm (using the versions recommended in that artcle). I then installed a few packages I plan to use (most notably Express, the rest won’t come into play until later).
With just a Hello World app, that failed. The error message is below. But, I checked all the relevant files and they all have global read and execute permissions. I’m wondering if it is something else. I tried multiple Hello World examples for app.js, copied directly from different tutorials, none of which worked (but they do work locally). My more complex code also does not work, but that is the next step.
What am I missing? I followed the directions exactly. What other landmines do I have to look forward to? I really don’t want to spend time wrestling with infrastructure, I want it to “just work”, ideally.
An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger. Please read this article for more information about this problem.
Raw process output:
*** ERROR ***: Cannot execute /home/<user name>/.nvm/versions/node/v12.16.3: Permission denied (13)
Unclear what solved the issue.
Ran through changing the permissions on the files, as would seem obvious. Changed '/home/<user name>/.nvm/versions/node/v12.16.3' to '/home/<user name>/.nvm/versions/node/v12.16.3/bin/node' in the .htaccess file. Neither of those seemed to solve it.
Repeated the process again later. Followed it by `touch <webapp directory>/tmp/restart.txt' and it started working. I had been editing files in the web app's directory, so it isn't clear what touching that file did.

Python was not found but can be installed

I have just installed python3.8 and sublime text editor. I am attempting to run the python build on sublime text but I am met with "Python was not found but can be installed" error.
Both python and sublime are installed on E:\
When opening cmd prompt I can change dir and am able to run py from there without an issue.
I'm assuming that my sublime is not pointing to the correct dir but don't know how to resolve this issue.
This isn't a Sublime issue, it's a Windows 10 issue. My Windows 10 boxes don't have this feature so I'm not sure how widely spread it is, but you may want to check out this (seemingly unrelated) question "Permission Denied" trying to run Python on Windows 10.
The general gist from this post is that these new stub redirectors are supposed to direct you into installing some missing applications from the Windows App store and that user-installed versions are supposed to take priority, but depending on how the PATH is modified the system might find the stub versions before your user installed versions.
The currently accepted answer mentions:
The second part of correcting it is to type "manage app execution aliases" into the Windows search prompt and disable the store versions of Python altogether.
It's possible that you'll only need to do the second part, but on my system I made both changes and everything is back to normal now.
In the comments, there are comments from Zooba which further indicate that this is the way to go:
(Microsoft employee and CPython core developer here) You definitely only need to do the second part. There have been a couple of bugs related to upgrading apps resetting aliases which will be fixed in the next stable update, so it should be a one-time fix by then. While you're getting Insiders updates you may need to do it a couple more times.
... And launching the Store is a new feature to help people install Python - if you've added it to PATH using the regular installer it should take precedence over the new redirector, but if not you've discovered above how to disable it.
i had the same problem, so i went to the microsoft store (windos 10) and simply installed "python 3.9" and problem was gone!
sorry for bad english btw

node.js Setup Wizard ended prematurely in windows 10 64bit

For the last 3 days I have been trying to figure out how to install node.js. I tried every solution that I found on the internet, like disabling certain components during installation, installing both x86 and x64 etc, none of them worked.
My OS is Windows 10 x64. I tried different versions of node.js and they all return the same error shown in the screenshot below.
I tried installing through the command line and got the log. But I could not find anything useful from the log either. Please help.
The log can be found here: this path : https://drive.google.com/open?id=1OkkK36hlQeBX0xTNuOuilGaNr1u3S55e
MSI (s) (74:88) [20:49:45:955]: Executing op: ActionStart(Name=RegisterEventManifest,,)
MSI (s) (74:88) [20:49:45:961]: Executing op: CustomActionSchedule(Action=RegisterEventManifest,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="wevtutil.exe" im "C:\Program Files\nodejs\node_etw_provider.man")
MSI (s) (74:A0) [20:49:45:969]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI33C1.tmp, Entrypoint: CAQuietExec
CAQuietExec: Error 0xc0000409: Command line returned an error.
This is the relevant part of the log and where the install keels over, noise removed. 0xc0000409 is very, very nasty. STATUS_STACK_BUFFER_OVERRUN is a stack corruption error, triggered by code that protects against viral attacks.
Searching for "nodejs install 0xc0000409" takes you to this bug report, notable from December 2015. This issue has been dogging users for a long time, but they are having trouble finding the root cause. The generic workaround is to disable this install step by disabling the installation of the ETW performance counters.
Which works, but is but a band-aid. I think macario1983's comment points at the real troublemaker. It got a lot of helpful votes in just two days. And points at the kind of viral rootkit that programmer's voluntarily install, the kind that can so easily cause a STATUS_STACK_BUFFER_OVERRUN error with no decent way to identify the code that causes it. Anti-malware has become a cure that is worse than the disease, Avast in particular is a truly awful product and does not belong on a programmer's machine.
So decent advice is to 1: disable the anti-malware product before installing Node. 2: get rid of completely if it is Avast. 3: disable the performance counter registration. 4: try the updated installer, patched 4 days ago.
I disabled the AVG antivirus(version 18.4.3056) but not windows firewall and then i was able to install nodejs.
Possible options to solve this:
1. Removing previous installations traces
If you have previous installations, make sure that they were uninstaled completely. If HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{1e2e15d7-3760-470e-8699-b9db5248edd5} record exist in your register, remove it.
2. Disabling Performance Counters
If you don't need Performance counters feature, try to install without it (or maybe even without Event Tracing).
3. Disabling security and giving the full permissions
Clean Temp Folder
Disable your antivirus/firewall for the period of installation.
C:/users/$user/AppData/Local/Temp- Right Click on Temp and go to Properties > select Security Tab > give the user permissions by checking Full Control on permission
Install Node.js
I had today the same problem with Windows 10 64 bit and Node.js 8.11.2: disabling completly Avast just for the time of the installation solved the issue.
I was trying to install Node.js through node-v8.11.2-x64.exe, but it was rolling back every time at the end. The error in the event log was about wevtutil.exe, version 10.0.17134.1
I had the same issue on a Windows 2012R2 server installing node-v8.11.2-x64, and disabled the McAfee anti-virus to no avail. When I went to clean out the TEMP folder as suggested in this thread, I noticed that several files and folders were locked and could not be deleted, so I rebooted the machine (with the anti-virus disabled). After the reboot, I noticed that the locked temp files had been deleted, and I was able to install node.js, including the Performance Counters and Event Tracking options.
I spent one day for that ....Best solutions is download zip example node-v12.16.2-win-x86.zip.

Resources