LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2014, 04:54 AM   #1
zak100
Member
 
Registered: Jul 2009
Posts: 225

Rep: Reputation: 2
Problem with executing SOAP::Lite program


Hi,
I have downloaded 3 programs from internet:
Hello.pm, hello.cgi and Hello Client. But when i am executing it using:
Code:
perl hw_client.pl SSUET
its giving me following errors:

Code:
[lab6@localhost Sir]$ perl hw_client.pl SSUET
syntax error at hw_client.pl line 9, near "-> proxy"
Execution of hw_client.pl aborted due to compilation errors.
[lab6@localhost Sir]$
The code of Hello.pm is:
Code:
#Hello.pm - simple module
package Hello;
sub sayHello {
shift;
return "Hello " .shift;
}
1;
The code of hello.cgi is:

Code:
#!/usr/bin/perl -w
# hello.cgi
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
->dispatch_to ('Hello::(?:sayHello)')
->handle
;
The code of hw_client.pl is:

Code:
#!/usr/bin/perl -w
# hw_client.pl
use SOAP::Lite;
my $name = shift;
print "\n\nCalling the SOAP server to any hello\n\n";
print "The SOAP Server says: ";
print SOAP::Lite
  -> uri('urn:Example1');
  -> proxy('http://localhost/cgi-bin/helloworld.cgi')
  -> sayHello ($name)
  -> result . "\n\n";
Some body please guide me.

Zulfi.

Last edited by zak100; 09-15-2014 at 05:03 AM.
 
Old 09-15-2014, 10:30 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
I don't known Perl, but I guess you have semicolon in file hw_client.pl which should be deleted at end of this line
Code:
-> uri('urn:Example1');
 
Old 09-15-2014, 11:08 PM   #3
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
Thanks for your response. I am now able to get rid of this error. But now i am getting following message:

Code:
[lab6@localhost Sir]$ perl hw_client.pl SSUET


Calling the SOAP server to any hello

500 Can't connect to localhost:80 (Connection refused) at hw_client.pl line 7.
The SOAP Server says: [lab6@localhost Sir]$
Do i have to start the web server also? Kindly guide me.

Zulfi.
 
Old 09-16-2014, 12:57 AM   #4
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
I have now started webserver (httpd) and stored the hello.cgi file in webserver's directory. But i am still getting the same error.

Code:
[root@localhost Sir]# ls /var/www/cgi-bin
first.pl  hello.pl
[root@localhost Sir]# perl hw_client.pl SSUET


Calling the SOAP server to any hello

500 Can't connect to localhost:80 (Connection refused) at hw_client.pl line 7.
The SOAP Server says: [root@localhost Sir]# cat hw_client.pl
#!/usr/bin/perl -w
# hw_client.pl
use SOAP::Lite;
my $name = shift;
print "\n\nCalling the SOAP server to any hello\n\n";
print "The SOAP Server says: ";
print SOAP::Lite
  -> uri('urn:Example1')
  -> proxy('http://localhost/cgi-bin/hello.pl')
  -> sayHello ($name)
  -> result . "\n\n";

[root@localhost Sir]#
Somebody please guide me with this error.

Zulfi.
 
Old 09-16-2014, 08:58 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,396

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
Try
Code:
netstat -tanp
to check if webserver is listening on localhost (127.0.0.1) port 80.
Check inside the httpd.conf to if it will accept connections.

Check
Code:
iptables -nvL
to check firewall
 
Old 09-17-2014, 03:21 AM   #6
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
I have tried both the commands and they have produced some output. I dont know if its correct or not. Please guide me.

