Skip to main content

Posts

Showing posts from February, 2018

ESXi boot process / state storage

itemprop="text"> I've got a standalone ESXi server and I'm having problems with it losing config on reboot. I restored the config from a previous install and it reverts to that every time it's restarted. My current hypothesis is that although the state is correctly being backed up to /bootbank/local.tgz on the hour (it's a USB installation and if I understand autobackup.sh correctly, that's expected behaviour), the boot process is reading from /bootbank/state.tgz . I think this because of the contents of /bootbank/boot.cfg (specifically the modules line) and because the restored config was from a disk installation, rather than USB: ~ # cat /bootbank/boot.cfg kernel=b.z kernelopt= modules=k.z --- s.z --- c.z --- oem.tgz --- license.tgz --- m.z --- state.tgz build

ESXi boot process / state storage

I've got a standalone ESXi server and I'm having problems with it losing config on reboot. I restored the config from a previous install and it reverts to that every time it's restarted. My current hypothesis is that although the state is correctly being backed up to /bootbank/local.tgz on the hour (it's a USB installation and if I understand autobackup.sh correctly, that's expected behaviour), the boot process is reading from /bootbank/state.tgz . I think this because of the contents of /bootbank/boot.cfg (specifically the modules line) and because the restored config was from a disk installation, rather than USB: ~ # cat /bootbank/boot.cfg kernel=b.z kernelopt= modules=k.z --- s.z --- c.z --- oem.tgz --- license.tgz --- m.z --- state.tgz build=4.1.0-381591 updated=2 bootstate=0 Should I swap in local.tgz for state.tgz here (bearing in mind one is an archive and one is an archive of an archive and so need to be treated differently), or is this entry a result

How to run PHP files as another user with Apache and FastCGI?

itemprop="text"> As per older questions, such as href="https://serverfault.com/questions/215261/using-mod-fcgid-instead-of-mod-php">using mod_fcgid instead of mod_php and href="https://serverfault.com/questions/36867/php-as-cgi-or-apache-module">PHP as CGI or Apache Module? (and tangentially some href="https://serverfault.com/questions/22156/what-could-cause-apache2-to-not-run-index-php-files-through-php-fastcgi-handler">other href="https://serverfault.com/questions/110490/local-htaccess-strangely-allowed-running-php-in-cgi-fastcgi-mode-in-apache-under">questions ) I came to an understanding that running PHP as CGI or FastCGI would make my .php files be ran as the owner instead of the apache user (user that runs the Apache). The phpinfo(); function states that Se

How to run PHP files as another user with Apache and FastCGI?

As per older questions, such as using mod_fcgid instead of mod_php and PHP as CGI or Apache Module? (and tangentially some other questions ) I came to an understanding that running PHP as CGI or FastCGI would make my .php files be ran as the owner instead of the apache user (user that runs the Apache). The phpinfo(); function states that Server API = CGI/FastCGI However, when I test the running user it is still apache ie. returns apache . I've also tried what Jeremy Bouse suggested in a question I've mentioned, but the PHP whoami still returns apache . Should the fact that phpinfo's "Server API" equals "CGI/FastCGI" be adequate for regular users to run the php-files as the owner? (Does it even indicate that PHP is not running with mod_php?) Or are there some admin tasks still to be done or something that is probably misconfigured? Answer IMHO the (more recent and) best way to run PHP FastCGI is using PHP-FPM , which among the man

Server raid doesn't boot in the morning

We have a HP Proliant ML350 G6 with integrated sas raid controller. Since 3 days the server starts up in the morning without this raid. All othe HDDs / SDDs are ok. We did install the ServicePack 2014.09, replaced the mainboard-battery and removed the raid battery (looked ugly, like it could be damaged, new one will be inserted when arrived). There is an post error 1796, HP says " 1796-Drive Array – Array Accelerator Not Responding... ...Array Accelerator is temporarily disabled." at this page: href="http://h20564.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c01702138" rel="nofollow noreferrer">http://h20564.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c01702138 After reboot the server is fine. What could be the problem?

Server raid doesn't boot in the morning

