Pete Greskoff · May 22, 2018 go to post

I don't see anything recently suggesting a similar problem or any changes in the product (though I may have missed something). I suggest filing a WRC issue for this for a more detailed investigation, but I'll give you my best guess here:

I suspect you typically start/stop the instance as a user that is not an Administrator. When you did the upgrade, you did so as an Administrator, and that left the instance running, started by an Administrator. The difference in which user started the instance likely caused the problem shutting down as another user. Given that, I'd expect that subsequent startups as a non-Admin user would allow for shutdowns also as a non-Admin user.

If this isn't the case, please provide the cconsole.log and the Caché SYSLOG ('do ^SYSLOG' from the %SYS namespace) to the WRC, and we'll be happy to help.

Pete Greskoff · May 18, 2018 go to post

I suspect that the database has 2 KB block size. It would be mountable in 2008, but not in 2014. If you still have access to the 2008 system, you can run GBLOCKCOPY to convert the database to 8 KB blocks.

Pete Greskoff · May 17, 2018 go to post

You should definitely contact the WRC about this. We will definitely want to look at your cconsole.log file. My best guess without much information is that a Caché process died abnormally (was killed at the OS level, or some other way that it wouldn't go through Caché halt codes) while holding onto the resource that controls access to the PID table. This basically prevents any new processes from being created. 

You'll likely need to run 'ccontrol force cache' to get the system down, but please collect a CacheHung report beforehand (a script in the /bin directory of the instance) to provide to the WRC.

Pete Greskoff · May 7, 2018 go to post

The message in the original description comes from the kernel, so you wouldn't be able to find it searching the code. It is not related to mirroring (though the message you reference would certainly be a mirroring issue).

Pete Greskoff · May 7, 2018 go to post

These messages generally mean that a process is trying to run a routine as it is re-compiled, and the kernel realizes that the routine has changed out from under it. They don't necessarily indicate a problem, hence the informational 'level-0' message.

Pete Greskoff · Apr 13, 2018 go to post

Yes, you can compact and truncate the database, though depending on your version, those utilities may not be safe to use.  The most recent alert on that is here. If you're on a version older than that, you can run GBLOCKCOPY to clear up space, though that requires downtime.

Pete Greskoff · Mar 29, 2018 go to post

I think this is a better question for support. I recommend opening a WRC issue for this.

Pete Greskoff · Feb 9, 2018 go to post

Wireshark is a great tool, and it's likely your best option for actually viewing the traces on your system.

However, you would need to use another tool to actually collect the trace if you are not running on Windows. Packet tracers vary by platform, with tcpdump being by far the most common (and easiest to find information about how to use it online), but you may also need to use iptrace or snoop, which are similar, but have their own quirks. 

Pete Greskoff · Jan 11, 2018 go to post

You want to use the condition parameter of zbreak. Take a look at this code:

zTestDebug
x(1,2,3) = -2
x(1,2,3) = 1
x(1,2,3) = 3

If I do the following with zbreak:

zb *x:"B":"$g(x(1,2,3))>0"

This just breaks if x(1,2,3) is greater than 0. Then execute the routine, this is what happens:

%SYS>d ^zTestDebug
 s x(1,2,3) = 1
 ^
<BREAK>zTestDebug+2^zTestDebug
%SYS 2d0>g
 s x(1,2,3) = 3
 ^
<BREAK>zTestDebug+3^zTestDebug
%SYS 2d0>g
%SYS>

Pete Greskoff · Jan 9, 2018 go to post

You can add an argument to $zf(-2) such that the child PID is returned in $ZCHILD. This is documented here. For reference:

s rc=$zf(-2,"program","","",1) 
s childpid=$ZCHILD 
Pete Greskoff · Jan 2, 2018 go to post

An important note from the docs about Emergency Mode:

  • On Windows systems, the user must be a member of the Administrators group.

  • On UNIX® and MacOS systems, the user must be root or the owner of the instance.

If you try to run Emergency Mode without these privileges, you may get an error on startup that may not sound like a permissions problem, but it really is. If you're running Windows, make sure to run cmd as Administrator.

Pete Greskoff · Nov 16, 2017 go to post

Security.Users Export method is what you need. It does allow you to specify usernames or roles to export. From the docs:

 classmethod Export(FileName As %String = "UsersExport.xml", ByRef NumExported As %Integer = 0, Usernames As %String = "*", Roles As %String = "*", SQLPrivileges As %Boolean = 0, ByRef NumSQLPrivilegesExported As %Integer)as %Status

This method exports User records to a file in xml format.
Parameters:
Filename - Output file name
NumExported (byref) - Returns number of records exported.
Usernames - Comma separated list of Usernames to export, "*" = All
Roles - Comma separated list of Roles, "*" = All. Export Users containing only these roles
SQLPrivileges - 1/0 flag. If 1, export all SQL Privileges from all namespace on this system that have been directly granted to this Role
NumSQLPrivilegesExported *byref) - Returns number of SQL Privileges and SQL Admin Privilege Set records exported