Code:
[root@localhost lab6]# service httpd start
Redirecting to /bin/systemctl start  httpd.service
[root@localhost lab6]# netstat -tanp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      716/rpcbind         
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      718/sshd            
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1573/cupsd          
tcp        0      0 0.0.0.0:42527           0.0.0.0:*               LISTEN      755/rpc.statd       
tcp        0      0 192.168.1.100:53142     173.194.40.133:443      ESTABLISHED 2962/firefox        
tcp        0      0 192.168.1.100:33475     173.194.40.154:80       TIME_WAIT   -                   
tcp        0      0 192.168.1.100:58991     173.194.40.141:80       TIME_WAIT   -                   
tcp        0      1 192.168.1.100:36826     93.184.220.29:80        SYN_SENT    2962/firefox        
tcp        0      0 192.168.1.100:33472     173.194.40.154:80       TIME_WAIT   -                   
tcp        0    175 192.168.1.100:56673     63.245.216.132:443      ESTABLISHED 2962/firefox        
tcp        0      0 192.168.1.100:55549     173.194.67.139:80       ESTABLISHED 2962/firefox        
tcp        0      0 192.168.1.100:33476     173.194.40.154:80       TIME_WAIT   -                   
tcp        0      0 192.168.1.100:33504     173.194.40.154:80       TIME_WAIT   -                   
tcp        0    326 192.168.1.100:56672     63.245.216.132:443      ESTABLISHED 2962/firefox        
tcp        0      0 192.168.1.100:48963     173.194.40.133:80       ESTABLISHED 2962/firefox        
tcp        0      0 192.168.1.100:59247     173.194.40.142:80       ESTABLISHED 2962/firefox        
tcp6       0      0 :::111                  :::*                    LISTEN      716/rpcbind         
tcp6       0      0 :::80                   :::*                    LISTEN      3177/httpd          
tcp6       0      0 :::22                   :::*                    LISTEN      718/sshd            
tcp6       0      0 ::1:631                 :::*                    LISTEN      1573/cupsd          
tcp6       0      0 :::44856                :::*                    LISTEN      755/rpc.statd       
[root@localhost lab6]# iptables -nvl
iptables v1.4.19.1: unknown option "-nvl"
Try `iptables -h' or 'iptables --help' for more information.
[root@localhost lab6]# iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 2218 1319K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
  577 42132 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
   24  3269 INPUT_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   24  3269 INPUT_ZONES_SOURCE  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   24  3269 INPUT_ZONES  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    1    84 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
    8   320 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_IN_ZONES_SOURCE  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_IN_ZONES  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_OUT_ZONES_SOURCE  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_OUT_ZONES  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT 1929 packets, 230K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 3083  330K OUTPUT_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FORWARD_IN_ZONES (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDI_public  all  --  enp0s26u1u1 *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDI_public  all  --  +      *       0.0.0.0/0            0.0.0.0/0           

Chain FORWARD_IN_ZONES_SOURCE (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_OUT_ZONES (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDO_public  all  --  *      enp0s26u1u1  0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_public  all  --  *      +       0.0.0.0/0            0.0.0.0/0           

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_public (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDI_public_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDI_public_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDI_public_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FWDI_public_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_public_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_public_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_external (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDO_external_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_external_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_external_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FWDO_external_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FWDO_external_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_external_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_public (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDO_public_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_public_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_public_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FWDO_public_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_public_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_public_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT_ZONES (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   24  3269 IN_public  all  --  enp0s26u1u1 *       0.0.0.0/0            0.0.0.0/0           
    9   404 IN_public  all  --  +      *       0.0.0.0/0            0.0.0.0/0           

Chain INPUT_ZONES_SOURCE (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_dmz (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_dmz_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_dmz_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_dmz_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_dmz_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW

Chain IN_dmz_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_dmz_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_external (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_external_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_external_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_external_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_external_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW

Chain IN_external_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_external_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_home (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_home_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_home_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_home_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_home_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW

Chain IN_home_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_home_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_internal (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_internal_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_internal_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_internal_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_internal_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW

Chain IN_internal_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_internal_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_public (2 references)
 pkts bytes target     prot opt in     out     source               destination         
   33  3673 IN_public_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   33  3673 IN_public_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   33  3673 IN_public_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_public_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
   15  2865 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW

Chain IN_public_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_public_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_work (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_work_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_work_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_work_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_work_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW

Chain IN_work_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_work_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination         
[root@localhost lab6]#
Kindly some body help me on this.

Zulfi.
 
Old 09-17-2014, 05:30 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,396

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
For start, the netstat shows that httpd is only listening on ipv6
Code:
tcp6       0      0 :::80                   :::*                    LISTEN      3177/httpd
You're likely on using ipv4 see eg
Code:
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      718/sshd
See the httpd.conf file for the 'Listen' directive, as described here https://httpd.apache.org/docs/curren...pm_common.html
 
Old 09-18-2014, 11:41 PM   #8
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
I have made changes in httpd.conf so that it can accept ipv4 connections. The ouutp of two commands you requested is:

Code:
[root@localhost Sir]# netstat -tanp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      776/rpcbind         
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3200/httpd          
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      778/sshd            
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1624/cupsd          
tcp        0      0 0.0.0.0:57828           0.0.0.0:*               LISTEN      812/rpc.statd       
tcp6       0      0 :::111                  :::*                    LISTEN      776/rpcbind         
tcp6       0      0 :::22                   :::*                    LISTEN      778/sshd            
tcp6       0      0 ::1:631                 :::*                    LISTEN      1624/cupsd          
tcp6       0      0 :::42495                :::*                    LISTEN      812/rpc.statd       
[root@localhost Sir]# iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 7056 5190K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    5   324 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
   45  6816 INPUT_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   45  6816 INPUT_ZONES_SOURCE  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   45  6816 INPUT_ZONES  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    2   168 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
    7   280 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_IN_ZONES_SOURCE  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_IN_ZONES  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_OUT_ZONES_SOURCE  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FORWARD_OUT_ZONES  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT 3529 packets, 520K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 7882 1045K OUTPUT_direct  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FORWARD_IN_ZONES (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDI_public  all  --  enp0s26u1u1 *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDI_public  all  --  +      *       0.0.0.0/0            0.0.0.0/0           

Chain FORWARD_IN_ZONES_SOURCE (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_OUT_ZONES (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDO_public  all  --  *      enp0s26u1u1  0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_public  all  --  *      +       0.0.0.0/0            0.0.0.0/0           

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_public (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDI_public_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDI_public_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDI_public_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FWDI_public_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_public_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_public_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_external (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDO_external_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_external_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_external_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FWDO_external_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FWDO_external_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_external_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_public (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 FWDO_public_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_public_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 FWDO_public_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain FWDO_public_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_public_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_public_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT_ZONES (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   26  3632 IN_public  all  --  enp0s26u1u1 *       0.0.0.0/0            0.0.0.0/0           
    9   448 IN_public  all  --  +      *       0.0.0.0/0            0.0.0.0/0           

Chain INPUT_ZONES_SOURCE (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_dmz (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_dmz_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_dmz_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_dmz_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_dmz_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW

Chain IN_dmz_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_dmz_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_external (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_external_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_external_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_external_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_external_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW

Chain IN_external_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_external_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_home (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_home_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_home_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_home_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_home_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW

Chain IN_home_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_home_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_internal (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_internal_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_internal_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_internal_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_internal_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW

Chain IN_internal_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_internal_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_public (2 references)
 pkts bytes target     prot opt in     out     source               destination         
   54  7264 IN_public_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   54  7264 IN_public_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   54  7264 IN_public_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_public_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
   36  6368 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW

Chain IN_public_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_public_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_work (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 IN_work_log  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_work_deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 IN_work_allow  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain IN_work_allow (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW

Chain IN_work_deny (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_work_log (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT_direct (1 references)
 pkts bytes target     prot opt in     out     source               destination         
[root@localhost Sir]#
However i am still getting the same error with my soap::Lite program:
Code:
[lab6@localhost Sir]$ perl hw_client.pl SSUET


Calling the SOAP server to any hello

500 Internal Server Error at hw_client.pl line 7.
The SOAP Server says: [lab6@localhost Sir]$ 

Please guide me how to execute this program.

Zulfi.
 
Old 09-19-2014, 02:02 AM   #9
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
I have tried by disabling firewall also but its giving me the same error:
Code:
[root@localhost Sir]# perl hw_client.pl SSUET


Calling the SOAP server to any hello

500 Can't connect to localhost:80 (Connection refused) at hw_client.pl line 7.
The SOAP Server says: [root@localhost Sir]# systemctl status firwalld.service
firwalld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

[root@localhost Sir]# systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: active (running) since Fri 2014-09-19 02:47:30 EDT; 4min 45s ago
 Main PID: 425 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─425 /usr/bin/python /usr/sbin/firewalld --nofork --nopid

Sep 19 02:47:30 localhost.localdomain systemd[1]: Starting firewalld - dynami...
Sep 19 02:47:30 localhost.localdomain systemd[1]: Started firewalld - dynamic...
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost Sir]# systemctl stop firewalld.service
[root@localhost Sir]# ls
dbprg  hello.cgi  hello.pl  Hello.pm  httpprg  hw_client.pl  soap2.pl
[root@localhost Sir]# perl hw_client.pl SSUET


Calling the SOAP server to any hello

500 Internal Server Error at hw_client.pl line 7.
The SOAP Server says: [root@localhost Sir]# systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: inactive (dead) since Fri 2014-09-19 02:54:31 EDT; 1min 8s ago
  Process: 425 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 425 (code=exited, status=0/SUCCESS)

Sep 19 02:47:30 localhost.localdomain systemd[1]: Starting firewalld - dynami...
Sep 19 02:47:30 localhost.localdomain systemd[1]: Started firewalld - dynamic...
Sep 19 02:54:30 localhost.localdomain systemd[1]: Stopping firewalld - dynami...
Sep 19 02:54:31 localhost.localdomain systemd[1]: Stopped firewalld - dynamic...
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost Sir]# systemctl status httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: active (running) since Fri 2014-09-19 02:54:03 EDT; 2min 28s ago
 Main PID: 2590 (httpd)
   Status: "Total requests: 3; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─2590 /usr/sbin/httpd -DFOREGROUND
           ├─2591 /usr/sbin/httpd -DFOREGROUND
           ├─2592 /usr/sbin/httpd -DFOREGROUND
           ├─2593 /usr/sbin/httpd -DFOREGROUND
           ├─2594 /usr/sbin/httpd -DFOREGROUND
           ├─2595 /usr/sbin/httpd -DFOREGROUND
           └─2613 /usr/sbin/httpd -DFOREGROUND

Sep 19 02:54:03 localhost.localdomain httpd[2590]: AH00558: httpd: Could not ...
Sep 19 02:54:03 localhost.localdomain systemd[1]: Started The Apache HTTP Ser...
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost Sir]#
Some body please guide me how to execute this program.

Zulfi.
 
Old 09-25-2014, 12:20 AM   #10
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
I am now running SOAP::Lite with trace option. I have got following output:
Code:
500 Internal Server Error at hw_client.pl line 6.
the SOAP Server says[lab6@localhost Zulfi]$ cat hw_client.pl
#!/usr/bin/perl -w
use SOAP::Lite;
my $name = shift;
print "\n\n Calling the SOAP Server to say Hello\n\n";
print "the SOAP Server says";
print SOAP::Lite
->uri('urn:Example1')
->proxy ('http://localhost/cgi-bin/hello.pl')
->sayHello($name)
->result . "\n\n";

[lab6@localhost Zulfi]$ !v
vi hw_client.pl
[lab6@localhost Zulfi]$ perl hw_client.pl SSUET
Unquoted string "trace" may clash with future reserved word at hw_client.pl line 2.


 Calling the SOAP Server to say Hello

SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Deserializer::new: ()
SOAP::Parser::new: ()
SOAP::Lite::new: ()
SOAP::Transport::HTTP::Client::new: ()
SOAP::Lite::call: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: sayHello SSUET
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0xf53178)
SOAP::Transport::HTTP::Client::send_receive: POST http://localhost/cgi-bin/hello.pl HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 459
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:Example1#sayHello"

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Body><sayHello xmlns="urn:Example1"><c-gensym3 xsi:type="xsd:string">SSUET</c-gensym3></sayHello></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x14f1388)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
Connection: close
Date: Thu, 25 Sep 2014 05:08:16 GMT
Server: Apache/2.4.10 (Fedora)
Content-Length: 527
Content-Type: text/html; charset=iso-8859-1
Client-Date: Thu, 25 Sep 2014 05:08:16 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1
Title: 500 Internal Server Error

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 root@localhost to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
500 Internal Server Error at hw_client.pl line 6.
SOAP::Lite::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
the SOAP Server says[lab6@localhost Zulfi]$
Some body please guide me.

Zulfi.
 
Old 09-25-2014, 01:58 AM   #11
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
I tried to run it on command line, i got following error:
Code:
Status: 411 Length Required
Complete details are:
Code:
[root@localhost www]# cd cgi-bin
[root@localhost cgi-bin]# ls
hello.pl
[root@localhost cgi-bin]# chmod a+x hello.pl
[root@localhost cgi-bin]# ./hello.pl
Status: 411 Length Required

[root@localhost cgi-bin]# cat hello.pl
#!/usr/bin/perl -w
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
->dispatch_to ('Hello: (?:sayHello)')
->handle

[root@localhost cgi-bin]# setsebool -P httpd_enable_cgi=1
[root@localhost cgi-bin]# ./hello.pl
Status: 411 Length Required

[root@localhost cgi-bin]#
I tried to look the solution on web but i cant understand it. Some body please guide me.

Zulfi.
 
Old 09-25-2014, 02:19 AM   #12
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
The description of error_log and access_log is:
Code:
[root@localhost log]# cd httpd
[root@localhost httpd]# ls
access_log  error_log
[root@localhost httpd]# cat access_log
::1 - - [24/Sep/2014:01:26:58 -0400] "GET / HTTP/1.1" 403 4609 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
::1 - - [24/Sep/2014:01:26:58 -0400] "GET /icons/apache_pb2.gif HTTP/1.1" 200 4234 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
::1 - - [24/Sep/2014:01:26:58 -0400] "GET /icons/poweredby.png HTTP/1.1" 200 3034 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
::1 - - [24/Sep/2014:01:26:58 -0400] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
127.0.0.1 - - [24/Sep/2014:01:36:28 -0400] "POST /cgi-binhelloworld.pl HTTP/1.1" 404 218 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [24/Sep/2014:01:38:37 -0400] "POST /cgi-binhelloworld.pl HTTP/1.1" 404 218 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [24/Sep/2014:01:39:57 -0400] "POST /cgi-binhelloworld.pl HTTP/1.1" 404 218 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [24/Sep/2014:01:40:31 -0400] "POST /cgi-bin/helloworld.pl HTTP/1.1" 404 219 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [24/Sep/2014:01:42:13 -0400] "POST /cgi-bin/helloworld.pl HTTP/1.1" 404 219 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [24/Sep/2014:01:42:48 -0400] "POST /cgi-bin/helloworld.pl HTTP/1.1" 404 219 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [24/Sep/2014:01:44:04 -0400] "POST /cgi-bin/helloworld.pl HTTP/1.1" 404 219 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [25/Sep/2014:00:59:08 -0400] "POST /cgi-bin/helloworld.pl HTTP/1.1" 404 219 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [25/Sep/2014:01:01:31 -0400] "POST /cgi-bin/hello.pl HTTP/1.1" 500 527 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [25/Sep/2014:01:08:16 -0400] "POST /cgi-bin/hello.pl HTTP/1.1" 500 527 "-" "SOAP::Lite/Perl/0.716"
127.0.0.1 - - [25/Sep/2014:01:29:46 -0400] "POST /cgi-bin/hello.pl HTTP/1.1" 500 527 "-" "SOAP::Lite/Perl/0.716"
[root@localhost httpd]# cat error_log
[Wed Sep 24 01:15:00.403390 2014] [core:notice] [pid 2890] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Sep 24 01:15:00.413429 2014] [suexec:notice] [pid 2890] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed Sep 24 01:15:00.423026 2014] [auth_digest:notice] [pid 2890] AH01757: generating secret for digest authentication ...
[Wed Sep 24 01:15:00.424021 2014] [lbmethod_heartbeat:notice] [pid 2890] AH02282: No slotmem from mod_heartmonitor
[Wed Sep 24 01:15:00.426348 2014] [mpm_prefork:notice] [pid 2890] AH00163: Apache/2.4.10 (Fedora) configured -- resuming normal operations
[Wed Sep 24 01:15:00.426366 2014] [core:notice] [pid 2890] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Sep 24 01:26:58.442241 2014] [autoindex:error] [pid 2891] [client ::1:60142] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Sep 24 01:40:31.522342 2014] [cgi:error] [pid 3191] [client 127.0.0.1:45493] script not found or unable to stat: /var/www/cgi-bin/helloworld.pl
[Wed Sep 24 01:42:13.109592 2014] [cgi:error] [pid 3192] [client 127.0.0.1:45494] script not found or unable to stat: /var/www/cgi-bin/helloworld.pl
[Wed Sep 24 01:42:48.205502 2014] [cgi:error] [pid 3193] [client 127.0.0.1:45495] script not found or unable to stat: /var/www/cgi-bin/helloworld.pl
[Wed Sep 24 01:44:04.714623 2014] [cgi:error] [pid 2893] [client 127.0.0.1:45496] script not found or unable to stat: /var/www/cgi-bin/helloworld.pl
[Thu Sep 25 00:58:46.032075 2014] [core:notice] [pid 2532] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Sep 25 00:58:46.050920 2014] [suexec:notice] [pid 2532] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Thu Sep 25 00:58:46.060254 2014] [auth_digest:notice] [pid 2532] AH01757: generating secret for digest authentication ...
[Thu Sep 25 00:58:46.061199 2014] [lbmethod_heartbeat:notice] [pid 2532] AH02282: No slotmem from mod_heartmonitor
[Thu Sep 25 00:58:46.063128 2014] [mpm_prefork:notice] [pid 2532] AH00163: Apache/2.4.10 (Fedora) configured -- resuming normal operations
[Thu Sep 25 00:58:46.063149 2014] [core:notice] [pid 2532] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Sep 25 00:59:08.478796 2014] [cgi:error] [pid 2534] [client 127.0.0.1:51337] script not found or unable to stat: /var/www/cgi-bin/helloworld.pl
[Thu Sep 25 01:01:31.175648 2014] [cgi:error] [pid 2533] [client 127.0.0.1:51338] AH01215: (13)Permission denied: exec of '/var/www/cgi-bin/hello.pl' failed
[Thu Sep 25 01:01:31.175823 2014] [cgi:error] [pid 2533] [client 127.0.0.1:51338] End of script output before headers: hello.pl
[Thu Sep 25 01:08:16.089671 2014] [cgi:error] [pid 2537] [client 127.0.0.1:51472] AH01215: (13)Permission denied: exec of '/var/www/cgi-bin/hello.pl' failed
[Thu Sep 25 01:08:16.089869 2014] [cgi:error] [pid 2537] [client 127.0.0.1:51472] End of script output before headers: hello.pl
[Thu Sep 25 01:29:46.148796 2014] [cgi:error] [pid 2536] [client 127.0.0.1:51839] AH01215: (13)Permission denied: exec of '/var/www/cgi-bin/hello.pl' failed
[Thu Sep 25 01:29:46.148998 2014] [cgi:error] [pid 2536] [client 127.0.0.1:51839] End of script output before headers: hello.pl
[Thu Sep 25 01:56:38.795518 2014] [mpm_prefork:notice] [pid 2532] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Sep 25 02:47:41.659390 2014] [core:notice] [pid 2266] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Sep 25 02:47:41.671292 2014] [suexec:notice] [pid 2266] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Thu Sep 25 02:47:41.677247 2014] [auth_digest:notice] [pid 2266] AH01757: generating secret for digest authentication ...
[Thu Sep 25 02:47:41.677912 2014] [lbmethod_heartbeat:notice] [pid 2266] AH02282: No slotmem from mod_heartmonitor
[Thu Sep 25 02:47:41.680165 2014] [mpm_prefork:notice] [pid 2266] AH00163: Apache/2.4.10 (Fedora) configured -- resuming normal operations
[Thu Sep 25 02:47:41.680177 2014] [core:notice] [pid 2266] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[root@localhost httpd]#
Somebody please guide me with problem.

Zulfi.
 
Old 09-30-2014, 11:39 AM   #13
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
Maybe show:
Code:
ls -l /var/www/cgi-bin/hello.pl
ls -ld /var/www/cgi-bin
Create text file in /var/www and check if it is available from Internet browser. Show also config from Apache.
 
Old 10-03-2014, 01:51 AM   #14
zak100
Member
 
Registered: Jul 2009
Posts: 225

Original Poster
Rep: Reputation: 2
Hi,
Thanks for your response. I created a text file and i was able to access it through my browser:
Code:
file:///var/www/test
The results of ls commands are:
Code:
[lab6@localhost Zulfi]$ ls -l /var/www/cgi-bin/hello.pl
-rwxr-xr-x. 1 root root 121 Sep 24 01:41 /var/www/cgi-bin/hello.pl
[lab6@localhost Zulfi]$ ls -ld /var/www/cgi-bin
drwxrwxr-x+ 2 root root 4096 Sep 24 01:41 /var/www/cgi-bin
The conf file is:
Code:
[root@localhost conf]# cat httpd.conf
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Relax access to content within /var/www.
#
<Directory "/var/www">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>

# Further relax access to the default document root:
<Directory "/var/www/html">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ".ht*">
    Require all denied
</Files>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    #CustomLog "logs/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    CustomLog "logs/access_log" combined
</IfModule>

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

</IfModule>

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</IfModule>

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the 
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

<IfModule mime_magic_module>
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    MIMEMagicFile conf/magic
</IfModule>

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
[root@localhost conf]# pwd
/etc/httpd/conf
[root@localhost conf]#
Kindly guide me.

Zulfi.
 
Old 10-09-2014, 04:40 AM   #15
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
Code:
file:///var/www/test
That way you ommit your web serwer Apache. By sentence "available from Internet browser" I mean http address, for example:
Code:
http://localhost/test
Your file "hello.pl" has additional SELinux permissions, as I don't use it I don't known how to set it correctly. You can check this link.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SOAP-Lite installation for Fedora 20 zak100 Linux - Newbie 1 09-15-2014 02:06 AM
[SOLVED] Problem with executing first cgi program zak100 Linux - Newbie 5 10-03-2013 04:11 AM
[SOLVED] perl soap::lite and wsdl error Boring Programming 11 11-17-2010 02:29 AM
[SOLVED] problem regarding executing c program in ubuntu gerry_bertier Linux - Newbie 6 10-15-2010 07:44 AM
@INC perl SOAP ::Lite Peter Shepard Red Hat 1 09-27-2005 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration