Runtime error: Can't connect to Server on Mac OSX

Developed a solution on Win XP and runtime works great on various Win computers.

Created a Mac runtime version on the XP after selecting Mac as OS.

Now trying to load on clients Mac OSX laptop but getting error message "Can’t connect to the database server’

Have seen thread http://forum.servoy.com/viewtopic.php?t=2362.

Manually copied the database & logfile into the runtime/database folder and have just copied them again but still same error message.

Can anyone suggest a solution - client arriving in 3hrs …

Thanks in advance

GrahamG

There appears to be a problem indeed. To fix:
-from a servoy developer install on mac copy the file dbeng9 (in the sybase_db folder) into the runtime_db folder of the runtime folder
-rename dbeng9 into dbeng

I’ll pass it on to our dev team so they can fix this in the plugin.

That worked perfectly - another beer I owe you.

Great support again.

Thanks

GrahamG

Has this been fixed on the MAC?
I did a build on a Win XP box, directly to a folder on the Mac. I did another build from Developer on the Mac.
In the Win->Mac build, dbeng9 was a Unix Executable,
On the Mac->Mac build it was a Document, and the database wouldn’t load.

An observation - if Developer has been running on the Mac (eg to build a runtime) then the runtime is opened without first stopping the server, runtime finds the db in the Dev database folder, not the RT database folder.

I have not found the instructions on stopping the server on Mac to work. Only a reboot or logging out on the Mac seem to work.

antonio:
Has this been fixed on the MAC?

What do you mean with ‘fixed’ ? As we discussed Mac and other unixes have more definitions of ‘executable’ than windows has and this has to be corrected before you deploy if your starting point is Windows. This is not a unix, linux, mac or (hundred other operating systems here) but just a windows problem. Windows just doesn’t like to aknowledge other operating systems exist, we try to adjust to that but it’s really hard.

Hi Jan,

Windows does the right thing when we select MacOSX for the build, due to your good efforts.

But I am referring to building a the runtime on the Mac. There’s not a lot of documentation around for Runtime, so I’m sorry if I am not completely understanding the differences.

I’ve just done a fresh build on the Mac, for Mac. The dbeng9 file in the runtime/sybase_db folder is different to that in the Servoy/sybase_db folder. I have to copy the original file into the runtime folder or I get an error “Can’t connect to the database server” when I launch runtime.

There’s another issue which won’t affect users, but it adds steps when testing runtimes. Without logging off the Mac after the build, RT will happily bind to the db in /Applications/Servoy/database, not the runtime/database folder. I need to log off the Mac or reboot, then it will find the db in the rt database folder. If I run Dev again and close it, then run RT again, it’s pointing back to the Dev database folder. This is 100% reproducable here. I have different data in the 2 dbs and I can see which one is binding.

Of course Dev is not Server, so I couldn’t find a way to use the instructions for stopping Server to fix this.

When you stop developer Sybase ASA continues to run. You can stop it by using dbstop (details in manual) or Activity monitor and do a quit (not force quit) on the dbsrv process.

OK, I feel really dumb now :oops:
I had looked to the manual but didn’t see the answer, because the instructions I needed to find are in Section 4.3.2 of the Servoy Application Server Admin Guide or Section 15.3.2 of the Servoy Developer Users Guide. These are the chapters on Installing a Database as a Service. I hadn’t installed the db as a service, so I didn’t believe it applied. I was looking in chapter 9 of the Server Admin Guide, Stopping Servoy Server, thinking it was the Server I needed to stop, rather than the iAnywhere Service.

But wait! Here’s a chance for me to demonstrate my ignorance even further. :roll:

When I run the dbstop command - after exiting Servoy Dev.

eMac:/applications/servoy/sybase_db tony$ ./dbstop
Adaptive Server Anywhere Stop Engine Utility Version 9.0.2.3045
Unable to stop database server – Request to start/stop database denied.
eMac:/applications/servoy/sybase_db tony$

So what does that mean?

But that wasn’t the main point of my post. Here’s another chance to get egg on my face :wink:

antonio:
But I am referring to building a runtime on the Mac.

I’ve just done a fresh build on the Mac, for Mac. The dbeng9 file in the runtime/sybase_db folder is different to that in the Servoy/sybase_db folder. I have to copy the original file into the runtime folder or I get an error “Can’t connect to the database server” when I launch runtime.

In my hands, a Mac runtime built on the Mac won’t run until I copy the dbeng9 over.

I’m getting confused now too with all the eggs and platforms :wink:

Here is what I did:

  1. Clean install of 2.2.5 on Mac with Runtime box ticked
  2. Open Servoy and create a runtime of the sample crm
  3. Stopped Servoy, quit dbsrv using activity monitor
  4. opened terminal, changed directory to the runtime_db directory and typed:
    chmod +x dbeng9
  5. Launched runtime

Re-reading the manual I think it is not clear enough about the chmod +x step, perhaps you skipped it?

Hi Jan, yes it wasn’t clear that this is a required step. It’s only included in the section on how to move a runtime application from a Windows machine to Mac OS X or Linux/Unix.

It would help newcomers like me to mention that this is a required step for a build on a Mac. Or better still, could it happen without user intervention when building on a Mac for a Mac?

It’s not a big thing, we can live with or without it.

Now… just before I clean off the egg…

After the chmod +x dbeng9 instruction we see

Compress the runtime database directory.

I’m not sure how to do this, and why it’s needed.

Later there is the instruction

Copy the iAnywhere ASA runtime database file and log file to the:
folder\database folder.

Is it critical to copy the log file? can we do without it, as it gets recreated

Jan, would I be right in thinking that to update a users installed RT, I only need to overwrite the lib/solution.runtime file with the that from the new build? It seems that the other files are static (assuming no changes to beans, plugins and db) Or is there more required?

Could you also have a look at

antonio:
Could you also have a look at
RawSQL plugin and Runtimes - Classic Servoy - Servoy Community

I did.

Thanks for looking! I was hoping for a comment. Am I doing something wrong, or doesn’t rawSQL currently work with Runtime.

antonio:
After the chmod +x dbeng9 instruction we see

Compress the runtime database directory.

I’m not sure how to do this, and why it’s needed.

The compression is to maintain the executable flag. If you compress using tar and gz it has the possibility to remember that it is an executable even if your download would be hosted on a windows machine (or a windows-style CDROM). To compress use a GUI tool or tar: open terminal go to the directory where your runtime sits and type:

tar cvfz myruntime.tgz myruntimedirectory

antonio:

Copy the iAnywhere ASA runtime database file and log file to the:
folder\database folder.

Is it critical to copy the log file? can we do without it, as it gets recreated

[/quote]
If you closed your database correctly it is indeed not necessary to copy the logfile. We will correct the documentation on this.

Thanks for those two points, Jan. I really appreciate the Servoy attention to detail.

I understand now that the reference to compression in the manual is only if we want to pack it up for distribution.