10.8.5 supplemental & server 2.2 breaks postgres/caldavd?

caldavd fails because postgres is failing to start.  Best I can tell is there are two startup scripts for postgres.  com.apple.postgress.plist has launchd start a postgres on the socket specified in:
/Library/Server/PostgreSQL For Server Services/Socket
whilst org.postgresql.postgres.plist has launchd start a postgres on the socket specified in:
/private/var/pgsql_socket
The latter is started but the former fails (postgres exists with code 1 and launchd throttles for a 10 second retry).
I notice caldavd's error log:
2013-10-08 09:09:18-0700 [-] Re-trying connection due to connection failure
          Traceback (most recent call last):
            File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/context.py", line 81, in callWithContext
              return func(*args,**kw)
            File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/internet/threadutils.py", line 48, in _run
              while self._qpull():
            File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/internet/threadutils.py", line 69, in _qpull
              return True
            File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/internet/threadutils.py", line 82, in _oneWorkUnit
              self._reactor.callFromThread(deferred.callback, result)
          --- <exception caught here> ---
            File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/internet/threadutils.py", line 74, in _oneWorkUnit
              result = instruction()
            File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/enterprise/adbapi2.py", line 1025, in initCursor
              connection = self.connectionFactory()
            File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/txda v/base/datastore/dbapiclient.py", line 196, in connect
              connection = self.dbModule.connect(*self.connectArgs, **self.connectKw)
            File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/pgdb .py", line 482, in connect
              dbtty, dbuser, dbpasswd)
          pg.InternalError: could not connect to server: No such file or directory
                    Is the server running locally and accepting
                    connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket/.s.PGSQL.5432"?
which is failing because there is no active unix socket because postgres fails.  I tried downloading the 10.8.5 combo update and installing with no change of behavior.
Anyone got any ideas?

The following is in the logs but I note the date earlier than my 10.5.8 supplemental / Server 2.2.2 update.
2013-10-07 07:29:08 PDT ERROR:  role "collab" already exists
2013-10-07 07:29:08 PDT STATEMENT:  CREATE ROLE collab SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
2013-10-07 07:29:08 PDT LOG:  connection received: host=[local]
2013-10-07 07:29:08 PDT LOG:  connection authorized: user=collab database=postgres
2013-10-07 07:29:08 PDT LOG:  statement: CREATE DATABASE collab;
2013-10-07 07:29:08 PDT ERROR:  database "collab" already exists
2013-10-07 07:29:08 PDT STATEMENT:  CREATE DATABASE collab;
2013-10-07 07:29:08 PDT LOG:  connection received: host=[local]
2013-10-07 07:29:08 PDT LOG:  connection authorized: user=_postgres database=postgres
2013-10-07 07:29:08 PDT LOG:  statement: CREATE ROLE webauth SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
2013-10-07 07:29:08 PDT ERROR:  role "webauth" already exists
2013-10-07 07:29:08 PDT STATEMENT:  CREATE ROLE webauth SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
2013-10-07 07:29:08 PDT LOG:  connection received: host=[local]
2013-10-07 07:29:08 PDT LOG:  connection authorized: user=webauth database=webauth
Here are the receipts from /Library/Receipts/InstallHistory.plist:
<dict>
        <key>date</key>
        <date>2013-10-07T15:18:51Z</date>
        <key>displayName</key>
        <string>OS X v10.8.5 Supplemental Update</string>
        <key>displayVersion</key>
        <string>1.0</string>
        <key>packageIdentifiers</key>
        <array>
            <string>com.apple.pkg.update.os.10.8.5.supplemental</string>
        </array>
        <key>processName</key>
        <string>Software Update</string>
    </dict>
<dict>
        <key>date</key>
        <date>2013-10-07T19:12:27Z</date>
        <key>displayName</key>
        <string>Server</string>
        <key>displayVersion</key>
        <string>10.8</string>
        <key>packageIdentifiers</key>
        <array>
            <string>com.apple.pkg.ServerAppStore</string>
        </array>
        <key>processName</key>
        <string>storeagent</string>
    </dict>
<dict>
        <key>date</key>
        <date>2013-10-07T22:25:22Z</date>
        <key>displayName</key>
        <string>OS X Update Combined</string>
        <key>displayVersion</key>
        <string></string>
        <key>packageIdentifiers</key>
        <array>
            <string>com.apple.pkg.update.os.10.8.5.12F45.combo</string>
            <string>com.apple.pkg.RemoteDesktop</string>
        </array>
        <key>processName</key>
        <string>Installer</string>
    </dict>
The PDT times should be 7 hours behind the Zulu timestamps so I think the postgres log errors occured before the first update -- perhaps they are innocuous.  There are no further entries past the 7:29:08 timestamp in the PostgreSQL_Server_Services.log file, which seems strange.

