MarcoMC Tech, Cuisine, Traveling…my hobbies, my life

February 24, 2011

WordPress 3.1 update: “Could Not Open the Page, Too Many Redirects”

Filed under: IT,Troubleshooting — Tags: , , , , — marcomc @ 06:12

This morning after upgrading my blog to WordPress 3.1 the front side of my blog suddently stopped working.
All my browsers got stuck trying to load www.marcomc.com and Mobile Safari on my iPad and my iPhone was complaining about: “Could Not Open the Page, Too Many Redirects”.

After 1 minute digging the problem on wordpress.org I found the fix at this thread:

https://wordpress.org/support/topic/windows-server-infinite-redirect-after-upgrading-to-31?replies=35

I was still able to access the admin back-end fortunately, just in time to apply this nice plug-in that fix the problem:

Permalink Fix & Disable Canonical Redirects Pack

Apparently this problem is limited to WordPress residing on Windows based hosting. Guess what my hosting is then 😉

January 17, 2011

How-To flush the DHCP server lease cache

Filed under: How-To,IT,Linux,Troubleshooting — Tags: , , , , — marcomc @ 17:27

On a GNU/Linux server locate the files  dhcpd.leases and dhcpd.leases~
Mine is a Debian so the location is /var/lib/dhcpd3/ .

  1. delete the temporary file dhcpd.leases~:
    $ sudo rm dhcpd.leases~
  2. flush the lease cache dhcpd.leases:

    $ sudo echo "" > dhcpd.leases

the next time the clients will request a lease they will probably obtain a different IP respect the one they had before.

October 16, 2010

What to do if the AFP service needs to be restarted periodically?

Filed under: Apple & Mac,IT,Troubleshooting — Tags: , , — marcomc @ 15:39
Listen to me!
Audio MP3
download mp3

Recently, after upgrading my Mac Mini Core 2 Duo (turned into server) to Snow Leopard Server 10.6.4, I started experiencing a very annoying problem, the AFP service was periodically stopping to share the chosen folders (Shared Points) to the clients.

I noticed that this is sometimes related with the server resources and performance.
For instance the AFP may stop working properly during intensive file transfer such remote backup via TimeMachine or when another service is keep the CPU at 100% usage.
It especially happens in my MacMini as the RAM is limited to only 1GB and then a lot of disk activity is generated for swapping.

Basically the service is not crashed or discontinued, the AFP server process is still running and still allows the users to log in from any workstation connected, the problem is that once logged in the users is able to see only its own home folder but all the other Shared Points configured in the Server Admin control panel are not listed.q

The solution has been for a long while to periodically monitor the service and when I noticed the misbehaviour I restarted the service and in a few second the users were able to connect to all the shared points again.

I wasn’t happy with this inelegant solution, so when I had a little of spare time I investigated better the problem and I found an old thread on the Apple Support page, it was describing the same issue performing on Leopard server 10.5 series:

https://discussions.apple.com/message.jspa?messageID=6145016

Apparently for the Leopard server the solution is a little tricky and involve a script that periodically toggle the Guest Account access option.

Then the idea, EUREKA! CARAMBA! I had a little check and I found that for security reasons I disabled the access for the Guest Account.

The Solution has been quite fast, I enabled again the Guest Access to the AFP service from the Server Admin, AFP service, Settings panel, Access tab (as shown in the picture below). This fix is still woking for me and the service never stopped again!

AFP_Settings_Access_GuestAccess

AFP_Settings_Access_GuestAccess_Toggle

Anyway I wanted to prevent access to the Shared Points of the AFP services to the Guest Account so I disable the Guest Account specifically for each Shared Point.

From the Server Admin, AFP service, Shared Point panel, I selected the Shared Points individually, I accessed the Protocol Options and I disabled the Guest Access toggle (as shown in the picture).

AFP SharedPoint GuestAccess Toggle

AFP SharedPoint GuestAccess Toggle

Doing so I allow the Guest Access to log in to the AFP service but I prevent it to use any Shared Point (shared directory). For further security it’s possible to limit the access to the AFP service to a selected number of user groups (they must NOT include the Guest account as their member) through the Services Access settings of the Server Admin tool, according to my experience this is as a ‘best practice’ operation that we should apply in most of the AFP servers we set up.

Please feel free to reply this thread if you have found better solutions to this issue.

May 23, 2010

Resetting the Firewall to the Default Setting in Mac OS X Server 10.6

A server can become unreachable for remote administration due to an error with the firewall configuration. In such a case, you must reset the firewall to its default state so Server Admin can access the server.

This recovery procedure requires you to use the command-line interface and must be done by an administrator who has physical access to the server.

To reset the firewall to its default setting:

  1. Disconnect the server from the Internet.
  2. Restart the server in single-user mode by holding down the Command–s keys during startup.
  3. Remove or rename the address groups file found at /etc/ipfilter/ip_address_groups.plist.
  4. Remove or rename the ipfw configuration file found at /etc/ipfilter/ipfw.conf.
  5. Force-flush the firewall rules by entering the following in Terminal:
  6. $ ipfw -f flush
  7. Edit the /etc/hostconfig file and set IPFILTER=-YES-.
  8. Complete the startup sequence in the login window by entering exit:
    the computer starts up with the default firewall rules and firewall enabled. Use Server Admin to refine the firewall configuration.
  9. Log in to your server’s local administrator account to confirm that the firewall is restored to its default configuration.
  10. Reconnect your host to the Internet.
« Newer Posts

Powered by WordPress