Pete Greskoff · Nov 16, 2017 go to post

You should look at the cconsole.log in <install-dir>\mgr\ to see what the specific errors are.

Pete Greskoff · Nov 9, 2017 go to post

I'm a bit confused by this question. When a failover happens, all the connections to the instance will be forcibly shut down, since the instance will be forced down. 

If you want to do anything to start things up at a specific point in the process of the other node becoming primary, you can put code in ZMIRROR.

Pete Greskoff · Nov 3, 2017 go to post

Anything launched by $zf(-1) is going to run as the user that is running the original process. In the case of a Caché terminal session, that will just run as whatever user is running the terminal, and there's no way to get around that. 

If you were to use another method to run the $zf command, such as a Telnet connection, or running it via the Caché task manager, the process would instead run as the user who owns the Caché Controller services. So, if you REALLY need to be able to run cmd as an administrator, the best way would be to make the user who owns Caché  the system administrator user, and then run this code via the task manager (you could use a RunLegacyTask).

All that said, I have to agree with Rubens, this is not an ideal setup for security reasons, why can't you just make it such that your executable will run without the need for administrator access? Is there a particular reason why it requires administrator rights?

Pete Greskoff · Oct 31, 2017 go to post

If you are using the Cube's terminal, you can define a connection (Preferred Server -> Add/Edit) that points to the VIP (assuming that the 2 mirrored instances are using all the same ports). You could then make that the preferred server (Preferred Server -> click on that connection). Then the default behavior for that cube's terminal would be to connect to the VIP address.

However, if you are trying to run scripts on only the primary server, you may want to look into using task manager. You can define tasks to run only on the primary mirror member. You could have the task call out to the script on both instances, and it will simply not run the task if the instance isn't primary.

Pete Greskoff · Oct 26, 2017 go to post

The concept of a relay server was something built into the original design for mirroring. It was never fully implemented, hence the lack of documentation. There is no way to use a relay server.

Pete Greskoff · Sep 18, 2017 go to post

Since it isn't on by default, you should also make sure to enable the %System/%Security/Protect event in "System Administration > Security > Auditing > Configure System Events. You'll be looking for either a Protect event or a LoginFailure event (enabled by default) when you look at the audit log.

Pete Greskoff · Aug 3, 2017 go to post

I'd be very surprised if you had trouble finding parking, since most people in the area will be leaving the garages at that time.

Pete Greskoff · Jul 17, 2017 go to post

I just want to add to this some other benefits of the way the data is stored. The first access of a global will have to read the pointer tree to find the particular node. A subsequent access of another node in the same global would only need to read from disk at the point where that node diverges in the pointer tree from the first. Even if the data blocks are not the same, a 2nd global access would likely be faster, since some of the tree would be cached, so fewer disk reads would be necessary.

Pete Greskoff · Jul 5, 2017 go to post

I wasn't able to find 'database read test' anywhere in the Caché source code. Are you sure this isn't something custom being logged by your application? Try searching your source in Studio to see if you can find it.

Pete Greskoff · Jun 27, 2017 go to post

RF,

I suggest opening a WRC issue to address this. I don't believe it's the same problem, though both are related to the redistributables.

Pete Greskoff · Jun 21, 2017 go to post

Is this why my notifications magically switched to a daily digest today instead of the settings I had previously (no digest mode, send as soon as possible)? 

Pete Greskoff · Jun 20, 2017 go to post

As far as ECP is concerned, you are only creating remote DATABASES. You can map 1 NAMESPACE on a system to point to any databases it has configured, local or remote. You could easily have app server instance A connect to both data server instances B and C and create a remote database for each of them. You could then have 1 namespace on A use the databases from B and C for various things (globals, routines, specific mappings).

Pete Greskoff · Jun 19, 2017 go to post

Instance B would be the data server. You just need to make sure you enable the %Service_ECP on that machine as part of configuring the data server. As for choosing the database, that would be done on instance A. After you configure it to be an application server pointing to instance B, you can create a remote database on instance A.