We have a HP Proliant ML350 G6 with integrated sas raid controller. Since 3 days the server starts up in the morning without this raid. All othe HDDs / SDDs are ok. We did install the ServicePack 2014.09, replaced the mainboard-battery and removed the raid battery (looked ugly, like it could be damaged, new one will be inserted when arrived). There is an post error 1796, HP says " 1796-Drive Array – Array Accelerator Not Responding... ...Array Accelerator is temporarily disabled." at this page: http://h20564.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c01702138 After reboot the server is fine. What could be the problem?

apache 2.2 - With permissions 775 php error: folder is not writable

itemprop="text"> When running a script I get the following error: 'The folder "x" is not writable.' Folder's permissions are 755. Folder ownership is user:user. PHP runs as apache. When changing group ownership of folder to apache it works, but it's not very practical. Ideal would be if any admin could upload a script which can be executed without problems. What is the commonly accepted/best solution for it? P.S. I run standard clean CentOS 6.x itemprop="text"> class="normal">Answer 775 breaks down like this: first 7 - user read/write/execute second 7 - group read/write/execute last 5 - others read/execute In order for the apache user to be able to write to the folder, it will need write permission, so eith

apache 2.2 - With permissions 775 php error: folder is not writable

When running a script I get the following error: 'The folder "x" is not writable.' Folder's permissions are 755. Folder ownership is user:user. PHP runs as apache. When changing group ownership of folder to apache it works, but it's not very practical. Ideal would be if any admin could upload a script which can be executed without problems. What is the commonly accepted/best solution for it? P.S. I run standard clean CentOS 6.x Answer 775 breaks down like this: first 7 - user read/write/execute second 7 - group read/write/execute last 5 - others read/execute In order for the apache user to be able to write to the folder, it will need write permission, so either it will need to have group perms, ownership of the folder or have full read/write/execute to everyone on the server.

filesystems - Safety of write cache on SATA drives with barriers

I've been reading lately about write caching, NCQ, firmware bugs, barriers, etc regarding SATA drives, and I'm not sure what's the best setting that would make my data safe in case of a power failure. From what I understand, NCQ allows the drive to reorder the writes to optimize performance, while keeping the kernel informed on which requests have been physically written. Write cache makes the drive serve a request much faster, because it doesn't wait for the data to be written to physical disk. I'm not sure how NCQ and Write cache mix here... Filesystems, specially journalled ones, need to be sure when a particular request has been written down. Also, user space process use fsync() to force the flush of a particular file. That call to fsync() shouldn't return until the filesystem is sure that the data is written to

filesystems - Safety of write cache on SATA drives with barriers

I've been reading lately about write caching, NCQ, firmware bugs, barriers, etc regarding SATA drives, and I'm not sure what's the best setting that would make my data safe in case of a power failure. From what I understand, NCQ allows the drive to reorder the writes to optimize performance, while keeping the kernel informed on which requests have been physically written. Write cache makes the drive serve a request much faster, because it doesn't wait for the data to be written to physical disk. I'm not sure how NCQ and Write cache mix here... Filesystems, specially journalled ones, need to be sure when a particular request has been written down. Also, user space process use fsync() to force the flush of a particular file. That call to fsync() shouldn't return until the filesystem is sure that the data is written to disk. There's a feature (FUA, Force Unit Access), which I've seen only on SAS drives, which forces the drive to bypass cache and write direc

HP ProLiant DL380 Gen9 USB keyboard and mouse not working on Windows 2008 install

I am trying to install Windows Server 2008 32bit on a HP ProLiant D380 G9 Server and after legacy boot, at the language select page I don't have mouse and keyboard available. Switched between several mice and keyboards, none of them working. Since I don't have keyboard available, I cannot continue the installation. I don't use a KVM and nothing else is attached to USB ports.

HP ProLiant DL380 Gen9 USB keyboard and mouse not working on Windows 2008 install

I am trying to install Windows Server 2008 32bit on a HP ProLiant D380 G9 Server and after legacy boot, at the language select page I don't have mouse and keyboard available. Switched between several mice and keyboards, none of them working. Since I don't have keyboard available, I cannot continue the installation. I don't use a KVM and nothing else is attached to USB ports.

apache 2.2 - How to use htaccess to rewrite to new base directory for files