Similar Messages

  • Opitsk: network error occurred while two-task server trying tosend break

    Problem Description: Environment Details
    Application Server : Version 10.1.2.3.0 on Windows Server 2003 R2
    Database Server: I have installed Oracle DB (11.2.0.1.0) on the same sever having Oracle 11g Release 1 (11.0.7.0) and Oracle 10g Release 2 (10.2.4.0).
    I am using Oracle11gR1 listener for all three databases.
    I have created database for Oracle11gR2 with no issues at all.
    Issue:
    Now when I am running my application using Oracle11g R2, my application runs fine for a specific interval after which I get ORA-03113: end-of-file communication channel. All the Sessions linked to these are all dead.
    From the logs I discovered this (which is TNS Packet write failure)
    opitsk: network error occurred while two-task server trying tosend break; error code = 12571

    Any clue based on the Trace file???????????
    Part of DB Trace (As Trace was very Big)
    ===========================
    2010-10-25 17:11:35.143380 : nioqrs:exit
    2010-10-25 17:11:35.143394 : nioqrs:entry
    2010-10-25 17:11:35.143405 : nioqrs: state = interrupted (1)
    2010-10-25 17:11:35.143415 : nscontrol:entry
    2010-10-25 17:11:35.143425 : nscontrol:cmd=45, lcl=0x0
    2010-10-25 17:11:35.143436 : nscontrol:normal exit
    2010-10-25 17:11:35.143446 : nscontrol:entry
    2010-10-25 17:11:35.143456 : nscontrol:cmd=1, lcl=0x0
    2010-10-25 17:11:35.143467 : nscontrol:normal exit
    2010-10-25 17:11:35.143477 : nioqsm:entry
    2010-10-25 17:11:35.143487 : nioqsm: Sending break packet (1)...
    2010-10-25 17:11:35.143498 : nscontrol:entry
    2010-10-25 17:11:35.143513 : nscontrol:cmd=45, lcl=0x0
    2010-10-25 17:11:35.143524 : nscontrol:normal exit
    2010-10-25 17:11:35.143535 : nsdo:entry
    2010-10-25 17:11:35.143546 : nsdo:cid=0, opcode=67, bl=1, what=17, uflgs=0x100, cflgs=0x3
    2010-10-25 17:11:35.143558 : nsdo:rank=64, nsctxrnk=0
    2010-10-25 17:11:35.143569 : nsdo:nsctx: state=8, flg=0x400c, mvd=0
    2010-10-25 17:11:35.143580 : nsdo:gtn=156, gtc=156, ptn=10, ptc=2047
    2010-10-25 17:11:35.143591 : nsdofls:entry
    2010-10-25 17:11:35.143601 : nsdofls:DATA flags: 0x0
    2010-10-25 17:11:35.143611 : nsdofls:normal exit
    2010-10-25 17:11:35.143622 : nsdo:sending NSPTMK packet
    2010-10-25 17:11:35.143632 : nspsend:entry
    2010-10-25 17:11:35.143642 : nspsend:plen=11, type=12
    2010-10-25 17:11:35.143653 : nttwr:entry
    2010-10-25 17:11:35.143668 : ntt2err:entry
    2010-10-25 17:11:35.143680 : ntt2err:soc 3116 error - operation=6, ntresnt[0]=530, ntresnt[1]=54, ntresnt[2]=0
    2010-10-25 17:11:35.143691 : ntt2err:exit
    2010-10-25 17:11:35.143702 : nttwr:exit
    2010-10-25 17:11:35.143712 : nspsend:0 bytes to transport
    2010-10-25 17:11:35.143722 : nspsend:transport write error
    2010-10-25 17:11:35.143733 : nspsend:error exit
    2010-10-25 17:11:35.143743 : nsdo:error sending NSPTMK packet
    2010-10-25 17:11:35.143754 : nserror:entry
    2010-10-25 17:11:35.143766 : nserror:nsres: id=0, op=67, ns=12571, ns2=12560; nt[0]=530, nt[1]=54, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
    2010-10-25 17:11:35.143778 : nsdo:nsctxrnk=0
    2010-10-25 17:11:35.143788 : nsdo:error exit
    2010-10-25 17:11:35.143799 : nioqsm:send-break: failed to send break...
    2010-10-25 17:11:35.143810 : nioqper: error from send-marker
    2010-10-25 17:11:35.143821 : nioqper: ns main err code: 12571
    2010-10-25 17:11:35.143832 : nioqper: ns (2) err code: 12560
    2010-10-25 17:11:35.143842 : nioqper: nt main err code: 530
    2010-10-25 17:11:35.143853 : nioqper: nt (2) err code: 54
    2010-10-25 17:11:35.143864 : nioqper: nt OS err code: 0
    2010-10-25 17:11:35.143874 : nioqsm:exit
    2010-10-25 17:11:35.143884 : nioqer:entry
    2010-10-25 17:11:35.143895 : nioqer: incoming err = 12152
    2010-10-25 17:11:35.143905 : niomapnserror:entry
    2010-10-25 17:11:35.143915 : niqme:entry
    2010-10-25 17:11:35.143927 : niqme:reporting NS-12571 error as ORA-12571
    2010-10-25 17:11:35.143937 : niqme:exit
    2010-10-25 17:11:35.143947 : niomapnserror:exit
    2010-10-25 17:11:35.143957 : nioqce:entry
    2010-10-25 17:11:35.143967 : nioqce:exit
    2010-10-25 17:11:35.143977 : nioqer: returning err = 12571
    2010-10-25 17:11:35.143987 : nioqer:exit
    2010-10-25 17:11:35.143998 : nioqrs:nioqrs: Couldn't send break. returning 12571
    2010-10-25 17:11:35.144009 : nioqrs:exit
    opitsk: network error occurred while two-task server trying tosend break; error code = 12571
    2010-10-25 17:11:35.145131 : nioqds:entry
    2010-10-25 17:11:35.145149 : nioqds: disconnecting...
    From Apps Server
    ================
    [2010/10/25 4:41:1:141] Debug 50103 (JobObject:readExternal): err.errorString=MSG-00003: HES1201 STARTED 2010-OCT-25 15:28:44 Report RCXXX Rev 12.0
    REP-1401: 'beforereport': Fatal PL/SQL error occurred.
    ORA-03113: end-of-file on communication channel
    Edited by: user12889416 on 31-Oct-2010 22:24

  • KB2909210 on Server 2008 R2 breaks my intranet sites

    I have several intranet sites that my users use for various data entry and querying purposes.  I installed Internet Explorer 10 onto my 2008 R2 Terminal Server over this past weekend which also installed the Security Update KB2909210 and rebooted the
    server.  On Monday morning, when my terminal users logged into the sites, the sites began malfunctioning.  All the dropdown arrows turned into question marks.  Some fields which normally have a small "x" on the right-hand side used
    to erase the data entered in the text field were also displaying as question marks.  The objects still functioned but it was disconcerting to my users.  The update also slowed down these same intranet sites to where it began interfering with productivity. 
    I activated Compatibility View for all intranet sites, but it did not resolve the problem.
    I also found that when my terminal users tried to print a pdf document from the intranet sites, the print dialog box was jumbled and no fields were pre-populated with data like they always are when printing.  I updated to the latest Adobe Reader, but
    the print dialog box remained jumbled. 
    All of my users with stand-alone PCs have IE 10 installed and the intranet sites work fine.  They display properly and process quickly.  It is only my terminal users who log in from a thin client to their profiles on the server and use the IE version
    installed on the server who have the problem with IE10.  The KB2909210 Update is not installed on, and does not come up as, an update for any of my stand-alone Windows 7 PCs.
    I uninstalled IE 10 from my server, but since this was one of my production servers, I could not restart it until after the plant was shut down for the evening forcing my users to suffer with the slowness for the day.  This morning the intranet sites
    are working fine through IE 9.  I also had to revert back to Adobe Reader v9.5 as the v11 (and v10) print dialog box does not display properly in IE 9.
    I do not want to stay on IE 9 on my server as it gets more un-secure by the day and we've found IE 11 to be too buggy so far.
    How can I install IE 10 with its security updates and prevent it from breaking my intranet sites?

    I would re ask this in a different forum as this is a Small business server forum and I'm assuming you aren't running that platform?
    Or call 1-800-microsoft and issues with a security patch are ultimately comp'd back to you.
    This re-asking in forum after forum after forum is ridiculous!  When someone else has this problem and searches for it, they will get several useless results with the only responses being to ask in another forum.
    This was originally posted in the Microsoft Community forum.  The MS Forum Moderator over there advised I should post it here and gave a link in her response.  God forbid she had just moved it to the correct forum as I've seen done on countless
    other forums!

  • KB2909210 on Server 2008 R2 breaks my intranet sites and print dialog box

    Let's try this again.  I have been asking the following question of Microsoft and every time I do, I have only been told to try another forum.
    I have several intranet sites that my users use for various data entry and querying purposes.  I installed Internet Explorer 10 onto my 2008 R2 Terminal Server over this past weekend (10/18/2014) which also installed the Security Update KB2909210
    and rebooted the server.  On Monday morning (10/20/2014), when my terminal users logged into the sites, the sites began malfunctioning.  All the dropdown arrows turned into question marks.  Some fields which normally have a small "x"
    on the right-hand side used to erase the data entered in the text field were also displaying as question marks.  The objects still functioned but it was disconcerting to my users.  The update also slowed down these same intranet sites to where it
    began interfering with productivity.  I activated Compatibility View for all intranet sites, but it did not resolve the problem.
    I also found that when my terminal users tried to print a pdf document from the intranet sites, the print dialog box was jumbled and no fields were pre-populated with data like they always are when printing.  I updated to the latest Adobe Reader, but
    the print dialog box remained jumbled. 
    All of my users with stand-alone PCs have IE 10 installed and the intranet sites work fine.  The sites display properly and process quickly, and the print dialog box is not jumbled.  It is only my terminal users who log in from a thin client
    to their profiles on the server and use the IE version installed on the server who have the problem with IE10.  The KB2909210 Update is not installed on, and does not come up as, an update for any of my stand-alone Windows 7 PCs.
    I uninstalled IE 10 from my server, but since this was one of my production servers, I could not restart it until after the plant was shut down for the evening forcing my users to suffer with the slowness for the day.  This morning (10/21/2014) the
    intranet sites are working fine through IE 9.  I also had to revert back to Adobe Reader v9.5 as the v11 (and v10) print dialog box does not display properly in IE 9.
    I do not want to stay on IE 9 on my server as IE9 gets more un-secure by the day and we've found IE 11, on any of our machines, to be too buggy.
    How can I install IE 10 with its security updates and prevent it from breaking my intranet sites and print dialog box?  What is so different about Server 2008 R2 and Windows 7 that IE 10 causes this corruption of intranet sites and the print dialog
    box on the Server but not on the Win 7 machines?
    The bulletin here:
    https://technet.microsoft.com/library/security/ms14-011
    is useless for determining why it breaks my intranet sites. Nor does it explain why the update destroys the print dialog box.

    Hi,
    In my opinion, it's hard to say your problem caused by KB2909210. Have you tried to uninstall this update for test if your intrant site's problem resolved?
    If your problem truthfuly caused by this updates, you can choose to hid the update as a workaround method.
    Roger Lu
    TechNet Community Support

  • WDS on server 2008 std breaking .WIM files

    Hi,
    SUMMARY - 'Importing images into WDS seems to break them'
    I'm a bit green so i appologise if I'm being stupid. I'm installing and configuring WDS and MDT deployment within a mixed MS 2003 domain environment. We need to be able to deploy 32 bit images and the server will be used for servicing images as well
    as deploying and so (I think) I need to use Server 2008 standard as creating catalogue files on x64 systems for x86 images doesn't work.
    So - the system is:
    Server 2008 standard x86 edition; WDS Deployment Services Role; MDT 2012 Update 1; ADK 8, config manager tools for trace32.exe.
    I have imported win7 boot and install images directly from the original DVD .iso files, both x86 and x64. Both capture and setup images work ok. I've added network drivers to these successfully. I can deploy vanilla win7 x86 and x64 using WDS - this works
    fine.
    So my issue is: I've deployed vanilla windows 7 to a desktop, installed applications, updated config as nessecary etc. Booted using the appropriate capture image and captured a .wim file. I've copied this to my WDS server and imported it as an install
    image. When I try and deploy the image it fails just after the 'expanding windows files' stage. After looking in log files the error seems to be 'selected image file does not have a resource section'.
    I've gone back to the WDS server, exported these image files and tried to mount them using DISM - I get the same error: "1812 The specified image file did not contain a resource section"
    Mounting fails.
    Now I've tried mounting the .wim files using dism BEFORE I import them into WDS and they mount without any issues. As soon as I import them and export them again they will not mount any more.
    Please help, I don't know what else to try! :)
    Some things I've thought but can't find answers to: Can you use 2008 standard to deploy Windows 7 at all? (server is earlier version of windows)
    Is the apparent importing into WDS issue a red herring? Could it be that these images are broken from capture? Is there a way to test this without deploying the image using a USB stick instead of WDS?
    I've tried uninstalling the ADK and installing WAIK instead. Exactly the same result. Here are some choice extracts from dism.log:
    2015-03-02 17:33:18, Info                  CBS    Failed to find a matching version for servicing stack: C:\Users\softset\AppData\Local\Temp\MDTUpdate.2544\Mount\Windows\WinSxS\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.2.9200.16384_none_060a6d2998b13f25\
    [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
    2015-03-02 17:33:18, Info                  CBS    Failed to find servicing stack directory in online store. [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
    2015-03-02 17:33:18, Info                  CBS    Failed to get proc address for CMP_GetServerSideDeviceInstallFlags [HRESULT = 0x8007007f - ERROR_PROC_NOT_FOUND]
    2015-03-02 17:33:18, Info                  CBS    Failed to load CfgMgr32 DLL. [HRESULT = 0x8007007f - ERROR_PROC_NOT_FOUND]
    2015-03-03 15:29:27, Error                 DISM   DISM WIM Provider: PID=2852 Failed to mount the image. - CWimImageInfo::Mount(hr:0x80070714)
    2015-03-03 15:29:27, Error                 DISM   DISM WIM Provider: PID=2852 d:\w7rtm\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:999 - CWimManager::InternalOpMount(hr:0x80070714)
    2015-03-03 15:29:27, Error                 DISM   DISM WIM Provider: PID=2852 d:\w7rtm\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:2247 - CWimManager::InternalCmdMount(hr:0x80070714)
    2015-03-03 15:29:27, Error                 DISM   DISM WIM Provider: PID=2852 Error executing command - CWimManager::InternalExecuteCmd(hr:0x80070714)
    2015-03-03 15:29:27, Error                 DISM   DISM WIM Provider: PID=2852 d:\w7rtm\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:516 - CWimManager::ExecuteCmdLine(hr:0x80070714)
    2015-03-03 15:29:27, Error                 DISM   DISM.EXE: WimManager processed the command line but failed. HRESULT=80070714

    Hello JPNhingy,
    How to do you capture the .wim file?
    About the question: Can you use 2008 standard to deploy Windows 7 at all? The answer is: Yes, you can use the Windows Server 2008 to deploy Windows 7.
    You could create a capturer image in WDS, for more information, please take a look at the following article.
    http://social.technet.microsoft.com/wiki/contents/articles/11680.creating-a-capture-image-in-wds.aspx
    Additionally, you could use the sysprep to generalize the install image.
    https://technet.microsoft.com/en-us/windows/preparing-an-image-using-sysprep-and-imagex.aspx
    Best regards,
    Fangzhou CHEN
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Os x Server 3.1 breaks Profile Manager

    Hi all,
    since i update to server 3.1, the Profile Manager wont start.
    In the ive got these Error:
    0:: [245] [2014/03/20 20:15:14.725] Waiting for postgres to startup....
    0:: [245] [2014/03/20 20:15:18.445] +[PGConnection reloadPreferences]: DBDebug = NO, DBLogNotices = NO, DBLogSQL = NO, DBMonitor = NO
    0:: [245] [2014/03/20 20:15:29.432] Profile Manager service STOPPED
    1:: [245] [2014/03/20 20:15:29.927] Incoming request: noOp
    1:: [245] [2014/03/20 20:15:29.928] Incoming request: getWebAppState
    1:: [245] [2014/03/20 20:15:29.963] Registering for network reachability notifications to "gateway.push.apple.com".
    0:: [245] [2014/03/20 20:15:29.981] Profile Manager service stopped.
    0:: [245] [2014/03/20 20:15:29.987] APNS topic = com.apple.mgmt.XServer.dcbf90a0-c0ba-4dee-bcb6-39de366d4e87
    1:: [245] [2014/03/20 20:15:30.681] >>> networkSettingsChanged: "gateway.push.apple.com" is apparently reachable (flags = 0x2)
    1:: [245] [2014/03/20 20:16:03.409] Incoming request: getWebAppState
    0:: [245] [2014/03/20 20:16:03.727] Profile Manager service stopped.
    1:: [245] [2014/03/20 20:16:07.547] Incoming request: readSettings
    1:: [245] [2014/03/20 20:16:07.798] Incoming request: readAppDistributionSettings
    1:: [245] [2014/03/20 20:16:07.856] Incoming request: readSimplifiedDeviceEnrollmentSettings
    1:: [245] [2014/03/20 20:25:39.511] Incoming request: readSettings
    1:: [245] [2014/03/20 20:25:39.578] Incoming request: readAppDistributionSettings
    1:: [245] [2014/03/20 20:25:39.637] Incoming request: readSimplifiedDeviceEnrollmentSettings
    1:: [245] [2014/03/20 20:25:40.054] Incoming request: readSettings
    1:: [245] [2014/03/20 20:25:40.116] Incoming request: readAppDistributionSettings
    1:: [245] [2014/03/20 20:25:40.170] Incoming request: readSimplifiedDeviceEnrollmentSettings
    1:: [245] [2014/03/20 20:25:41.165] Incoming request: writeSettings
    0:: [245] [2014/03/20 20:25:41.508] -[NSString(devicemgr_Additions) dateFromOpenSSLString]: 'Jan 27 19:45:36 2015 GMT'
    0:: [245] [2014/03/20 20:25:41.672] -[Settings setSigningState:]: self.signing_org = cgrx
    0:: [245] [2014/03/20 20:25:41.679] Loaded strings for locale 'de'.
    0:: [245] [2014/03/20 20:25:42.105] EXCEPTION:  Postgres <-[PGConnection executeSQL:withParams:] (/SourceCache/RemoteDeviceManagement/RemoteDeviceManagement-864.18/Compiled/Fra mework-Models/Postgres/PGConnection.m:421): "Postgres error 23503 (ERROR:  insert or update on table "internal_tasks" violates foreign key constraint "internal_tasks_internal_task_id_fkey"
        DETAIL:  Key (internal_task_id)=(4) is not present in table "internal_tasks".
        CONTEXT:  SQL statement "INSERT INTO internal_tasks (internal_task_id, profile_substitution_cache_id) VALUES(p_it_id, psc.id) RETURNING id"
        PL/pgSQL function _dm_internal_psc_generation_task(profile_substitution_caches,integer,integer) line 19 at SQL statement
        SQL statement "SELECT _dm_internal_psc_generation_task(p, NEW.signing_certificate_id)
        FROM profile_substitution_caches AS p
        WHERE p.profile_cache IS NOT NULL
        AND p.signing_certificate_id <> NEW.signing_certificate_id"
        PL/pgSQL function _dm_trigger_after_settings_update() line 30 at PERFORM
        )">
    0:: [245] [2014/03/20 20:25:42.108] Caught unhandled exception -[PGConnection executeSQL:withParams:] (/SourceCache/RemoteDeviceManagement/RemoteDeviceManagement-864.18/Compiled/Fra mework-Models/Postgres/PGConnection.m:421): "Postgres error 23503 (ERROR:  insert or update on table "internal_tasks" violates foreign key constraint "internal_tasks_internal_task_id_fkey"
        DETAIL:  Key (internal_task_id)=(4) is not present in table "internal_tasks".
        CONTEXT:  SQL statement "INSERT INTO internal_tasks (internal_task_id, profile_substitution_cache_id) VALUES(p_it_id, psc.id) RETURNING id"
        PL/pgSQL function _dm_internal_psc_generation_task(profile_substitution_caches,integer,integer) line 19 at SQL statement
        SQL statement "SELECT _dm_internal_psc_generation_task(p, NEW.signing_certificate_id)
        FROM profile_substitution_caches AS p
        WHERE p.profile_cache IS NOT NULL
        AND p.signing_certificate_id <> NEW.signing_certificate_id"
        PL/pgSQL function _dm_trigger_after_settings_update() line 30 at PERFORM
    1:: [245] [2014/03/20 20:25:53.541] Incoming request: readSettings
    1:: [245] [2014/03/20 20:25:53.605] Incoming request: readAppDistributionSettings
    1:: [245] [2014/03/20 20:25:53.664] Incoming request: readSimplifiedDeviceEnrollmentSettings

    Great, now i have a new problem:
    sudo /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr/backend/wipeDB .sh
    Password:
    ***    Failed to create/update new Profile Manager database!     ***
    *** Please check /Library/Logs/ProfileManager/migration_tool.log ***
    *** for more information. Profile Manager will be non-functional ***
    *** until a new database can be successfully created/updated.    ***
    [1034] [2014/03/23 09:56:07.266] -[SULogFileCollection setGlobalLogLevelPrefix:]: YES
    0:: [1034] [2014/03/23 09:56:07.268]
        migration_tool-864.18 (PID:1034, OS:13C64, SERVER:13S4138, ARCH:x86_64) starting
        LA: migration_tool --wipeDB
        Log verbosity level = 1
        UID = 220, EUID = 220
    1:: [1034] [2014/03/23 09:56:13.050] DropPostgresDatabase RESULT:
        ————————+—————————————————————————————————————————————————————————————————————— —————————————————————————————————————————————————————————————
        COMMAND | /Applications/Server.app/Contents/ServerRoot/usr/bin/dropdb devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL
        WD      | /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr
        ————————+—————————————————————————————————————————————————————————————————————— —————————————————————————————————————————————————————————————
        STATUS  | 1
        ————————+—————————————————————————————————————————————————————————————————————— —————————————————————————————————————————————————————————————
        STDERR  | dropdb: database removal failed: ERROR:  database "devicemgr_v2m0" is being accessed by other users
                | DETAIL:  There are 10 other sessions using the database.
        ————————+—————————————————————————————————————————————————————————————————————— —————————————————————————————————————————————————————————————
        STDOUT  |
        ————————+—————————————————————————————————————————————————————————————————————— —————————————————————————————————————————————————————————————
    0:: [1034] [2014/03/23 09:56:13.050] EXCEPTION:  !IF <void DropPostgresDatabase(NSString *__strong) (/SourceCache/RemoteDeviceManagement/RemoteDeviceManagement-864.18/Compiled/Fra mework-Base/Support/PGUtilities.m:81): "'((status != 0))'">
    0:: [1034] [2014/03/23 09:56:13.052] Terminating on unhandled exception void DropPostgresDatabase(NSString *__strong) (/SourceCache/RemoteDeviceManagement/RemoteDeviceManagement-864.18/Compiled/Fra mework-Base/Support/PGUtilities.m:81): "'((status != 0))'", ? | 140735467216501
        ? | 4437587723
        ? | 4437841481
        ? | 4437841694
        ? | 4437434900
        ? | 140735464949245
        ? | 2
    0:: [1034] [2014/03/23 09:56:13.053] ShutdownMigrator: 2014-03-23 08:56:13 +0000
    0:: [1034] [2014/03/23 09:56:13.053] BYE

  • Server 3.1 Breaks Profile Manager (PM won't start)

    Hi All,
    Updated to server 3.1 this am and now Profile manager will not start. When I go to turn it on via the server app, its simple hangs on "starting" for a few minutes then reverts to "Off".
    I tried reverting to my backup of 3.0.3, but of course the service updates that are done by 3.1 prevent this.
    I'm also not seeing any devicemgr logs in the console.
    Any suggestions?

    When starting devicemgr from the terminal I get the following errors:
    2014-03-18 09:30:40.264 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:30:42.294 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:30:44.334 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:30:46.366 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:30:50.800 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:30:52.834 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:30:55.487 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:30:57.514 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:30:59.563 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:31:01.588 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:31:03.600 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:31:05.613 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:31:07.625 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:31:09.642 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    2014-03-18 09:31:14.284 serveradmin[3097:4e1f] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
    Thanks

  • How can I create prefilled and editable PDF's on a Linux server with PHP?

    I can create PDF's with editable form fields (extended features?) and serve those to our users and I can pre-fill form fields with data from the database using FDF, but then the PDF throws an error and the end user can't fill out the remaining fields (in Reader, it still works in Pro).
    I've tried 2 open source approaches already, but the end result is either a fillable form or a pre-filled form. I can't seem to do both at the same time.
    I've looked around adobe.com and frankly there's just so much stuff there that isn't even applicable it's staggering. I am completely lost and resorting to asking a question on a forum. I've searched these forms (and others), but anything related to this problem have no answers. I'm sure there's a way to do it.
    If I try to set the PDF to fetch the FDF using a http post/submit (can I get it to do that when it loads?) I would still have to get an id number into the query string or object on a per document basis (some how?) and that means editing the PDF server side which breaks the structure which then throws the error on the client side and I'm right back at the beginning again.
    At this point, it looks like it's going to take less time to simply create the form in HTML with a unique CSS file for the print version using a PNG for visual elements instead of a PDF. Not a great way to go for printing, but it would only take a day to set up. The time to create new forms is the issue. I don't want to spend 8 hours creating new HTML forms when I can do a PDF in 2 hours. Is it more efficient to go with an Adobe solution or roll my own HTML version?
    All I want to do is help the users save some time by pre-filing part of the form so they can print it.
    Any advice?

    Ok, I hope someone can move this to the Adobe Reader for Android forum, where you will find the experts you need.

  • Error while starting the weblogic admin server for OSB

    Hi all,
    Please help.
    My admin server startup is breaking for weblogic 11g for the following cause :
    Caused By: oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load elem
    ent "persistence-config"
    MDS-01370: MetadataStore configuration for metadata-store-usage "OWSM_TargetRepo
    s" is invalid.
    ORA-06550: line 1, column 12:
    PLS-00201: identifier 'MDS_INTERNAL_SHREDDED.GETREPOSITORYVERSION' must be decla
    red
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.mds.config.PConfig.loadFromBean(PConfig.java:684)
    at oracle.mds.config.PConfig.<init>(PConfig.java:499)
    at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:707)
    at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:764)
    at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:420)
    Truncated. see log file for complete stacktrace
    *>*
    *<Dec 15, 2011 12:51:22 PM GMT+05:30> <Error> <Deployer> <BEA-149231> <Unable to*
    set the activation state to true for the application 'wsm-pm'.
    *weblogic.application.ModuleException: [HTTP:101216]Servlet: "PolicyManagerValida*
    *tor" failed to preload on startup in Web application: "/wsm-pm".*
    oracle.adf.share.ADFShareException: MDSConfigurationException encountered in par
    seADFConfiguration
    at oracle.adf.share.config.ADFMDSConfig.parseADFConfiguration(ADFMDSConf
    ig.java:178)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.adf.share.config.ADFConfigImpl.getResultFromComponent(ADFConfi
    gImpl.java:472)
    at oracle.adf.share.config.ADFConfigImpl.getConfigObject(ADFConfigImpl.j
    ava:543)
    at oracle.adf.share.config.ADFConfigImpl.getConfigObject(ADFConfigImpl.j
    ava:521)
    at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.ja
    va:586)
    at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.ja
    va:581)
    at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.getMDSInstance(
    ADFContextMDSConfigHelperImpl.java:274)
    at oracle.adf.share.ADFContext.getMDSInstanceAsObject(ADFContext.java:16
    *19)*
    at oracle.wsm.repository.mds.MDSInstanceFactory.getMDSInstance(MDSInstan
    ceFactory.java:95)
    at oracle.wsm.policymanager.bean.AbstractBean.getRepository(AbstractBean
    *.java:298)*
    at oracle.wsm.policymanager.bean.AbstractBean.createSession(AbstractBean
    *.java:198)*
    at oracle.wsm.policymanager.bean.UpgradeManagerBean.seedWSMPolicyReposit
    ory(UpgradeManagerBean.java:506)
    at oracle.wsm.policymanager.web.PolicyManagerValidator.init(PolicyManage
    rValidator.java:111)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(St
    ubSecurityHelper.java:283)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    *120)*
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecuri
    tyHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubL
    ifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHel
    per.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
    Thanks...

    I had a few packages and types in Invalid state.
    I compiled the same.
    But even then the same problem persists.
    Please help if any idea of any other change that may be needed..
    Thanks in advance

  • Multi-threaded performance server using 2 ports to two-way communication

    Hi, I'm new in the forums so welcome everyone. I'm developing now an online computer game based on orginal Polish board-game, but it doesn't mean. Important is that I need to develope a high-performance multi-threaded server, which can serve... let's say few hundres of games, and a thousend of players simulateously. My server works on two ports/sockets.
    First one is represented by "ServerSocketChannel clientConSsc" in my code. The main thread in my server class which invokes the method "run()" (which You can see below), registers clientConSsc with Selector and then repeatingly accepts incoming connections from clients on this socket. When connection(channel) is estabilished and clients wants to write some request to this channel, the main thread on server creates a new instance of class "RequestHandler" which extends Thread and handles this request (reads the request from channel, makes some changes on server, spreads some new messages to other clients in the same game and so on... everything on the same socket/port/channel). Then the channel/connection is closed by the server - I call such connections: "a short connections". In the same time the main thread continues the loop and is still able to accept connections from another players. That's the idea of multi-threaded server, right? :) And to this point, everything works fine, but... what if the server wants to trigger some new command, write new information to client?
    Server could have tried to open a SocketChannel to client's IP address, but then the client programme would have to create and ServerSocketChannel object, bind it to some InetAddress and then... and then client becomes a server! - that breaks the idea of client-server cooperation and demands on players of my game to have routed some port on their machines. To resolve this problem I made some sort of "system" which, when some player/client is logging into my server, accepts second (this time constant, not "short") connection on the second port I mentoined on the beginning. This connection is held in variable "SocketChannel serverCon" of class "Player" - which reflects a player logged onto server. Server maintains every such connection till the client logs off. After the connection is accepted, the player whom connection it was is added to collection called "playersToRegisterToWrite". After the Selector.selectNow() is invoked (as You can see in the code below), each and every player's connection is registered in selector (with selection key - OP_WRITE and attachment pointing on owning player). In the same time client's code is trying to read some bytes from this connection and blocks on it until some bytes are written to this connection. When server wants to "tell" something to client, deliver some message/command, it creates a new instance of class which extends an abstract class called "ServerAction" (another new thread) and adds it to collection "actionsToDo". In ServerAction's method "run()" there are whole code to interact with client (e.g. send an update of players' list, an update of games' list, a chat message). Finnaly when Selector informs the server that some connection is writable (some client is waiting for commands), then server checks if there's any "actionToDo" involving this client/player. If there is, it unregisters the connection from Selector (so no other ServerAction (thread) can write on this connection) and starts the action. At the end of every "run()" method of subclass of ServerAction there's a code, which again adds the player to collection "playersToRegisterToWrite", so the player's connection can again be registered in Selector and the player can again receive informations from server - after it consumed THIS "ServerAction".
    It looks to me like it should be working fine, but it's not. When I test my server and clients on the same machine (no ping/latency) everything seems to be working fine. But when it comes to play my game with somebody even on LAN or through the Internet there comes the problems. My first socket I describe (and first type of connections - short connections) works perfectly fine, so the requests triggered by client are delivered and handled properly. But the second socket is cirppling. For example: the server triggers a command refering to an update of clients logged to server' list. It is triggered by Selector so the client should be ready to read data from server, so the server sends data! And the client never receives it... Why?
    It experimented a whole lot of time on SocketChannel's method "configureBlocking(boolean)", but it never helps. I think the client should always block it's listening thread on connection, contratry to server which is ment to be fast, so it should send the data through non-blocking channels. Am I right? Are there any rules refering blocking configuration of SocketChannels?
    I will be grateful for every answer. To help You out I attach also drafts from run()'s methods of my classes.
    Server's main method - main thread :
        public void run() {
           try {
                selector = Selector.open();
                clientConSsc.configureBlocking(false);
                clientConSsc.register(selector , SelectionKey.OP_ACCEPT);
                while(serverRunning) {
                    try {
                        selector.selectNow();
                        Iterator it;
                        synchronized(playersToRegisterToWrite) {
                            it = playersToRegisterToWrite.iterator();
                            while(it.hasNext()) {
                                Player player = (Player)it.next();
                                it.remove();
                                player.serverCon.configureBlocking(false);
                                player.serverCon.register(selector , SelectionKey.OP_WRITE , player);
                        Set keys = selector.selectedKeys() {
                        it = keys.iterator();
                        while(it.hasNext()) {
                            SelectionKey key = (SelectionKey)it.next();
                            if(key.isAcceptable()) {
                                it.remove();
                                clientCon = clientConSsc.accept();
                                clientCon.configureBlocking(false);
                                clientCon.register(selector , SelectionKey.OP_READ);
                                continue;
                            if(key.isReadable()) {
                                it.remove();
                                key.cancel();
                                new RequestHandler(this , (SocketChannel)key.channel()).start();
                                continue;
                            if(key.isWritable()) {
                                if(key.attachment() != null ) {
                                    ServerAction action = null;
                                    synchronized(actionsToDo) {
                                        Iterator aIt = actionsToDo.iterator();
                                        while(aIt.hasNext()) {
                                            ServerAction temp = (ServerAction)aIt.next();
                                            if(temp.getPlayer().equals((Player)key.attachment())) {
                                                action = temp;
                                                aIt.remove();
                                                break;
                                    if(action != null) {
                                        key.channel().configureBlocking(false);
                                        it.remove();
                                        key.cancel();
                                        action.start();
                                continue;
                    } catch(Exception e) {
                        statusArea.append(e.toString() + "\n");
                        e.printStackTrace();
                        continue;
            } catch(ClosedChannelException e) {
                statusArea.append(e.toString() + "\n");
            } catch(IOException e) {
                statusArea.append(e.toString() + "\n");
                A part of server's RequestHandler's class' method run() - the method which handles requests triggered by client on first port:
    public void run() {
            boolean served = false;
                try {
                    channel.configureBlocking(true);
                    retryCount++;
                    retry = false;
                    String command = ns.readText(channel).trim();
                    ns.statusArea.append("ktos przesyla komende: " + command + "\n");
                    if(command != null && !command.equals("ERROR")) {
                        String[] cmd = command.split("�");
                        ns.statusArea.append("komenda: " + cmd[0] + "\n");
                        if(cmd[0].equals("CHAT")) {
                            if(cmd.length != 5) {
                                retry();
                            } else {
                                if(cmd[2].equals("NOGAME")) {      // jezeli nie ma okreslonej gry czyli rozsylamy do wszystkich
                                    for(int i = 0 ; i < ns.loggedPlayersListItems.size() ; i++) {
                                        Player current = (Player)ns.loggedPlayersListItems.get(i);
                                        if(current.state == Player.CHOOSING && !current.equals(new Player(Integer.parseInt(cmd[1]))))   // jezeli gracz jest w okienku wybierania gry to wysylamy mu broadcast
                                            ns.actionsToDo.add(new SendMsg(ns , current , "CHAT�" + cmd[1] + "�" + cmd[3] + "�" + cmd[4]));
                                } else {
                                    Game game = (Game)ns.gamesListItems.get(ns.gamesListItems.indexOf(new Game(Integer.parseInt(cmd[2]))));
                                    for(int i = 0 ; i < game.players.size() ; i++) {
                                        Player current = (Player)game.players.get(i);
                                        if(!current.equals(new Player(Integer.parseInt(cmd[1]))))
                                            ns.actionsToDo.add(new SendMsg(ns , current , "CHAT�" + cmd[1] + "�" + cmd[3] + "�" + cmd[4]));
                                served = true;
                        } else if(cmd[0].equals("GETGAMEINFO")) {
                            if(cmd.length != 3)
                                retry();
                            else {
                                int gameID = Integer.parseInt(cmd[2]);
                                ns.statusArea.append("poproszono o informacje o grze nr: " + gameID + "\n");
                                Game checkedGame = new Game(gameID);
                                if(ns.gamesListItems.contains(checkedGame)) {
                                    Game game = (Game)ns.gamesListItems.get(ns.gamesListItems.indexOf(checkedGame));
                                    channel.configureBlocking(true);
                                    ObjectOutputStream oos = new ObjectOutputStream(channel.socket().getOutputStream());
                                    oos.writeObject(game);
                                    oos.writeObject(game.players);
                                    oos.flush();
                                    ns.statusArea.append("wyslano informacje o grze nr: " + gameID + "\n");
                                } else {
                                    ns.statusArea.append("brak gry o nr: " + gameID + "\n");
                                served = true;
                } catch(IOException e) {
                    e.printStackTrace();
            if(!served) {
                ns.findAndDisconnectPlayer(channel);
            try {
                channel.close();
            } catch(IOException e) {
                e.printStackTrace();
        }An example of ServerAction's subclass - the class which triggers server commands to client on second port:
    class UpdateLoggedPlayersList extends ServerAction {
        public UpdateLoggedPlayersList(NeuroServer ns , Player player) {
            super(ns , player);
        public void run() {
            try {
                serverCon.configureBlocking(true);
                ns.sendText("UPDATELOGGEDPLAYERSLIST" , serverCon);
                if(ns.readText(serverCon).equals("OK")) {
                    ObjectOutputStream oos = new ObjectOutputStream(serverCon.socket().getOutputStream());
                    oos.writeObject(ns.loggedPlayersListItems);
                    oos.flush();
                synchronized(ns.playersToRegisterToWrite) {
                     ns.playersToRegisterToWrite.add(player);
            } catch(IOException e) {
                e.printStackTrace();
    }A part of client's CmdHandler's class' method run() - the method which handles commands triggered by server:
    public void run() {
        try {
            while(works) {
                String command = nc.readText(nc.serverCon);
                System.out.println("Server przesyla komende: " + command + "\n");
                String[] cmd = command.split("�");
                if(cmd[0] != null && !cmd[0].equals("ERROR")) {
                    if(cmd[0].equals("CHAT")) {
                        if(nc.chooseGameDialog != null && nc.chooseGameDialog.isVisible()) {     // jezeli na wybieraniu gry
                            newChatEntry(cmd[2] , null , cmd[3] , nc.chooseGameDialog.chatPane);
                        } else if(nc.readyDialog != null && nc.readyDialog.isVisible()) {  // jesli na przygotowywaniu
                            Player sender = (Player)nc.actGame.players.get(nc.actGame.players.indexOf(new Player(Integer.parseInt(cmd[1]))));
                            newChatEntry(cmd[2] , sender.fraction , cmd[3] , nc.readyDialog.chatPane);
                        } else if(nc.ng != null) {                   // jesli w grze
                            Player sender = (Player)nc.actGame.players.get(nc.actGame.players.indexOf(new Player(Integer.parseInt(cmd[1]))));
                            newChatEntry(cmd[2] , sender.fraction , cmd[3] , nc.ng.inGameChatPane);
                    } else if(cmd[0].equals("UPDATELOGGEDPLAYERSLIST")) {
                        nc.sendText("OK" , nc.serverCon , false);
                        nc.serverCon.configureBlocking(true);
                        ObjectInputStream ois = new ObjectInputStream(nc.serverCon.socket().getInputStream());
                        DefaultListModel players = (DefaultListModel)ois.readObject();
                        nc.chooseGameDialog.updateLoggedPlayersList(players);
        } catch(IndexOutOfBoundsException e) {
            System.out.println(e);
        } catch(IOException e) {
            System.out.println(e);
        } catch(ClassNotFoundException e) {
            System.out.println(e);
    }And two methods I used in codes above: sendText(String text , SocketChannel sc) and readText(SocketChannel sc) - they are my "utility" methods, which I use to send and receive Strings through specified SocketChannels.
    boolean sendText(String text , SocketChannel sc) {
        ByteBuffer bbuf = ByteBuffer.allocate(BSIZE);
        boolean sendRetry;
        boolean sent = false;
        do {
            sendRetry = false;
            try {
                StringBuffer cmd = new StringBuffer();
                cmd.setLength(0);
                if(text.length()+4 < 100)
                    cmd.append("0");
                if(text.length()+4 < 10)
                    cmd.append("0");
                cmd.append(Integer.toString(text.length()+4) + "�");
                cmd.append(text);
                cmd.append("\n");
                bbuf = charset.encode(CharBuffer.wrap(cmd));
                sc.write(bbuf);
                bbuf.clear();
                int n = sc.read(bbuf);
                if(n == 1) {
                    bbuf.flip();
                    Byte re = bbuf.get();
                    if(re == 1) {
                        sendRetry = true;
                    } else {
                        sent = true;
            } catch(Exception e) {
                findAndDisconnectPlayer(sc);
                try {
                    sc.close();
                } catch(IOException f) {
                    f.printStackTrace();
                return false;
        } while(!sent && sendRetry);
        return true;
    String readText(SocketChannel sc) {
        ByteBuffer bbuf = ByteBuffer.allocate(BSIZE);
        int readRetryCount = -1;
        boolean readRetry;
        do {
            readRetry = false;
            readRetryCount++;
            StringBuffer cmd = new StringBuffer();
            cmd.setLength(0);
            bbuf.clear();
            try {
                readLoop:
                while(true) {
                    int n = sc.read(bbuf);
                    if(n > 0) {
                        bbuf.flip();
                        CharBuffer cbuf = charset.decode(bbuf);
                        while(cbuf.hasRemaining()) {
                            char c = cbuf.get();
                            if(c == '\r' || c == '\n') break readLoop;
                            cmd.append(c);
                    } else break;
                statusArea.append(Thread.currentThread().getId() + " readText() odczytuje: " + cmd.toString() + "\n");
                if(cmd.length() < 3 || Integer.parseInt(cmd.substring(0 , 3)) != cmd.length()) {
                    sc.write(ByteBuffer.wrap(new byte[] {1}));
                    readRetry = true;
                } else {
                    sc.write(ByteBuffer.wrap(new byte[] {0}));    // length OK
                    return cmd.toString().substring(4 , cmd.toString().length());
            } catch(Exception e) {
                findAndDisconnectPlayer(sc);
                try {
                    sc.close();
                } catch(IOException f) {
                    f.printStackTrace();
                return "ERROR";
        } while(readRetry && readRetryCount < 3);
        findAndDisconnectPlayer(sc);
        try {
            sc.close();
        } catch(IOException e) {
            e.printStackTrace();
        return "ERROR";
    }Edited by: Kakalec on Jul 23, 2008 11:04 AM

    You seem to be using a horrendous mixture of PrintWriters, BufferedReaders, ObjectOutputStreams, and no doubt ObjectInputStreams. You can't do that.
    Some rules about this:
    (a) Whenever you use a stream or reader or writer on a socket, you must allocate it once for the life of the socket, not every time you want to do an I/O.
    There are many reasons for this including losing buffered data in the old stream and auto-closure of the socket on garbage-collection of the old stream.
    (b) You can't mix stream types on the same socket. (i) If you're writing objects, use an ObjectOutputStream, you must read with an ObjectInputStream, and you can't read or write anything that isn't supported by the API of ObjectOutputStream. (ii) If you're writing lines, use a BufferedWriter and a BufferedReader at the other end. If you're writing characters, use a Writer and a Reader. (iii) If you're writing primitive data or UTF strings, use a DataOutputStream and a DataInputStream. (iv) If you're writing bytes, use DataOutputStream and a DataInputStream or an OutputStream and an InputStream. You can't mix (i), (ii), (iii), and (iv).
    (c) Don't use PrintWriter or PrintStream over the network. They swallow exceptions that you need to know about. They are for writing to the console, or log files, where you don't really care about exceptions.
    (d) Call flush() before reading.
    (e) Always close the 'outermost' output stream or writer of a socket, never the input stream or the socket itself. Closing any of these closes the socket and therefore makes the other stream unusable, but only closing the output stream/writer will flush it.

  • Perfmon Counters breaking when CF9 installed on Windows 2008 R2 Full

    Hi,
    It seems that installing CF9 on Windows Server 2008 R2 breaks the perfmon counters on the server. I had originally tried this on core edition which broke the counters but it was pointed out here that core edition is not specifically listed as being supported. I have now tried it on the full web edition and am having the same problem.
    The problem is that after I install Coldfusion 9 and reboot, when I open perfmon on that server (or remotely) the list for the perfmon counters is completely blank. There is a scroll bar looks like there is a long list of perfmon objects/counters to choose from (in that I can drag it up and down) but the list is just empty/white and nothing can be clicked on i.e. no text or selections.
    I have taken a snapshot and repeated this installation over and over again with or without components installed to the same result.
    If I try to pull perfmon information via WMI (using this powershell script) I can see that all the win32_PerfRawData  and win32_PerfFormattedData classes are missing - including those not  relating to IIS. They were definitely there before installing CF9.
    Here are my steps to reproduce:
    I am installing on a VMWare virtual server.
    1. Installing Windows Server 2008 R2 Web Full edition
    2. Disable the firewall for all profiles
    3. Set an ip address etc
    4. Join Server to domain
    5. Enable remote desktop
    6. Install IIS with all options selected (except webdav)
    7. Install CF9 64 bit
        --- Visual C++ is installed first then I restart
        --- Check perfmon and everything is showing fine
        --- I run the installer again and install with defaults (have tried with odbc connections etc on and off and using the built in webserver and IIS)
        --- Check perfmon and everything is still ok
        --- I reboot the server and check perfmon only to see the list empty as above
    Anyone got any ideas?
    Can anyone replicate this issue as it is driving me insane!?

    I have found this issue in the CF bug tracker:
    http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html?CFID=38212427&CFTOKEN =9293573d67b82c76-7275E24B-5056-A60A-FF3827E8667908C6&jsessionid=2a307a58d045adff0662325b1 331d261b642#bugId=83344
    Considering this issue doesn't seem to have been resolved I wonder why it was closed off. Will double check with the 9.01 update to see if it resolves the issue.

  • Changing DNS Server on Lion OD/Kerberos Master

    I have an interesting task ahead of me, but am unsure how best to proceed.
    I spent days setting-up my new Lion Server and attached Pegasus RAID array.  There are 140 users, 8 share points, and hundreds of different ACL permutations within the AFP shares that reside on a thunderbolt-attached Pegasus array.  The only services running on the box are DNS, AFP, and OD.
    I added a secondary server and intended to use it as an OD replica (redundancy is great, but the speed increase would also be great).  Problem is that I set them both with .local names.  I can't get an OP replica to run unless they are within the same DNS zone, and so that is what I am looking to do.
    I have read a lot of Apple support documents and a couple books, and understand that changing the DNS server will likely break OD (certainly Kerberos).
    My goal is to re-zone the DNS while preserving OD users, groups, passwords, and most importantly: how they relate to the ACLs on the Pegasus unit (I would very much like to avoid having to re-do all those permissions - particularly within the Lion Server UI).
    If I need to do a re-install and then laterally migrate, I certainly can.  I am hoping for the path of least headache to be sure.
    If anyone has advise on how to do this as painlessly as possible, I would appreciate it.

    Will the OD archive contain the old DNS settings and somehow muck this up?
    I don't know the answer to all of your questions but I do know this: If you have an OD archive from a master that had an incorrect hostname, this information was put into your archive.
    "Open Directory" is comprised of three components: PasswordServer, LDAPv3 and Kerberos. This is what is backed up during an OD Archive. So if you have a archive from a machine with messed up DNS, I would not trust that everything will be fine after the restore.
    Maybe somebody else can chime in and offer you further help...

  • New Windows Server 2012 unable connect to Netlogon Service or update DNS records

    Hi everybody, all of my Windows Servers 2012 decided to collapse after innocuous group policy update that was meant to make user passwords more secure.
    The AD and DNS seem to be functioning "normally", I am able to add new Windows7 and Windows Server 2008 machines to the domain, I can see them in listed in the AD and DNS record are update correctly, however, as soon as I try to join Windows Server
    2012 it breaks.
    The event log is littered on the new server with:
    The system failed to register host (A or AAAA) resource records (RRs) for network adapter
    with settings:
               Adapter Name : {DB7F73CE-E011-4F3C-BEBC-2CE7A871DF51}
               Host Name : CHEETAH
               Primary Domain Suffix : somedomain.com
               DNS server list :
    192.168.0.5
               Sent update to server : <?>
               IP Address(es) :
    192.168.0.15
    The reason the system could not register these RRs was because the update request it sent to the DNS server timed out. The most likely cause of this is that the DNS server authoritative for the name it was attempting to register or update is not running
    at this time.
    You can manually retry DNS registration of the network adapter and its settings by typing 'ipconfig /registerdns' at the command prompt. If problems still persist, contact your DNS server or network systems administrator.
    and
    Name resolution for the name _ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.somedomain.com. timed out after none of the configured DNS servers responded.
    When I try to ping the primary DC (WS2003) it fails, the Secondary DC (WS2012) responds.
    The >nltest /sc_query:somedomain.com on Windows Servers 2012 returns:
    Flags: 0
    Trusted DC Name
    Trusted DC Connection Status Status = 1311 0x51f ERROR_NO_LOGON_SERVERS
    The command completed successfully
    yet it works on all other machines.
    I tried removing 2012 servers from the domain and rejoining - without success. The cookie crumbled when I added two new installations of Windows Server 2012 & 2008 and 2008 worked fine but 2012 showed same symptoms.
    There is one peculiar thing that I had noticed on all Windows 2012 machines, it constantly showing "Workplace Connection - Connecting" in the networks pane on the right side of the screen, which I can't say i ever noticed before.
    Unfortunately, the secondary DC is a multihoming server with Direct Access role - I am not sure if this may play some part but our existing configuration worked for a year now without any problems. Issue appeared when I changed the password complexity rule,
    which boggles the mind. I wonder if there has been some other changes in GPO that did not propagate from years ago and finally comeback to break things.
    Any suggestions would be really appreciated.
    wmin

    Hello Ace, i wish you a Happy New Year! I hope your break was enjoyable and filled with cheer.
    In the end I had to bite the bullet and reinstall all troublesome servers. Your recommendations from above removed some serious problems with the DA and DNS resolution.
    I was able to attach new server to the domain without any problems and begin painful process of rebuild.
    I have promoted TIGER to full DC controller role, but having some issues with replication. Although running >repadmid /showrepl gives positive
    feedback, the sysvol folder on the secondary DC is empty.
    Also there is a couple of warnings in the event log:
    Event ID 4012
    Log Name: DNS Server
    Source: DNS-Server-Service
    The DNS server is waiting for Active Directory Domain Services (AD DS) to signal that the initial synchronization of the directory has been completed. The DNS server service cannot start until the initial
    synchronization is complete because critical DNS data might not yet be replicated onto this domain controller. If events in the AD DS event log indicate that there is a problem with DNS name resolution, consider adding the IP address of another DNS server
    for this domain to the DNS server list in the Internet Protocol properties of this computer. This event will be logged every two minutes until AD DS has signaled that the initial synchronization has successfully completed.
    - which has not repeated since 3rd of Jan.
    These events occur on the primary DC every few minutes:
    Event ID 1030
    Source: Userenv
    Log Name: NT AUTHORITY\SYSTEM
    Windows cannot query for the list of Group Policy objects. Check the event log for possible messages previously logged by the policy engine that describes the reason for this.
    For more information, see Help and Support Center at
    http://go.microsoft.com/fwlink/events.asp.
    Event ID 1058
    Source: Userenv
    Log Name: NT AUTHORITY\SYSTEM
    Windows cannot access the file gpt.ini for GPO CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=somedomain,DC=com. The file must be present at the location <\\somedomain.com\sysvol\somedomain.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\gpt.ini>.
    (The network name cannot be found. ). Group Policy processing aborted.
    For more information, see Help and Support Center at
    http://go.microsoft.com/fwlink/events.asp.
    Should sysvol folder be shared on the secondary DC? Another interesting thing to point out is that
    \\somedomain.com\sysvol\somedomain.com\Policies\ can be access
    from all other machines except the DC1.
    Cheers!
    kind regards,
    wmin

  • Report page break not correct in browser

    Hi all
    I have 150+ reports that I am converting from 6i to 10g. These repors print correctly in 6i (client SErver) with page break at proper places. When I run the same report on web, the page breaks in the reports are converted to lines in the html output. Also the page headers appearin the middle of the page. Page break seems to be controlled by the browser and not by report. How do I make the report page break the same way as in 6i.
    any help is appreciated. We are in the middle of testing and the users will not sign off until this is resolved.
    Rgds
    Arvind

    SET
    System parameter MODE = Default
    On Report Level Property Sheet
    Under Report Escapes
    SET After Page Value =
    <table style="page-break-before: always;height=0"></table>
    Run reports as DESFORMAT=HTML
    This will resolve the Page Break issue.
    Unfortunately, printing reports from browser will generate a blank last page.
    Perhaps the command line parm BLANKPAGES=NO will work for you...
    I am told it does not work because printing is a browser issue not a reports issue...

  • Is Lion Server Better than SL Server?

    For those of you who have upgraded your Snow Leopard servers to Lion, is it worth it?  I have upgraded my desktop Macs and my MBP to Lion, but I hesitate to upgrade the Mac mini servers I am running for my company because of upgrade glitch and performance concerns.
    My impression of Lion at this point is that most of the enhancements are in the user controls and the desktop, which are not important issues for the servers.  The Macs that I upgraded from SL to Lion actually appear to be more sluggish than before, particularly when it comes to network performance and streaming, so I have yet to see an actual performance advantage beyond the changes to the user interface.
    I also have a lot of web applications using MySQL and I have read reports of the Lion upgrade breaking MySQL from the SL install.  I am also running the Apache security module (ModSecurity), which was difficult to install in SL.  I had to manually build the library files for it so I'm assuming the Lion upgrade will break the ModSecurity installation.
    Are my fears unfounded or will an upgrade to Lion from SL be problematic on a production server that's run for a business?

    I wouldn't upgrade it yet on a production machine since there are issues. Actually it's probably best to do it on a test Server and manually migrating the data over to Lion Server at this point.
    It's true a lot of things break if you just do a plain upgrade over SLS since I upgraded my own test server to evaluate Lion Server before upgrading my clients SLS. I have yet seen any upgrades from any server version work well. Something normally doesn't transfer well and best to manually migrate stuff.
    If you do a clean install of Lion and then Install Lion Server most things work pretty well so far such as mail and apache, and OD.
    NOTE: However you need to have at least at DNS already running on another machine so when Lion Server does a reverse name lookup, It'll find the name of the server. If you at any point change the name of the Lion Server, you'll break links and other stuff don't seem to work well.  This also solves the issue of nstat_lookup_entr failed.
    So far I've Installed Pure-FTPd Manager 1.8 and Recompiled pure-ftpd 1.0.32 and works fine in 10.7 Server. I'll give more of a progress report over the next few days as I configure the server to my liking.
    Even though Apple removed mysql in Lion Server. You can install mysql from mysql.com,  Mac OS 10.6 64bit version.  As for what I read online, it should work. I've installed it but haven't tested it yet, but should have it running in the next day and see how it runs.

Maybe you are looking for

  • Error Message relating to cache ???

    I am getting a weird error message which says: "The following errors occurred while trying to open this document: Missing File cache-1 Missing File cache Missing File cache-2" This page has 4 images which I retrieved from iPhoto, and appear on the iW

  • Bootcamp 3.1 ram limitation on x64

    Hi all, i'm using a 27" i7 iMac and running Windows 7 64bit via bootcamp 3.1 Now i've 4gb ram on my mac, but i want to upgrade it to 8 or 16gb.. I'm wondering is there any limitation on bootcamp ram limit? Is there any chance of Windows can't read 16

  • Boot Camp, Vista, Gear Head Bluetooth Keyboard & Mouse

    Just added a Gear Head bluetooth keyboard and mouse for Mac to my Mac Mini. This Mac Mini is running Boot Camp with Windows Vista Home Premium. The bluetooth keyboard and mouse work fine under Mac. When I boot to Vista, I was able to install the Mous

  • With the new update playing music is messed up

    Why when playing my music on my phone and stop it then want to continue it later the "now playing" bottom is no longer there.

  • How to find the nearlest value in 1-D array ?

    Hi.. everybody.. I need to seperate the raw data(1-D) into 2 group of array by the center value and then make the average value in each array. But I also still have the problem about if the center value is not the same of some value in the 1-D array.