Re: [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours
good so far...I applied the first patch to the 3.0.4 source and did my 2 hour test...the name expired and then had a successful lookup. Thanks for your help! Jeff Gerard - Systems Administrator Wawanesa Mutual Insurance Company Office: 204-985-0517 Fax:204-947-5192 Email: [EMAIL PROTECTED] Jeremy Allison <[EMAIL PROTECTED]> 29/06/2004 12:22 PM Please respond to Jeremy Allison <[EMAIL PROTECTED]> To [EMAIL PROTECTED] cc Jeremy Allison <[EMAIL PROTECTED]>, Guillaume Millet <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject Re: [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours On Tue, Jun 29, 2004 at 12:28:53PM -0500, [EMAIL PROTECTED] wrote: > Ok..tried this and no go... > > First request: > > [2004/06/29 10:06:07, 3] > nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485) > wins_process_name_query: name query for name COMSRV6<00> from IP > 10.111.1.111 > [2004/06/29 10:06:07, 3] > nmbd/nmbd_winsserver.c:wins_process_name_query_request(1549) > wins_process_name_query: name query for name COMSRV6<00> not found - > doing dns lookup. > [2004/06/29 10:06:07, 3] nmbd/asyncdns.c:queue_dns_query(308) > added DNS query for COMSRV6<00> > [2004/06/29 10:06:07, 3] nmbd/asyncdns.c:add_dns_result(43) > add_dns_result: DNS gave answer for COMSRV6 of 10.230.1.1 > [2004/06/29 10:06:07, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(236) > add_name_to_subnet: Added netbios name COMSRV6<00> with first IP > 10.230.1.1 ttl=7200 nb_flags= 4 to subnet WINS_SERVER_SUBNET > > 2 hours passes > > Request after expirey: > > [2004/06/29 12:07:26, 3] > nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485) > wins_process_name_query: name query for name COMSRV6<00> from IP > 10.111.1.111 > [2004/06/29 12:07:26, 3] > nmbd/nmbd_winsserver.c:wins_process_name_query_request(1531) > wins_process_name_query: name query for name COMSRV6<00> - name expired. > Returning fail. Thanks - dumb mistake of mine, sorry. Used "break" instead of "continue" so I was only expiring the first record. DOH ! I'm attaching two files, the first is the complete patch with "break" changed to "continue" and should be applied to 3.0.4 or above. The second is just the "break" changed to "continue" fix and applies to the source you're running. Sorry for the mistake. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours
Ok..tried this and no go... First request: [2004/06/29 10:06:07, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485) wins_process_name_query: name query for name COMSRV6<00> from IP 10.111.1.111 [2004/06/29 10:06:07, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1549) wins_process_name_query: name query for name COMSRV6<00> not found - doing dns lookup. [2004/06/29 10:06:07, 3] nmbd/asyncdns.c:queue_dns_query(308) added DNS query for COMSRV6<00> [2004/06/29 10:06:07, 3] nmbd/asyncdns.c:add_dns_result(43) add_dns_result: DNS gave answer for COMSRV6 of 10.230.1.1 [2004/06/29 10:06:07, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(236) add_name_to_subnet: Added netbios name COMSRV6<00> with first IP 10.230.1.1 ttl=7200 nb_flags= 4 to subnet WINS_SERVER_SUBNET 2 hours passes Request after expirey: [2004/06/29 12:07:26, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485) wins_process_name_query: name query for name COMSRV6<00> from IP 10.111.1.111 [2004/06/29 12:07:26, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1531) wins_process_name_query: name query for name COMSRV6<00> - name expired. Returning fail. Jeff Gerard - Systems Administrator Wawanesa Mutual Insurance Company Office: 204-985-0517 Fax:204-947-5192 Email: [EMAIL PROTECTED] Jeremy Allison <[EMAIL PROTECTED]> 28/06/2004 07:40 PM Please respond to Jeremy Allison <[EMAIL PROTECTED]> To Guillaume Millet <[EMAIL PROTECTED]> cc [EMAIL PROTECTED], [EMAIL PROTECTED] Subject Re: [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours On Thu, Jun 24, 2004 at 04:25:52PM +0200, Guillaume Millet wrote: > Hello, > > I had the same problem. > I've found a workaround by patching the code in "nmbd/nmbd_namelistdb.c": > > /*** > Expires old names in all subnet namelists. > **/ > > void expire_names(time_t t) > { >struct subnet_record *subrec; > >for( subrec = FIRST_SUBNET; subrec; subrec = >NEXT_SUBNET_INCLUDING_UNICAST(subrec) ) { >expire_names_on_subnet( subrec, t ); >} > >expire_names_on_subnet( wins_server_subnet, t ); /* ADD THIS LINE >FOR REMOVING EXPIRED NAME FROM WINS TABLE */ > } > > I dont know if it's the correct things to do, but it works fine for me > with my configuration (PDC+LDAP+WINS with Samba 3.0.4 on MDK 9.2) > If a real Samba develloper can have a quick look to this to make a real > correction for next release. Ok, I've looked at this in the current Samba 3.0.5preXX code (SVN) and here is the fix I think should work. It forced DNS and DNSFAIL names to be removed from the WINS db immediately their timeout persiod expires and not to go into the "tombstoned" state (where they would hang around for another day). Let me know if this fixes the problem for you. Thanks, Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours
What I ended up doing, which worked for me, was make a change to nmbd_winsserver.c (samba 3.0.4) I added: if(lp_dns_proxy() && (namerec->data.death_time != PERMANENT_TTL) && (namerec->data.death_time < p->timestamp) && ((question->name_type == 0x20) || question->name_type == 0)) { DEBUG(3,("wins_process_name_query: name query for name %s is expired - doing dns lookup.\n", nmb_namestr(question) )); queue_dns_query(p, question, &namerec); return; } right above: if( (namerec->data.death_time != PERMANENT_TTL) && (namerec->data.death_time < p->timestamp) ) { DEBUG(3,("wins_process_name_query: name query for name %s - name expired. Returning fail.\n", nmb_namestr(question) )); send_wins_name_query_response(NAM_ERR, p, namerec); return; } I realize this is not likely the correct way to do it but it did work for me and got a lot of people off my back every morning when I came into work and they couldn't resolve names :) By adding the above, the hosts in question would still expire after 2 hours but the next lookup after death would cause them to cache for another 2 hours instead of returning a fail message. I will test your patch on samba-3.0.5pre1 (if I can remember how to diff :D) and report back. Jeff Gerard - Systems Administrator Wawanesa Mutual Insurance Company Office: 204-985-0517 Fax:204-947-5192 Email: [EMAIL PROTECTED] Jeremy Allison <[EMAIL PROTECTED]> 28/06/2004 07:40 PM Please respond to Jeremy Allison <[EMAIL PROTECTED]> To Guillaume Millet <[EMAIL PROTECTED]> cc [EMAIL PROTECTED], [EMAIL PROTECTED] Subject Re: [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours On Thu, Jun 24, 2004 at 04:25:52PM +0200, Guillaume Millet wrote: > Hello, > > I had the same problem. > I've found a workaround by patching the code in "nmbd/nmbd_namelistdb.c": > > /*** > Expires old names in all subnet namelists. > **/ > > void expire_names(time_t t) > { >struct subnet_record *subrec; > >for( subrec = FIRST_SUBNET; subrec; subrec = >NEXT_SUBNET_INCLUDING_UNICAST(subrec) ) { >expire_names_on_subnet( subrec, t ); >} > >expire_names_on_subnet( wins_server_subnet, t ); /* ADD THIS LINE >FOR REMOVING EXPIRED NAME FROM WINS TABLE */ > } > > I dont know if it's the correct things to do, but it works fine for me > with my configuration (PDC+LDAP+WINS with Samba 3.0.4 on MDK 9.2) > If a real Samba develloper can have a quick look to this to make a real > correction for next release. Ok, I've looked at this in the current Samba 3.0.5preXX code (SVN) and here is the fix I think should work. It forced DNS and DNSFAIL names to be removed from the WINS db immediately their timeout persiod expires and not to go into the "tombstoned" state (where they would hang around for another day). Let me know if this fixes the problem for you. Thanks, Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours
Sorry for not truncating but I thought the info was relevant... This "bug" has apparently been documented in bugzilla but no activity since March 18/04?? https://bugzilla.samba.org/show_bug.cgi?id=607 Jeff Gerard - Systems Administrator Wawanesa Mutual Insurance Company Office: 204-985-0517 Fax:204-947-5192 Email: [EMAIL PROTECTED] [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 23/06/2004 03:34 PM To [EMAIL PROTECTED] cc Subject [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours Hi there...this problem has me banging my head against a wall Until last week I was running Samba 2.2.7a on an old Slack box. I decided to upgrade as I needed more drive space and wanted something more current. I went with Fedora Core 2 and am running 2.6.6-1.435 kernel. I was using the default Samba install that came packaged with this release of Fedora and decided to try compiling/installing 3.0.4 to see if it would resolve my issue, which it did not. With logging options on nmbd set to d=3, I was finally able to figure out why this problem was happening but now how to prevent it. I am using Samba to do some file sharing, but more importantly for it's dns proxy capabilities. We currently have 2 domain names as we migrate from a Novell environment to an Active Directory environment. All windows clients are passed the samba server's IP for a wins address in order to do netbios name resolution and not have to configure 2 different domain names in the search suffix list. What has been happening since I started to use this version of samba is that after 2 hours, certain names stop resolving. The only way to correct the problem was to restart both smbd and nmbd. I had tried restarting only smbd and then only nmbd but to no avail...both had to be restarted to get things running again. Today I finally caught some log entries that showed me what was happening. If I try to ping an address on the old domain from a windows workstation, in this example, "ping ns-updates", I see the following in log.nmbd: (ignore the timestamps as I have patched logs together to get this info) [2004/06/23 13:56:49, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485) wins_process_name_query: name query for name NS-UPDATES<00> from IP 10.239.10.38 [2004/06/23 13:56:49, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1549) wins_process_name_query: name query for name NS-UPDATES<00> not found - doing dns lookup. [2004/06/23 13:56:49, 3] nmbd/asyncdns.c:queue_dns_query(308) added DNS query for NS-UPDATES<00> [2004/06/23 13:56:49, 3] nmbd/asyncdns.c:add_dns_result(43) add_dns_result: DNS gave answer for NS-UPDATES of 10.3.9.100 [2004/06/23 13:56:49, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(236) add_name_to_subnet: Added netbios name NS-UPDATES<00> with first IP 10.3.9.100 ttl=7200 nb_flags= 4 to subnet WINS_SERVER_SUBNET The "ttl=7200" is what has me baffled. After 2 hours has passed, If I try to "ping ns-updates" again, I get no reply on the windows workstation (ie, "Ping request could not find host ns-updates. Please check the name and try again." and I see the following in log.nmbd: [2004/06/23 13:55:57, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485) wins_process_name_query: name query for name NS-UPDATES<00> from IP 10.239.10.38 [2004/06/23 13:55:57, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1531) wins_process_name_query: name query for name NS-UPDATES<00> - name expired. Returning fail. The ttl values vary, and in most cases are set to 30, but all of the hosts that are set to 7200 will expire after 2 hours and I am no longer able to resolve these hostnames until I restart smbd and nmbd. My smb.conf looks like this: [global] log file = /usr/local/samba/var/log.%m load printers = yes name resolve order = lmhosts hosts bcast idmap gid = 16777216-33554431 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192 interfaces = eth0 null passwords = yes domain master = no hosts allow = 10. encrypt passwords = yes winbind use default domain = no template shell = /bin/false wins support = yes dns proxy = yes netbios name = wpg1lx01 netbios aliases = zelda password server = None idmap uid = 16777216-33554431 default = pub local master = no workgroup = TECH socket address = 10.38.2.11 printcap name = /etc/printcap security = share preferred master = no bind interfaces only = no max log size = 512 os level = 0 Right now I have a cron job set up to restart samba every 2 hours. I can't have this happening if someone is accessing files off the file shares that I have setup. Any help would be greatly appreciated. I am contemplat
[Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours
Hi there...this problem has me banging my head against a wall Until last week I was running Samba 2.2.7a on an old Slack box. I decided to upgrade as I needed more drive space and wanted something more current. I went with Fedora Core 2 and am running 2.6.6-1.435 kernel. I was using the default Samba install that came packaged with this release of Fedora and decided to try compiling/installing 3.0.4 to see if it would resolve my issue, which it did not. With logging options on nmbd set to d=3, I was finally able to figure out why this problem was happening but now how to prevent it. I am using Samba to do some file sharing, but more importantly for it's dns proxy capabilities. We currently have 2 domain names as we migrate from a Novell environment to an Active Directory environment. All windows clients are passed the samba server's IP for a wins address in order to do netbios name resolution and not have to configure 2 different domain names in the search suffix list. What has been happening since I started to use this version of samba is that after 2 hours, certain names stop resolving. The only way to correct the problem was to restart both smbd and nmbd. I had tried restarting only smbd and then only nmbd but to no avail...both had to be restarted to get things running again. Today I finally caught some log entries that showed me what was happening. If I try to ping an address on the old domain from a windows workstation, in this example, "ping ns-updates", I see the following in log.nmbd: (ignore the timestamps as I have patched logs together to get this info) [2004/06/23 13:56:49, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485) wins_process_name_query: name query for name NS-UPDATES<00> from IP 10.239.10.38 [2004/06/23 13:56:49, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1549) wins_process_name_query: name query for name NS-UPDATES<00> not found - doing dns lookup. [2004/06/23 13:56:49, 3] nmbd/asyncdns.c:queue_dns_query(308) added DNS query for NS-UPDATES<00> [2004/06/23 13:56:49, 3] nmbd/asyncdns.c:add_dns_result(43) add_dns_result: DNS gave answer for NS-UPDATES of 10.3.9.100 [2004/06/23 13:56:49, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(236) add_name_to_subnet: Added netbios name NS-UPDATES<00> with first IP 10.3.9.100 ttl=7200 nb_flags= 4 to subnet WINS_SERVER_SUBNET The "ttl=7200" is what has me baffled. After 2 hours has passed, If I try to "ping ns-updates" again, I get no reply on the windows workstation (ie, "Ping request could not find host ns-updates. Please check the name and try again." and I see the following in log.nmbd: [2004/06/23 13:55:57, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485) wins_process_name_query: name query for name NS-UPDATES<00> from IP 10.239.10.38 [2004/06/23 13:55:57, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1531) wins_process_name_query: name query for name NS-UPDATES<00> - name expired. Returning fail. The ttl values vary, and in most cases are set to 30, but all of the hosts that are set to 7200 will expire after 2 hours and I am no longer able to resolve these hostnames until I restart smbd and nmbd. My smb.conf looks like this: [global] log file = /usr/local/samba/var/log.%m load printers = yes name resolve order = lmhosts hosts bcast idmap gid = 16777216-33554431 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192 interfaces = eth0 null passwords = yes domain master = no hosts allow = 10. encrypt passwords = yes winbind use default domain = no template shell = /bin/false wins support = yes dns proxy = yes netbios name = wpg1lx01 netbios aliases = zelda password server = None idmap uid = 16777216-33554431 default = pub local master = no workgroup = TECH socket address = 10.38.2.11 printcap name = /etc/printcap security = share preferred master = no bind interfaces only = no max log size = 512 os level = 0 Right now I have a cron job set up to restart samba every 2 hours. I can't have this happening if someone is accessing files off the file shares that I have setup. Any help would be greatly appreciated. I am contemplating going back to Samba 2.2.x to see if it resolves the issue but would really rather not have to do that. Thanks! Jeff Gerard - Systems Administrator Wawanesa Mutual Insurance Company Office: 204-985-0517 Fax:204-947-5192 Email: [EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba