Using strace to identify Plesk 10 blank screen problems

Plesk 10 uses its own web server which runs as a process called sw-cp-serverd. This is started by init with a command line that results in the processing being called,

/usr/sbin/sw-cp-serverd -f /etc/sw-cp-server/config

That config directory is where you will find which ports it binds to and the URL re-writes. You should not change the bound port as that can upset other applications.
If you connect to Plesk on port 8443 and you get a blank screen or if you can logon to Plesk and administrative functions are blank then this is due to some problem with that server or the files that it is accessing.

To see what system calls it is doing and so help identify where to look next you can use strace as follows,

sudo straceĀ  -p `ps -C sw-cp-serverd -o pid=` -s 8443 -o mydebugfile.txt

(note using backtics to run the ps command – if you are having trouble finding the backtic on your keyboard then you can do a ps and grep for that process name and then put the process number into that place in the strace command). If strace is not installed on your system (usually isn’t) then you can install it using your usual package manager or if using Ubuntu then I used,

sudo apt-get install strace

Don’t worry about EAGAIN (Resource temporarily unavailable) messages – this is just how it displays for non-blocking I/O when there is no data to read.

The really interesting ones are the connect(socket #..) then the writev(socket #..) and then read(socket #,..), where the socket # is the same socket number that was setup and in the writev() you can see your request with all the browser details and the read() that follows gives the response.

If the read() has a Status: 500 Internal Server Error in it then this won’t come back to your browser screen – which will stay blank.

If this happens then you have an inconsistent Plesk installation and this requires support from someone who knows how the Plesk server works.