LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: At Startup, I Get This: sed: -e expression #1, char 1: unknowncomman

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: At Startup, I Get This: sed: -e expression #1, char 1: unknowncommand: `%'
From: "Jason Downing" <jasondowning@xxxxxxxxxxxxxxxx>
Date: Tue, 4 Jul 2006 09:04:32 +1000
Hi,

One thing I did when I had problems was to run ldirectord without heartbeat. This might temporarily remove your problems with heartbeat, so you can have a closer look at the problem with logging into ftp. They appear to be separate problems. I ran ldirectord with the command:

/usr/sbin/ldirectord -d start

This would run ldirectord in debug mode, and it would output all its logging to the screen, so you could see when it issued the ipvsadm commands to set up ipvs as a load balancer, and you could also see when you removed or replaced a realserver. You could also stop ldirectord and the load balancer would continue to work.

Remember heartbeat should be stopped first. You will also need to manually bring up your VIP. This was the command I used:

ifconfig eth0:0 192.168.0.240 netmask 255.255.255.255 broadcast 192.168.0.255 up

Hope this helps, Jason

----- Original Message ----- From: "Robinson, Eric" eric.robinson@xxxxxxxxxx
To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, July 04, 2006 2:24 AM
Subject: At Startup, I Get This: sed: -e expression #1, char 1: unknowncommand: `%'



Hello list,

I am delighted to have gotten heartbeat and ldirectord running. I am now
able to load-balance traffic to two tomcat servers. However, I cannot
get FTP to work at all.

I fired up a sniffer and I can see ldirectord logging into the ftp
server and downloading the welcome.msg file, and I know the file
contains the right data, but for some reason ldirectord will not enable
the FTP virtual server. I've tried looking in ldirectord.log, but there
is no such file anywhere on my system (and I do not have a
syslog_facility enabled.)

I tried adding the --debug option to haresources, like this:

cluster1.nvipa.com \
       LVSSyncDaemonSwap::master \
       ldirectord::--debug::ldirectord.cf \
       IPaddr2::192.168.5.100/24/eth0 \
       IPaddr2::192.168.10.100/24/eth1

When I do that, I get additional logging DEBUG2 information in ha-debug.
The logging seems to show the FTP server being enabled. However, the
virtual IP address 192.168.5.100 does not get enabled. When I try to
stop heartbeat, it hangs forever and I have to do a hardware reset. When
it boots back up, heartbeat will not work until I take the --debug
parameter out of haresources and manually re-create /dev/watchdog. After
I do that, I can restart heartbeat and everything goes back to "normal,"
i.e., ldirectord virtualizes tomcat but not FTP.

I also get a couple of "unknown command" errors in ha-debug (see log
snippet below).

ResourceManager[3683]:  2006/07/02_14:25:20 info: Acquiring resource
group: cluster1.nvipa.com LVSSyncDaemonSwap::master
ldirectord::ldirectord.cf IPaddr2::192.168.5.100/24/eth0
IPaddr2::192.168.10.100/24/eth1
sed: -e expression #1, char 1: unknown command: `%'
sed: -e expression #1, char 1: unknown command: `%'
ResourceManager[3683]:  2006/07/02_14:25:21 info: Running
/etc/ha.d/resource.d/LVSSyncDaemonSwap master start
ResourceManager[3683]:  2006/07/02_14:25:21 debug: Starting
/etc/ha.d/resource.d/LVSSyncDaemonSwap master start
LVSSyncDaemonSwap[3745]:        2006/07/02_14:25:21 info:
ipvs_syncmaster up
LVSSyncDaemonSwap[3745]:        2006/07/02_14:25:21 info:
ipvs_syncmaster obtained
ResourceManager[3683]:  2006/07/02_14:25:21 debug:
/etc/ha.d/resource.d/LVSSyncDaemonSwap master start done. RC=0

Here's my config files:

ha.cf
-----
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility     local0
traditional_compression false
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 694
baud    19200
serial  /dev/ttyS0
bcast   eth0
bcast   eth1
#mcast eth0 225.0.0.1 694 1 0
#mcast eth1 225.0.0.1 694 1 0
auto_failback off
watchdog /dev/watchdog
node    cluster1.nvipa.com
node    cluster2.nvipa.com
respawn hacluster /usr/lib64/heartbeat/ipfail
debug 1
apiauth ipfail gid=haclient uid=hacluster
#apiauth ccm uid=hacluster
#apiauth ipfail gid=haclient uid=alanr,root
#apiauth default gid=haclient

haresources
-----------
cluster1.nvipa.com \
       LVSSyncDaemonSwap::master \
       ldirectord::ldirectord.cf \
       IPaddr2::192.168.5.100/24/eth0 \
       IPaddr2::192.168.10.100/24/eth1

ldirectord.cf
-------------
checktimeout=10
checkinterval=2
#fallback=127.0.0.1:80
autoreload=no
logfile="/var/log/ldirectord.log"
#logfile="local0"
quiescent=yes

# Virtual Server for HTTP
virtual=192.168.5.100:8080
       #fallback=127.0.0.1:80
       real=192.168.10.21:8080 masq
       real=192.168.10.22:8080 masq
       service=http
       request="index.html"
       receive="default Tomcat"
       scheduler=rr
       #persistent=600
       protocol=tcp
       checktype=negotiate

# Virtual Service for FTP
# Note that peresistancy needs to be turned on for FTP when
# used with LVS-TUN (ipip) or LVS-DR (gate), but not with LVS-NAT
(masq).
virtual=192.168.5.100:21
       #fallback=127.0.0.1:21
       real=192.168.10.21:21 masq
       real=192.168.10.22:21 masq
       service=ftp
       request="welcome.msg"
       receive="Test_Download_Success"
       login="user"
       passwd="me@"
       scheduler=rr
       #persistent=600
       protocol=tcp
       checktype=negotiate

welcome.msg
-----------
Test_Download_Success





Disclaimer - July 3, 2006
This email and any files transmitted with it are confidential and intended solely for lvs-users@xxxxxxxxxxxxxxxxxxxxxxx If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments.


<Prev in Thread] Current Thread [Next in Thread>