itemprop="text"> So I have a subdomain, sub1.example.com, that is mapped to a directory located in the server's root: /subdomains/sub1/httpdocs/ I have another subdomain, sub2.example.com, that is mapped to a different directory: /subdomains/sub2/httpdocs/ It's at a hosting company that won't let me alter Apache conf files. I want to use the .htaccess file to allow sub2 requests to be processed by the files that are located in the sub1 directory. Almost like a symbolic link. I need to preserve the hostname. So href="http://sub2.example.com/test.php" rel="nofollow noreferrer">http://sub2.example.com/test.php would access the same file as http://sub1.example.com/test.php , but the hostnames would be preserved. I tried the following in /subdomains/sub2/httpdocs/.htaccess: Rew

apache 2.2 - How to use htaccess to rewrite to new base directory for files

So I have a subdomain, sub1.example.com, that is mapped to a directory located in the server's root: /subdomains/sub1/httpdocs/ I have another subdomain, sub2.example.com, that is mapped to a different directory: /subdomains/sub2/httpdocs/ It's at a hosting company that won't let me alter Apache conf files. I want to use the .htaccess file to allow sub2 requests to be processed by the files that are located in the sub1 directory. Almost like a symbolic link. I need to preserve the hostname. So http://sub2.example.com/test.php would access the same file as http://sub1.example.com/test.php , but the hostnames would be preserved. I tried the following in /subdomains/sub2/httpdocs/.htaccess: RewriteEngine On RewriteRule ^(.*)$ /subdomains/sub1/httpdocs/$1 but I'm a getting internal server error. Any suggestions? Answer The ^(.*)$ pattern captures the complete path component of the URL which always begins with a / , therefore you should probably remove the la

linux - Mount point with different owner/group permissions?

itemprop="text"> We have a media server where all of our audio, etc. is served out of. A few different servers mount a certain directory on the media server. I noticed though, that depending on which server I'm looking at the files from, the owner/group is different. For example, on the media server, all of the directories are owned by user media . On one of our web servers, all of the directories appear to be owned by the application user. This makes it easy for an application to read and write data to the media server, without having to give 777 permissions to the directory. How is this possible? On CentOS 5 Answer Every file has a ID number for the user and group, for example, 500 . When you say stat FILE or ls -l it, your system will use its own /etc/passwd to map 500 t

linux - Mount point with different owner/group permissions?

We have a media server where all of our audio, etc. is served out of. A few different servers mount a certain directory on the media server. I noticed though, that depending on which server I'm looking at the files from, the owner/group is different. For example, on the media server, all of the directories are owned by user media . On one of our web servers, all of the directories appear to be owned by the application user. This makes it easy for an application to read and write data to the media server, without having to give 777 permissions to the directory. How is this possible? On CentOS 5 Answer Every file has a ID number for the user and group, for example, 500 . When you say stat FILE or ls -l it, your system will use its own /etc/passwd to map 500 to a name - that's why you get a different name on a different system.

performance - Best MySQL cache settings for 8gb RAM dedicated MySQL server using only InnoDB (5gb database)

itemprop="text"> I'm a pretty big noob when it comes to setting up MySQL for performance. And honestly I'm not worried about the fine tuning to squeeze every last bit of performance out of MySQL, but I do know that the most important thing to do that provides some of the best results is setting up caches/buffers correctly. I've tried to keep things simple by using only InnoDB as a storage engine. And I do have a dedicated server for MySQL. It has 8gb of RAM, how should I be allocating that to maximize performance? I'd like to be able to fit my entire database into memory for the best performance. The database is about 5gb. Is this possible? How much memory should I allocate to the query cache? How much to the InnoDB buffer pool? How much for the rest of the computer (i.e. non MySQL related processes)? Et

performance - Best MySQL cache settings for 8gb RAM dedicated MySQL server using only InnoDB (5gb database)

I'm a pretty big noob when it comes to setting up MySQL for performance. And honestly I'm not worried about the fine tuning to squeeze every last bit of performance out of MySQL, but I do know that the most important thing to do that provides some of the best results is setting up caches/buffers correctly. I've tried to keep things simple by using only InnoDB as a storage engine. And I do have a dedicated server for MySQL. It has 8gb of RAM, how should I be allocating that to maximize performance? I'd like to be able to fit my entire database into memory for the best performance. The database is about 5gb. Is this possible? How much memory should I allocate to the query cache? How much to the InnoDB buffer pool? How much for the rest of the computer (i.e. non MySQL related processes)? Etc. Since I'm not using MyISAM I don't really need to put a lot of memory in the key cache correct? Answer This is hard without knowing much about the database its

networking - Why is Mac OSX Lion losing login/network credentials?

Symptoms At work we have OSX 10.7.3 installed and every once in a while I will see the following behaviors: If the the screen is locked, then multiple tries of the same user/pass are not accepted. If the screen is unlocked, then opening a new bash term may yield prompts such as: `I have no name$` or lkyrala$ ssh lkyrala@ah-lkyrala2u You don't exist, go away! Even when our Macs are working normally, everyone here has to log in twice. The first time after boot always fails, but the second time (with the same password, not changing anything, just pressing enter again) succeeds. Weird? Workarounds There are some workarounds that resolve the immediate problem, but don't prevent it from happening again: wait (maybe an hour or two) and the problems sometimes go away by th

networking - Why is Mac OSX Lion losing login/network credentials?

Symptoms At work we have OSX 10.7.3 installed and every once in a while I will see the following behaviors: If the the screen is locked, then multiple tries of the same user/pass are not accepted. If the screen is unlocked, then opening a new bash term may yield prompts such as: `I have no name$` or lkyrala$ ssh lkyrala@ah-lkyrala2u You don't exist, go away! Even when our Macs are working normally, everyone here has to log in twice. The first time after boot always fails, but the second time (with the same password, not changing anything, just pressing enter again) succeeds. Weird? Workarounds There are some workarounds that resolve the immediate problem, but don't prevent it from happening again: wait (maybe an hour or two) and the problems sometimes go away by themselves. kill 'opendirectoryd' and let it restart. (from Apple Support Communities: User ID (not data) deleted suddenly? ) hold the power button to reset the computer UPDATE 10/4/2012 Our net admins suspec

Why is Windows Server 2008 Disk Access Slower than Windows Server 2003?

Why is disk access on Windows Server 2008 3x slower than Windows Server 2003? We are purchasing new hardware for our build servers and may end up with a 6 year old OS because disk access is so slow with Windows Server 2008 and 2008R2. I have performed benchmark tests on clean OS installs on the exact same hardware. The benchmark consists simply of unzipping an 800MB zip file of source files. We use 64bit 7Zip to unzip. Uncompressed the source tree is approximately 3.9GB and consists of 43k files. We then delete the tree via "RD /q /s". Benchmarks: Windows Server 2003 - 2:12 Windows Server 2008 - 5:05 Windows Server 2008 R2 - 6:15 I have tried the test with indexing disabled, but it did not help. Is there a configuration setting I have missed? Write caching is not enabled. My device driver will not allow me to enable writ

Why is Windows Server 2008 Disk Access Slower than Windows Server 2003?

Why is disk access on Windows Server 2008 3x slower than Windows Server 2003? We are purchasing new hardware for our build servers and may end up with a 6 year old OS because disk access is so slow with Windows Server 2008 and 2008R2. I have performed benchmark tests on clean OS installs on the exact same hardware. The benchmark consists simply of unzipping an 800MB zip file of source files. We use 64bit 7Zip to unzip. Uncompressed the source tree is approximately 3.9GB and consists of 43k files. We then delete the tree via "RD /q /s". Benchmarks: Windows Server 2003 - 2:12 Windows Server 2008 - 5:05 Windows Server 2008 R2 - 6:15 I have tried the test with indexing disabled, but it did not help. Is there a configuration setting I have missed? Write caching is not enabled. My device driver will not allow me to enable write caching. I get "The device does not allow its write-caching setting to be changed." No shadows on the system: C:\

virtual machines - Install SQL Server 2017 on Windows 10 Azure VM

itemprop="text"> I have one Azure Windows 10 VM set up as a workstation which has among other things: Visual Studio 2017 Python 2.7 NodeJS SQL Server 2017 When a coworker created a new Windows 10 VM and went to install SQL Server, he got an error. I then created a new Windows 10 VM and attempted to install SQL Server and got the same error. Thinking it had something to do with the VM configuration I chose the original configuration which worked, tried again, and it again failed. Here's the Windows 10 machines we've used Standard D2 v2 (2 vcpus, 7 GB memory): Success Standard DS11 v2 (2 vcpus, 14 GB memory): Fail Standard DS11 v2 (2 vcpus, 14 GB memory): Fail Standard D2 v2 (2 vcpus, 7 GB memory): Fail This is from the install Detail file: />... (01) 2018-01-05

