Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
189,039


When you are executing Software Provisioning Manager tool or if you manually run sapcontrol command, you can face an issue like below:

Execution of the command "/usr/sap/<SID>/SYS/exe/sapcontrol -nr 00 -host abcde -function GetInstanceProperties" finished with return code 1. Output:


<date> <time>


GetInstanceProperties


FAIL: NIECONN_REFUSED (Connection timed out), NiRawConnect failed in plugin_fopen()


Usually, this issue happens because sapstartsrv is not properly running. Below, you can see some steps to follow in order to solve this issue:

  1. Make sure /usr/sap/sapservices does exist on your system. If not, please follow as described in SAP note below:
    823941  - SAP start service on Unix platforms 

  2. Run command ps -ef | grep sapstartsrv and check if the the service is running for the instance. sapstartsrv must be pointing to the start or instance profile (according to the profile configuration of your system);

  3. If it is running, then manually kill the process;

  4. Make sure the sapstartsrv is properly working by running the command sapstartsrv -h as <sid>adm from kernel directory. If it returns all options from help, it means sapstartsrv command is working. Otherwise, it means it has issues and you must patch your kernel.


  5. If sapstartsrv is properly working, manually run the command above as <sid>adm from kernel directory:
    ./sapstartsrv pf=/sapmnt/<SID>/profile/<start or instance profile> -D


  6. After that, run the command below and check if the issue still persists:
    /usr/sap/<SID>/<instance>/exe/sapcontrol -prot NI_HTTP -nr <inst number> -function GetInstanceProperties


  7. Does the NIECONN_REFUSED error remains? If so, then make sure all hosts are properly set in the /etc/host file.

  8. If no error returns, it means the issue is not occurring any more and you will be able to continue the installer.


13 Comments
Former Member

Dear Henrique,

 

Very nice blog.

 

I want to add something more , If we run the below command with -D argument then we will not able to see the exact error with sapstartsrv service.

 

./sapstartsrv pf=/sapmnt/<SID>/profile/<start or instance profile> -D


If you really want to see the errors which causing problem then we need to run the command without -D argument at os level.


With Regards

Ashutosh Chaturvedi

Former Member
0 Kudos

Hi Ashutosh,

 

In fact, my intention was only starting up the sapstartsrv, this is why I recommended putting -D parameter, but thank you for this feedback, I will update the blog

 

Regards,

Henrique Girardi

Former Member
0 Kudos

Hi Henrique,

 

Very Nice blog..

 

I would add 2 more steps between your point no.3 and 4 to make it more useful.

 

a) We need to copy the command for sapstartsrv by process viewing

(ps -ef|grep sapstartsrv) for future.

 

b) Check the directory /sapmnt/<SID>/global/sapcontrol for multiple log files having some numbers_portno._<Instance no._hostname

Those need to be removed for a particular instance which is not getting started or identified.

And run the earlier copied sapstartsrv command for particular instance.

 

In nut shell, there should be only 1 log file for each instance and central services, etc.

 

You can also find the exact root cause of the problem with below debug option:

 

/usr/sap/<SID>/<instance>/exe/sapcontrol -prot NI_HTTP -nr <inst number> -function GetInstanceProperties -debug

 

 

Regards,

Manaswi Srivastava

jorge_velasquez
Contributor
0 Kudos
Hi,

I am having this error and also startsap shows this:

 

 

solmandes:scdadm 84> startsap
Checking syb Database
Database is running
-------------------------------------------
Starting Startup Agent sapstartsrv
/usr/sap/SCD/SYS/exe/uc/linuxx86_64/startsap: line 3171: 8271 Segmentation fault $_SAPSTARTSRV pf=$_PROFILE -D >> $LOGFILE 2>&1
FAIL: Timeout
Startup of Instance Service failed
See /home/scdadm/startsap_SCS02.log for details

 

Any clue?
0 Kudos
Very good documentation, I changed the /etc/hosts file and it took me a long time to get it ready. Thanks
hemant_gade2
Explorer
0 Kudos
Very nice and clear explaination.

 

Thanks this work out in our scenario

 

BR

Hemant
Dear All,

I am the new SAP Hana. Can you help to include Picture of each your step? So it is easy for newest one like me easy to noted.

Thanks
former_member653182
Discoverer
0 Kudos
Hi everybody! I'm new to SAP S4 HANA, and when I trying switch on the system i get the same message. i would be glad if someone can include Picture of each your step.
sankar_27
Active Participant
0 Kudos

Adding other solutions to resolve “FAIL: NIECONN_REFUSED (Connection timed out), NiRawConnect failed in plugin_fopen()

1.rename the agent.lock file so a new file can be created – /usr/sap/SID/DVEBMGSXX/log/sapccm4x 2.disable the integrated CCMS Agent included in the sapstartsrv program by adding the following parameter to the instance profile:

ccms/enable_agent = 0

After adding the parameter the sapstartsrv for this instance should be restarted in case it is running.

Thanks, Sankar

 

0 Kudos
Hi Jorge,

 

How  did you overcome this issue?

 

Regards,

Manoj Somkuwar
tyler_brady
Discoverer
0 Kudos
Very helpful. Thank you!
MohanB
Explorer
0 Kudos
It worked like a charm for me today.

Thanks
staerk
Participant
0 Kudos

I could resolve this error for me by disabling SELinux. Set it to disabled in /etc/selinux/config and reboot. Then, sapstartsrv will come up ok and you will not see the error message any longer. SELinux stands for "Security Enhanced Linux", so, do this at your own peril.