EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Re: Problems when download synApps IOC
From: sunjl <[email protected]>
To: "Tim Mooney" <[email protected]>, "Dirk Zimoch" <[email protected]>
Cc: tech-talk <[email protected]>
Date: Mon, 9 Jul 2012 16:24:41 +0800

Hello guys,
 
I got a Linux PC, and start the NFS server on it. Here is what I did in 'nfsCommands' file:
 
hostAdd("host","192.168.201.56")
nfsAuthUnixSet("sunjl",502,500,0,0)
nfsMount("host","/home/sunjl","/home/sunjl")
 
After download the IOC, I start the 'scan.adl' and do some test, after scanning the  'SAVE DATA' still stay in 'writing to test0001.mda'
 state, and on vxWorks it still retry to save data (as following shown).
 
 iocvxWorks> saveData: ...will retry in 15 seconds
 saveData: ...will retry in 15 seconds
 saveData: ...will retry in 15 seconds
 saveData: ...will retry in 15 seconds
 saveData: ...will retry in 15 seconds
 saveData: *******************************************
 saveData: too many retries; abandoning data from scan 'DAQ1:scan1'
 saveData: *******************************************
 
but in "/home/sunjl", the test0001.mda file has been created, and I tried two times in different scan points, the two mda file has different size.
 
I tried to open the mda file with the mdaUtils, but "Load the mda file failed" when run the 'mda2ascii' command.
 

孙纪磊 敬启
中国科学院高能物理研究所1号厅201室
北京市918信箱 100049
Sun Jilei
Institute of High Energy Physics, Chinese Academy of Sciences,
Accelerator Center, Room 201, Hall 1,
19B Yuquan Lu, Shijingshan District,
Beijing 100049,
People's Republic of China
Tel.: (+86)-(0)10-88236287
Email:
[email protected]
 
发件人: Tim Mooney
发送时间: 2012-07-06 00:54
收件人: Dirk Zimoch
抄送: tech-talk; sunjl
主题: Re: 回复: Re: Re: Problems when download synApps IOC
I don't know how it can be; I wasn't there.  I suspect the problem was in the /etc/exports file (it was a Linux file server).
Tim
 
----- Original Message -----
From: "Dirk Zimoch" <[email protected]>
To: "Tim Mooney" <[email protected]>
Cc: "tech-talk" <[email protected]>, "sunjl" <[email protected]>
Sent: Thursday, July 5, 2012 2:56:55 AM
Subject: Re: 回复: Re:  Re: Problems when download synApps IOC
 