virtual machines - Install SQL Server 2017 on Windows 10 Azure VM

I have one Azure Windows 10 VM set up as a workstation which has among other things: Visual Studio 2017 Python 2.7 NodeJS SQL Server 2017 When a coworker created a new Windows 10 VM and went to install SQL Server, he got an error. I then created a new Windows 10 VM and attempted to install SQL Server and got the same error. Thinking it had something to do with the VM configuration I chose the original configuration which worked, tried again, and it again failed. Here's the Windows 10 machines we've used Standard D2 v2 (2 vcpus, 7 GB memory): Success Standard DS11 v2 (2 vcpus, 14 GB memory): Fail Standard DS11 v2 (2 vcpus, 14 GB memory): Fail Standard D2 v2 (2 vcpus, 7 GB memory): Fail This is from the install Detail file: ... (01) 2018-01-05 18:10:04 Slp: Current SqlServer Connection closed... (01) 2018-01-05 18:10:04 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC. (01) 2018-01-05 18:10:04 Slp: A network-relat

apache 2.2 - How to Check if a SSL Certificate is successfully renewed

itemprop="text"> I have two web servers, one for an intranet and the other for a website. The system specs of the two are almost the same, which is as follows: CentOS 6.5 />LAMP (Apache/2.2.15) + WordPress, which were installed with yum command I am trying to renew their wildcard SSL certificate with a new one, which I recently got from GoDaddy. The zip file sent from GoDaddy includes the followings: c************.crt />gd_bundle-g2-g1.crt gd_intermediate.crt /> The two servers share the same private key (test.key), which I am going to use for the new certificate too. So the 2 steps below is all I did on both servers. (Step 1) Copy the three files above to /etc/pki/tls/certs directory and edit the /etc/httpd/conf/httpd.conf so the keys "SSLCertificateFile" and "SSLCertific

apache 2.2 - How to Check if a SSL Certificate is successfully renewed

I have two web servers, one for an intranet and the other for a website. The system specs of the two are almost the same, which is as follows: CentOS 6.5 LAMP (Apache/2.2.15) + WordPress, which were installed with yum command I am trying to renew their wildcard SSL certificate with a new one, which I recently got from GoDaddy. The zip file sent from GoDaddy includes the followings: c************.crt gd_bundle-g2-g1.crt gd_intermediate.crt The two servers share the same private key (test.key), which I am going to use for the new certificate too. So the 2 steps below is all I did on both servers. (Step 1) Copy the three files above to /etc/pki/tls/certs directory and edit the /etc/httpd/conf/httpd.conf so the keys "SSLCertificateFile" and "SSLCertificateChainFile" point to the new respective file. The file looks like below after editting. SSLEngine on SSLCertificateFile /etc/pki/tls/certs/c************.crt SSLCertificateKeyFile /etc/pki/tls/pri

domain name system - DNS hosting design - should secondary server not be spread over countries, networks etc?

My DNS registrar and DNS provider recently had a long outage, rendering all my domains unusable (email, own+client websites etc). They have 3 DNS server, who are all in the same co-hosting facility! I know just enough about networking to make my spidey-sense supertingle, but not enough to condemn this. Is that not an atrocious design? Should they not have been spread across lines, networks - even continents? href="https://i.stack.imgur.com/nPQaw.png" rel="nofollow noreferrer"> src="https://i.stack.imgur.com/nPQaw.png" alt="enter image description here"> (Source: href="https://help.hover.com/hc/en-us/community/posts/115007805527-After-recent-outage-what-are-you-going-to-do-to-fix-your-network-design-problems-" rel="nofollow noreferrer">https://help.hover.com/hc/en-u

domain name system - DNS hosting design - should secondary server not be spread over countries, networks etc?

My DNS registrar and DNS provider recently had a long outage, rendering all my domains unusable (email, own+client websites etc). They have 3 DNS server, who are all in the same co-hosting facility! I know just enough about networking to make my spidey-sense supertingle, but not enough to condemn this. Is that not an atrocious design? Should they not have been spread across lines, networks - even continents? (Source: https://help.hover.com/hc/en-us/community/posts/115007805527-After-recent-outage-what-are-you-going-to-do-to-fix-your-network-design-problems- )