Wednesday, November 23, 2016

Oracle 12c Pre install script... almost perfect !



When installing Oracle 12c, on a Oracle Linux server, you can perform most of the prerequisites settings by using a cool script:

yum install oracle-rdbms-server-12cR1-preinstall


Problem is that the script fails when started (really, was out of the box / freshly installed from Oracle repos):
oracle-rdbms-server-12cR1-preinstall-verify
/bin/sed: -e expression #1, char 116: unknown command: `3'
/bin/sed: -e expression #1, char 116: unknown command: `3'

Error above can be rectified with the following change ( use ' instead of  " on line 570 )

cp /usr/bin/oracle-rdbms-server-12cR1-preinstall-verify /usr/bin/oracle-rdbms-server-12cR1-preinstall-verify.bak

vi /usr/bin/oracle-rdbms-server-12cR1-preinstall-verify

diff /usr/bin/oracle-rdbms-server-12cR1-preinstall-verify /usr/bin/oracle-rdbms-server-12cR1-preinstall-verify.bak
<             ${SED} -i /'^#[[:space:]]*$COMMENT'/d ${LIMITSFILE}
---
>             ${SED} -i /"^#[[:space:]]*$COMMENT"/d ${LIMITSFILE}
570c570
<           ${SED} -i /'^#[[:space:]]*$COMMENT'/d ${LIMITSFILE}
---
>           ${SED} -i /"^#[[:space:]]*$COMMENT"/d ${LIMITSFILE}


Then you can use the script that saves you time for settings a lot of parameters needed for prerequisites.


Red Hat RHEL7 - NFS service is down - reboot needed




Problem:
NFS service is down

Logs: 
[16-11-23-10:06:00] [root@servername - ~]
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)


[16-11-23-10:06:02] [root@servername - ~]
systemctl status nfs-server.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2016-11-23 10:06:02 CET; 7s ago
  Process: 11699 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=1/FAILURE)
  Process: 11697 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 11699 (code=exited, status=1/FAILURE)

Nov 23 10:06:02 servernamesystemd[1]: Starting NFS server and services...
Nov 23 10:06:02 sservername rpc.nfsd[11699]: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Nov 23 10:06:02 servername rpc.nfsd[11699]: rpc.nfsd: unable to set any sockets for nfsd
Nov 23 10:06:02 servername systemd[1]: nfs-server.service: main process exited, code=exited, status=1/FAILURE
Nov 23 10:06:02 servername systemd[1]: Failed to start NFS server and services.
Nov 23 10:06:02 servernamesystemd[1]: Unit nfs-server.service entered failed state.
Nov 23 10:06:02 servernamesystemd[1]: nfs-server.service failed.


So checking the rpcbind service:

[16-11-23-10:07:18] [root@servername - ~]
systemctl status rpcbind.service start
● rpcbind.service - RPC bind service
   Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; indirect; vendor preset: enabled)
   Active: failed (Result: start-limit) since Wed 2016-11-23 05:31:58 CET; 4h 35min ago
 Main PID: 1278 (code=exited, status=0/SUCCESS)

Nov 23 05:31:58 servername systemd[1]: Starting RPC bind service...
Nov 23 05:31:58 servername rpcbind[20677]: /sbin/rpcbind: symbol lookup error: /sbin/rpcbind: undefined symbol: libtirpc_set_debug
Nov 23 05:31:58 servername systemd[1]: rpcbind.service: control process exited, code=exited status=127
Nov 23 05:31:58 servername systemd[1]: Failed to start RPC bind service.
Nov 23 05:31:58 servername systemd[1]: Unit rpcbind.service entered failed state.
Nov 23 05:31:58 servername systemd[1]: rpcbind.service failed.
Nov 23 05:31:58 servername systemd[1]: start request repeated too quickly for rpcbind.service
Nov 23 05:31:58 servername systemd[1]: Failed to start RPC bind service.
Nov 23 05:31:58 servername systemd[1]: rpcbind.service failed.



Solution:
actually, a quite big set of update was applied from Red Hat Satellite, and server needed a reboot (even if it was not advertised by Satellite updates summary).
shutdown -r now
As I did not find any related information for the errors above, I quickly write this :)


Friday, February 12, 2016

Visual Studio 2015 - and GNU Make : Path is truncated, while PATH is complete!


Quick view:

Not sure why, but I have 2 path variables: Path and PATH.
PATH is complete and shows no problem.
Path is trimmed after ...Common7\IDE because of the trailing\


Details:
Just a quick note for who may encounter this problem with your bat files when you used to build your program under Visual Studio 2003 2005 2008 or 2010, and start using Visual Studio 2015.

I use a bat script with these 2 lines:
call "%VS140COMNTOOLS%\vsvars32.bat"
make bin

I call GNU make , a windows binary version of it (installed by Unix For Windows: C:\Program Files\unixforwindows\usr\local\wbin\make.exe )

It shows this environment from the Windows command "set" I've put in the Makefile:

Path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86
)\MSBuild\14.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE(STOPS HERE)

PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86
)\MSBuild\14.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C
:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages;etc...


You can see the Path (used by GNU Make) is truncated. PATH (used by other windows tools) is ok.

Problem is this line in :%VS140COMNTOOLS%\vsvars32.bat
@set DevEnvDir=%VSINSTALLDIR%Common7\IDE\


I needed to remove the trailing \ :
@set DevEnvDir=%VSINSTALLDIR%Common7\IDE



Visual Studio 2015 - Win32 release is now wrong / Release changed from Win32 to x86




When this used to work just fine with Microsoft Visual Studio 2003, 2005, 2008 or 2010:
call "%VS90COMNTOOLS%\vsvars32.bat"
devenv xxx.vcxproj /Build "Release|win32"
devenv xxx.vcxproj /Build "Release|x64"

I needed to have this in my script with Microsoft Visual Studio 2015
call "%VS140COMNTOOLS%\vsvars32.bat"
devenv xxx.vcxproj /Build "Release|x86"
devenv xxx.vcxproj /Build "Release|x64"


It's a quick post, if you have question, please post a comment!