Tim Mooney wrote:
> A developer here had that problem (can create empty files, but can't write to them).
> Apparently, adding the last two parameters to nfsAuthUnixSet(hostname, uid, gid, 0, 0)
> fixed it.  I would have expected those parameters to be supplied as zero by the
> shell, so maybe something else also changed at around the same time.
> It doesn't seem unreasonable that one would be able to create a file but not write to it.
> Creating a file is writing to the directory that contains the file.  That's different
> from writing to the file, which requires write permission to the file as well as to the
> directory.
 
How can it be that you have no write permission to a file that you have 
just created? Is the file created without "w" permission for the owner?
My vxWorks system (5.5.1) creates the file with permissions 640 
(-rw-r-----). I do not see any way to modify the file permissions in 
vxWorks. I suspect a problem in the Windows NFS server.
 
I have never used nfsAuthUnixSet in my startup scripts, instead I have 
set it in the vxWorks kernel in configAll.h (macros NFS_USER_ID and 
NFS_GROUP_ID). But I tested it now with 3 parameters (hostname, uid, 
gid) and had no problems.
 
Dirk
 
 
> Tim
> ----- Original Message -----
> From: "Dirk Zimoch" <[email protected]>
> To: "sunjl" <[email protected]>
> Cc: "tech-talk" <[email protected]>
> Sent: Wednesday, July 4, 2012 7:23:13 AM
> Subject: Re: 回复: Re:  Re: Problems when download synApps IOC
> Hello Jilei,
> I guess it has to do the the user rights. The file system itself is RW,
> otherwise you would not have been able to create the file. But I do not
> know what the access rights of the directory are and if the Windows NFS
> server handles them correctly.
> I did some tests with a Linux NFS server and different settings of
> access right.
> This was my test:
> I created a file "src" on the server:
> echo XXX > src
> On vxWorks I tried to copy the file:
> copy < src > dest
> I tried different access rights on the server like:
> chmod 777 .
> Whenever I was able to create a file, I was able to write to it, too. I
> had never the situation that I can only create empty files.
> Try to give the directory the accress rights mask 777. (No idea how to
> do this on Windows.)
> Dirk
> sunjl wrote:
>> Hello Dirk,
>>  
>> The nfs server built on Win7 PC seems working, when type 'nfsDevShow' on 
>> vxWorks the path of the autosave file is printed correctly. Some other 
>> commands, like 'cd', 'mkdir', 'ls', can also be respond.
>>  
>> So I start the 'scan.adl' to do the scan test (the MEDM interface as the 
>> attachment shown), but after scanning it stay in 'writing to ws0001.mda' 
>> state, and on vxWorks still retry to save data (as following shown).
>>  
>> iocvxWorks> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: ...will retry in 15 seconds
>> saveData: *******************************************
>> saveData: too many retries; abandoning data from scan 'DAQ1:scan1'
>> saveData: *******************************************
>>  
>> On my Win7 PC, the file "ws0001.mad" has been created, but there is no 
>> data in.
>>  
>> It seems the IOC can create a new file on Win7 PC through the nfs 
>> server, but can not write data into the file, but I have set the nfs 
>> server access "R/W".
>>  
>> Do you have any ideas?
>>  
>> Thanks a lot. 
>>  
>>  
>> ------------------------------------------------------------------------
>> 孙纪磊 敬启
>> 中国科学院高能物理研究所1号厅201室
>> 北京市918信箱 100049
>> Sun Jilei
>> Institute of High Energy Physics, Chinese Academy of Sciences,
>> Accelerator Center, Room 201, Hall 1,
>> 19B Yuquan Lu, Shijingshan District,
>> Beijing 100049,
>> People's Republic of China
>> Tel.: (+86)-(0)10-88236287
>>  
>> *发件人:* Dirk Zimoch <mailto:[email protected]>
>> *发送时间:* 2012-07-03 00:36
>> *收件人:* sunjl <mailto:[email protected]>
>> *主题:* Re:回复: Re: [SPAM] Re: Problems when download synApps IOC
>> Just seen on TechTalk (Thread "VxWorks NFS issue"): What about your NFS
>> user settings? NFS uses Unix users and groups. You have to give the
>> vxWorks IOC a user and group ID that has write access on the NFS network
>> drive.
>>  
>> nfsAuthUnixSet "name of your server", userid, groupid
>>  
>> I do not know how Windows handles the userid and groupid. On a Linux NFS
>> server it it simply the "normal" user identification.
>>  
>> Dirk
>>  
>>  
>> Dirk Zimoch wrote:
>>  > Hello Jilei,
>>  > 
>>  > If your NFS server is running on a Windows machine, I do not know how to
>>  > do any diagnostics on the server. I only know Linux PCs.
>>  > 
>>  > On vxWorks, type nfsDevShow to see what is mounted.  Is the path of your
>>  > autosave file there?
>>  > 
>>  > Note that there is 2 times 'autosave' in the path! Is that correct?
>>  > 
>>  > Do you have write access to the NFS directory?
>>  > 
>>  > 
>>  > Dirk
>>  > 
>>  > 
>>  > But on the vxWorks machine,
>>  > 
>>  > sunjl wrote:
>>  >> Hi Dirk,
>>  >>  
>>  >> I bulit a nfs server on my own PC ( IP: 192.168.201.58 ; with Win7), and 
>>  >> the 'nfsCommands' file can be download successfully, thanks for your help!
>>  >>  
>>  >> But there are 2 errors appear.
>>  >>  
>>  >> 1, When the IOC start to initiate, some warning appears as following:
>>  >>  
>>  >> Starting iocInit
>>  >> ########################################################################
>>  >> EPICS IOC CORE built on May  5 2011
>>  >> EPICS R3.14.8.2 $R3-14-8-2$ $2006/01/06 15:55:13$
>>  >> ############################################################################
>>  >> reboot_restore: entry for file 'auto_positions.sav'
>>  >> reboot_restore (v4.11): entry for file 'auto_positions.sav'
>>  >> reboot_restore: Found filename 'auto_positions.sav' in restoreFileList.
>>  >> *** restoring from '/f/autosave/autosave/auto_positions.sav' at initHookState 5
>>  >> drvIK320 starting irq logger...
>>  >> save_restore:myFileCopy: Can't open file '/f/autosave/autosave/auto_positions.sa
>>  >> v_120702-035518'
>>  >> save_restore: Can't write backup file.
>>  >> reboot_restore: entry for file 'auto_settings.sav'
>>  >> reboot_restore (v4.11): entry for file 'auto_settings.sav'
>>  >> reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
>>  >> *** restoring from '/f/autosave/autosave/auto_settings.sav' at initHookState 5 ***
>>  >> save_restore:myFileCopy: Can't open file '/f/autosave/autosave/auto_settings.sav
>>  >> _120702-035519'
>>  >> save_restore: Can't write backup file.
>>  >> iocInit: All initialization complete
>>  >> value = 0 = 0x0
>>  >>  
>>  >> 2, When I start the 'scan.edl' with MEDM, "SAVE DATA" still in the 
>>  >> 'Inactive' state.
>>  >>  
>>  >> Could you give me some more helps, thank you very much.
>>  >>  
>>  >> By the way, what I want to do is saving data as the monitor scanning 
>>  >> (like the wire scanner system), do you have any good ideas?
>>  >>  
>>  >> Best regards,
>>  >>  
>>  >>  
>>  >> ------------------------------------------------------------------------
>>  >> 孙纪磊 敬启
>>  >> 中国科学院高能物理研究所1号厅201室
>>  >> 北京市918信箱 100049
>>  >> Sun Jilei
>>  >> Institute of High Energy Physics, Chinese Academy of Sciences,
>>  >> Accelerator Center, Room 201, Hall 1,
>>  >> 19B Yuquan Lu, Shijingshan District,
>>  >> Beijing 100049,
>>  >> People's Republic of China
>>  >> Tel.: (+86)-(0)10-88236287
>>  >> Email: [email protected] <mailto:[email protected]>
>>  >>  
>>  >> *发件人:* Dirk Zimoch <mailto:[email protected]>
>>  >> *发送时间:* 2012-06-28 14:46
>>  >> *收件人:* sunjl <mailto:[email protected]>
>>  >> *抄送:* tech-talk <mailto:[email protected]>
>>  >> *主题:* Re:回复: [SPAM] Re: Problems when download synApps IOC
>>  >> Hello Jilei,
>>  >>  
>>  >> hostAdd("CSNS-Server3","192.168.206.153")
>>  >> value = -1 = 0xffffffff
>>  >> perror
>>  >> S_hostLib_HOST_ALREADY_ENTERED
>>  >>  
>>  >> This simply shows that the host is already known. This is because
>>  >> vxWorks automatically does hostAdd() with the "host name" and "host
>>  >> inet" from the boot parameters. Thus this line is simply not needed.
>>  >>  
>>  >> nfsMount("CSNS-Server3","/develeopment/beamimp/sunjl/synApp53/iocDAQ/DAQ1","/develeopment/beamimp/sunjl/synApp53/iocDAQ/DAQ1")
>>  >> value = -1 = 0xffffffff
>>  >> perror
>>  >> S_rpcLib_RPC_TIMEDOUT
>>  >>  
>>  >> This looks like there is no NFS server running on CSNS-Server3. It may
>>  >> also be that the NFS server only serves NFS version 4  or NFS over TCP.
>>  >> Both is not usable with vxWorks. You need to run a version 3 UDP server.
>>  >> Since your server is on a different network, you should also check if
>>  >> there is a firewall in between. It may be that such a firewall blocks
>>  >> UDP packages.
>>  >>  
>>  >> What you can do:
>>  >> - Check that NFS is running on CSNS-Server3.
>>  >> - Check /etc/exports. Is your IOC allowed to mount?
>>  >> - Can you mount the directory from somewhere else?
>>  >>   * A pc in network 192.168.206.*?
>>  >>   * A pc in network 192.168.201.*?
>>  >> - Check the options used for the nfs server: --no-udp or
>>  >> --no-nfs-version 3 would be bad.
>>  >> - Run wireshark (or etherreal or tcpdump) on the server and look for
>>  >> packages from bi-mvme5100-2
>>  >>  
>>  >> Without knowing more details about your server and network environment I
>>  >> cannot say more.Please consult your network administrator or the system
>>  >> administrator of CSNS-Server3.
>>  >>  
>>  >> Dirk
>>  >>  
>>  >>  
>>  >> sunjl wrote:
>>  >>  > Hi Dirk,
>>  >>  >  
>>  >>  > I add the "perror" and "hostShow" in the nfsCommands file, and got some 
>>  >>  > results as follows:
>>  >>  >  
>>  >>  > boot device : fei
>>  >>  > unit number : 0
>>  >>  > processor number : 3
>>  >>  > host name : CSNS-Server3
>>  >>  > file name : /home/vxWorks/bootdir/vxWorks_5.5_5100
>>  >>  > inet on ethernet (e) : 192.168.201.59:ffffff00
>>  >>  > host inet (h) : 192.168.206.153
>>  >>  > gateway inet (g) : 192.168.201.1
>>  >>  > user (u) : sunjl
>>  >>  > ftp password (pw) : 123456
>>  >>  > flags (f) : 0x0
>>  >>  > target name (tn) : bi-mvme5100-2
>>  >>  > -> </development/beamimp/sunjl/synApps53/iocDAQ/DAQ1/iocBoot/iocDAQ1/st1.cmd
>>  >>  > # vxWorks startup script
>>  >>  > cd "/development/beamimp/sunjl/synApps53/iocDAQ/DAQ1/iocBoot/iocDAQ1"
>>  >>  > value = 0 = 0x0
>>  >>  > < ../nfsCommands
>>  >>  > # Set the default gateway (the address to which IP datagrams will be sent
>>  >>  > # when there is no specific specific routing table entry available for the
>>  >>  > # actual destination address.)
>>  >>  > routeAdd "0","192.168.201.1"
>>  >>  > value = 0 = 0x0
>>  >>  > hostAdd("CSNS-Server3","192.168.206.153")
>>  >>  > value = -1 = 0xffffffff
>>  >>  > perror
>>  >>  > S_hostLib_HOST_ALREADY_ENTERED
>>  >>  > value = 31 = 0x1f
>>  >>  > hostShow
>>  >>  > hostname inet address aliases
>>  >>  > -------- ------------ -------
>>  >>  > localhost 127.0.0.1
>>  >>  > bi-mvme5100-2 192.168.201.59
>>  >>  > CSNS-Server3 192.168.206.153
>>  >>  > value = 0 = 0x0
>>  >>  > nfsMount("CSNS-Server3","/develeopment/beamimp/sunjl/synApp53/iocDAQ/DAQ1","/dev
>>  >>  > eleopment/beamimp/sunjl/synApp53/iocDAQ/DAQ1")
>>  >>  > value = -1 = 0xffffffff
>>  >>  > perror
>>  >>  > S_rpcLib_RPC_TIMEDOUT
>>  >>  > value = 22 = 0x16
>>  >>  >  
>>  >>  > Does this mean the nfsCommands file is not necessary for my IOC ?
>>  >>  > Thanks a lot.
>>  >>  >  
>>  >>  > ------------------------------------------------------------------------
>>  >>  > 孙纪磊 敬启
>>  >>  > 中国科学院高能物理研究所1号厅201室
>>  >>  > 北京市918信箱 100049
>>  >>  > Sun Jilei
>>  >>  > Institute of High Energy Physics, Chinese Academy of Sciences,
>>  >>  > Accelerator Center, Room 201, Hall 1,
>>  >>  > 19B Yuquan Lu, Shijingshan District,
>>  >>  > Beijing 100049,
>>  >>  > People's Republic of China
>>  >>  > Tel.: (+86)-(0)10-88236287
>>  >>  > Email: [email protected] <mailto:[email protected]>
>>  >>  >  
>>  >>  > *发件人:* Dirk Zimoch <mailto:[email protected]>
>>  >>  > *发送时间:* 2012-06-26 20:23
>>  >>  > *收件人:* sunjl <mailto:[email protected]>
>>  >>  > *抄送:* tech-talk <mailto:[email protected]>
>>  >>  > *主题:* [SPAM] Re: Problems when download synApps IOC
>>  >>  > sunjl wrote:
>>  >>  >  > Hi all,
>>  >>  >  > 
>>  >>  >  > I built the synApps-5.3 on an EPICS server with base 3.14.8.2, when download the IOC to the MVME5100 through vxWorks 5.5, some wrong return value occured (as follows shown).  And these wrong return value cause the "SAVE DATA" of the "scan.adl"  in "Mount err   Invalid file system!!!" state, right?
>>  >>  >  > 
>>  >>  >  > Need some help, thanks!
>>  >>  >  > 
>>  >>  >  > -> </development/beamimp/sunjl/synApps53/iocDAQ/DAQ1/iocBoot/iocDAQ1/st1.cmd
>>  >>  >  > # vxWorks startup script
>>  >>  >  > 
>>  >>  >  > cd "/development/beamimp/sunjl/synApps53/iocDAQ/DAQ1/iocBoot/iocDAQ1"
>>  >>  >  > value = 0 = 0x0
>>  >>  >  > < ../nfsCommands
>>  >>  >  > 
>>  >>  >  > routeAdd "0","192.168.201.1"
>>  >>  >  > value = 0 = 0x0
>>  >>  >  > 
>>  >>  >  > #routeDelete "164.54.0.0", "164.54.53.226"
>>  >>  >  > 
>>  >>  >  > #routeShow
>>  >>  >  > 
>>  >>  >  > hostAdd("CSNS-Server3","192.168.206.153")
>>  >>  >  > value = -1 = 0xffffffff
>>  >>  >  
>>  >>  > After this failure, type: perror
>>  >>  >  
>>  >>  >  > perror
>>  >>  > S_hostLib_HOST_ALREADY_ENTERED
>>  >>  >  
>>  >>  > This would mean the host "CSNS-Server3" is already known. (Probably with
>>  >>  > a different address. Also try hostShow.)
>>  >>  >  
>>  >>  >  > nfsMount("CSNS-Server3","/develeopment/beamimp/sunjl/synApp53/iocDAQ/DAQ1","/dev
>>  >>  >  > eleopment/beamimp/sunjl/synApp53/iocDAQ/DAQ1")
>>  >>  >  > value = -1 = 0xffffffff
>>  >>  >  
>>  >>  > This looks like the host is not known or it does not export the file
>>  >>  > system properly. Again try perror.
>>  >>  >  
>>  >>  > Dirk
>>  >>  >  
>>  >>  >  
>>  >>  >  > 孙纪磊 敬启
>>  >>  >  > 中国科学院高能物理研究所1号厅201室
>>  >>  >  > 北京市918信箱 100049
>>  >>  >  > Sun Jilei
>>  >>  >  > Institute of High Energy Physics, Chinese Academy of Sciences,
>>  >>  >  > Accelerator Center, Room 201, Hall 1,
>>  >>  >  > 19B Yuquan Lu, Shijingshan District,
>>  >>  >  > Beijing 100049,
>>  >>  >  > People's Republic of China
>>  >>  >  > Tel.: (+86)-(0)10-88236287
>>  >>  >  > Email: [email protected]
>>  >>  >  
>>  >>  
>>  > 
>>  > 
>>  
 
 
-- 
Tim Mooney ([email protected]) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab
 

Replies:
Re: Problems when download synApps IOC Tim Mooney
Re: Problems when download synApps IOC Dohn Arms
References:
Re: 回复: Re: Re: Problems when download synApps IOC Tim Mooney

Navigate by Date:
Prev: Re: Problem in SNL Benjamin Franksen
Next: Re: Problem in seq-2.1.8 Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: 回复: Re: Re: Problems when download synApps IOC Tim Mooney
Next: Re: Problems when download synApps IOC Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024