I'm attempting to reach my rails app located at https://theoremreach.com on my mac but it seems to refuse all connections from my mac OSX Yosemite (tried curl, firefox, chrome, even a webview in an iOS app). If I go to it form any other computer/android/iPhone, it works just fine. So I know the site is up but I cannot get it to load on my mac.
So it seems like a DNS caching error. However, I've tried sudo dscacheutil -flushcache and sudo killall -HUP mDNSResponder and neither did the trick. Any ideas what I should do to clear the cache so I can get to the website?
Edit your hosts /etc/hosts file so it's not pointed locally.
Related
Recently bought a Macbook Pro with macOS Sierra and installed XAMPP version 7.0.31.
After turning on MYSQL, ProFTPD and Apache Web Server, I noticed something when I opened phpmyadmin.
There was an error below saying:
The $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.
Probably, do you get an error like this?
The Solution Process:
First, stop xampp service; /opt/lampp/lampp stop
Then, Go to the installation director of phymyadmin then find its "config.inc.php" file then add $cfg['TempDir'] = '/tmp'; like this
At the end, start xampp service /opt/lampp/lampp start
I am trying to run any GUI container I can on MacOS. With every container I try (firefox, chrome, tor, spotify, etc) I always get the error Error: cannot open display. And it's not specific to the docker run command where I pass the environment flag with my $DISPLAY. When I try to run xhost + I get the same error.
I have a fresh XQuartz installation. It is up and running. I have turned on "allow connections from network" under security. I've tried building my own images and pulling jessie frazelle's images. I do not suspect it is a docker issue or the Dockerfiles. It is something on the host, my laptop. I can't seem to figure out what it is.
MacOS Sierra 10.12.5
Docker 17.12.0 Stable
XQuartz 2.7.11 (xorg-server 1.18.4)
My local's $DISPLAY is set to :0.0
So I finally got this to work. And it seems it was pretty simple. I am not certain how this actually fixes the issue, but now the containers work.
How I fixed it was opening up XQuartz and then opening up the "Terminal" app from the "Applications" menu. Then running the command export DISPLAY=192.168.1.X:0, then xhost +. It outputted something like this "access control disabled, clients can connect from any host". After that I was able to run my docker run commands to launch the desired GUI containers.
I am still uncertain how this works and not running them from my laptops Terminal app, but it worked. It must be something I have set in my local env. Hopefully this helps someone else out who may be running into the same issues.
Based on #Byron's answer, I've found out that I could get it to work by running these 2 commands in the normal terminal:
export DISPLAY=:0
/opt/X11/bin/xhost +
Something weird happen to me, the OS X built-in Apache does not work when the MACOSX upgrades to OS X El Capitan(10.11.1).
I have done a lot of search, but still failed to figure out. Here's the system situation:
When the browser makes a request to http://localhost, it gets nothing but shows Can't connet to server localhost, any idea to solve this problem.
By the way, Apache does work in MACOSX(10.9).
I got this problem fixed by the answer of https://apple.stackexchange.com/questions/211015/el-capitan-apache-error-message-ah00526
Take the operation below, it does work to me:
We are going to the directory /etc/apache2/extra
and take the original http-mpm.conf file back:
sudo mv httpd-mpm.conf httpd-mpm.conf.elcapitan
sudo mv httpd-mpm.conf~orig httpd-mpm.conf
Then we are going to restart Apache service, and it works.
I recently switched hosting services for my domain, and as I've been checking up on it recently, I've noticed that the changes have finished propagating, but my laptop (Mac OS X Mountain Lion, if that helps) still navigates to the old server when I type in the URL.
If I navigate to the page on any other device, it takes me to the new server. How can I reset my laptop's DNS cache? It happens in every browser, as well as displaying the old IP when I ping the domain from Terminal.
Could this have anything to do with my Wi-fi? My other devices are connected to the same network and are not experiencing the same problem.
dscacheutil -flushcache is what you are looking for. There is a manual page on developer.apple.com that describes its usage.
I think that sending a hangup to mDNSResponder is the new solution to flushing the cache though - sudo killall -HUP mDNSResponder should do the trick.
Note This probably should have been asked on http://apple.stackexchange.com instead.
You can save a .scpt file to your desktop for quicker access and simplicity.
open the "Script Editor", add the following command and save to your desktop:
Copy and paste the following line including quotes:
do shell script "sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; say cache flush completed successfully" with administrator privileges
Then simply double-click the file overtime you need to flush :)
This works on El Capitan 10.11.x
Hope this helps!
screenShot
Today I updated to OS X Mountain Lion. I noticed that Apache won't start in MAMP. Nothing new seems to be in the apache log file. Running sudo apachectl -k start in Terminal gives me this:
httpd: Could not reliably determine the server's fully qualified domain name, using Ryan-Smiths-MacBook.local for ServerName
I do have ServerName defined in my httpd.conf file.
I also noticed that "Web sharing" is no longer in the Settings pane... weird.
Any Ideas?
Thanks!
Hi Ryan we had this problem
It turns out the systems own apache is running. We've documented it here http://support.servertastic.com/mamp-not-starting-after-upgrade-to-mountain-lion/
Cheers
Richard
To fix the problem, and to start MAMP apache, you can now refer to: (the above link is broken now.)
https://support.servertastic.com/mamp-not-starting-after-upgrade-to-mountain-lion/
Or simply run the following command:
sudo apachectl stop
In addition if you run into trouble where your mysql no longer will start, try killing the mysql process that may already be running by doing the following:
Open up the program called "Activity Monitor" on your Mac.
Search for a process called “mysqld“.
Click on that process and “Quit Process”
Credits:
http://eliteeternity.com/mysql-server-wont-start-mamp-red-light-mac/
http://forum.mamp.info/viewtopic.php?f=6&t=6149
In MAMP PRO 2.1.1, click Tools > Quit Built-in Apache.
I was able to solve this running OS X 10.8.4 by opening up Activity Monitor, choosing "All Processes" then killing any with "httpd" in the title. After that I was able to start MAMP and both the MYSQL and Apache servers gave the green light!
this one fix my MAMP
Just navigate to /Applications/MAMP/bin/apache2/bin using Finder, and rename envvars to _envvars (yes, just add the underscore). Boom! Done and done.
from codesoap
Had the same problem; no other tricks helped. I found I had an instance with "allow from 127.0.0.1" – removing the IP did the trick. Don't know why.
http://cl.ly/image/253g1L1W472z
The problem with OSX Mountain Lion is that /usr/lib/libpq.5.3.dylib does not exist, but /usr/lib/libpq.5.dylib does.
To fix the issue, open terminal and:
~# sudo ln -s /usr/lib/libpq.5.3.dylib /usr/lib/libpq.5.dylib
just try to modify mamp in httpd.conf with:
LoadModule php5_module /Applications/MAMP/bin/php/php5.5.3/modules/libphp5.so
My solution to the similar problem. I.e. MySQL was running fine from MAMP manager utility. Apache server did not and the "Open start page" was greyed i.e. not working.
It seems that my problem was, that the Apache server was not for one reason or another able to access it's log file apache_error.log in /Applications/MAMP/logs folder. The file seemed to be somehow "stuck" i.e. I was not able to change the access rights to the file with chmod command. Only after I deleted the log file completely and then restarted the MAMP control utility and started there the MySQL and Apache again, everything worked fine.
BR,
Janne
Had the same problem.
I then set the ServerName to localhost and the Listen port to 8080, because 80 was somehow not available (even not as sudo). In my case it seems to have fixed the problem.
If nothing works for you like me, the problem is likely that you ran your MAMP update with MAMP running, then you closed the existing MAMP without stopping your server. All you need to do is restart your machine.