Git Product home page Git Product logo

Comments (9)

MaceWindu avatar MaceWindu commented on May 30, 2024 1

Can confirm that is it 99% issue with init scrips running to early, because it works if I run custom init script manually a bit later

from docker-env.

MaceWindu avatar MaceWindu commented on May 30, 2024 1

Nothing fancy, in referenced sh file I just execute additional sql with create database.

I this this check https://github.com/DataGrip/docker-env/blob/master/sybase/16.0/entrypoint.sh#L13 is not correct.Looks like server is not in operational state yet when this log message generated, so probably you need to check for some other message.

I've checked logs for local installation and it looks after that message ASE still bringing databases online. My startup logs ends with following messages:

00:0002:00000:00002:2019/09/28 15:40:25.78 server  Database 'sybmgmtdb' is now online.
00:0002:00000:00002:2019/09/28 15:40:25.78 server  Recovery has restored the value of 'local async prefetch limit' for '16K' pool in 'default data cache' from '80' to 'DEFAULT'.
00:0002:00000:00002:2019/09/28 15:40:25.78 server  Recovery complete.
00:0002:00000:00002:2019/09/28 15:40:25.78 kernel  Reenlistment of DTC Transactions Complete
00:0002:00000:00002:2019/09/28 15:40:25.78 server  ASE's default unicode sort order is 'binary'.
00:0002:00000:00002:2019/09/28 15:40:25.78 server  ASE's default sort order is:
00:0002:00000:00002:2019/09/28 15:40:25.78 server  	'altdict' (ID = 45)
00:0002:00000:00002:2019/09/28 15:40:25.78 server  on top of default character set:
00:0002:00000:00002:2019/09/28 15:40:25.78 server  	'utf8' (ID = 190).
00:0002:00000:00002:2019/09/28 15:40:25.78 server  Master device size: 2184.5625 megabytes, or 1118496 virtual pages. (A virtual page is 2048 bytes.)
00:0002:00000:00019:2019/09/28 15:40:25.87 kernel  Initializing Job Scheduler Task
00:0002:00000:00019:2019/09/28 15:40:25.89 kernel  Installed Job Scheduler sequencer code version 0.29 - 29 tokens

I think it is better to use one of them for check.

BTW, can you add log message to signal successfull start to entrypoint.sh, so it will be possible to wait for message in docker log instead of fixed wait interval?

from docker-env.

MaceWindu avatar MaceWindu commented on May 30, 2024

Actually it could be lack of extra wait/proper start check, because tests give me this error:

AdoNetCore.AseClient.AseException : Attempt to locate entry in sysdatabases for database 'TestDataCore' by name failed - no entry found under that name. Make sure that name is entered properly.

so basically, connection to db works. But also still could be an issue with isql connection settings

from docker-env.

tjlee avatar tjlee commented on May 30, 2024

Could you specify the way you run your image?

I run it with docker-compose:

...
    sybase_16.0:
      container_name: sybase_16.0
      privileged: true
      image: datagrip/sybase:16.0
      ports:
        - "5001:5000"
      env_file: .env
      hostname: mysybase
      healthcheck:
        test: "exit 0"
...

Sybase related environment variables:

SYBASE_USER=guest
SYBASE_PASSWORD=guest1234
SYBASE_DB=guest

We run docker container on our CI server and have no issues with container startup.

from docker-env.

tjlee avatar tjlee commented on May 30, 2024

The following chunk of script is responsible for db startup:

export STATUS=0
i=0
echo "STARTING... (about 30 sec)"
while [[ $STATUS -eq 0 ]] || [[ $i -lt 30 ]]; do
	sleep 1
	i=$((i+1))
	STATUS=$(grep "server name is 'MYSYBASE'" /opt/sybase/ASE-16_0/install/MYSYBASE.log | wc -c)
done

If you need, i can put wait timeout into a variable with default to 30.

from docker-env.

MaceWindu avatar MaceWindu commented on May 30, 2024

We are in process of docker adoption, so for now we run it using docker run command, without compose https://github.com/linq2db/linq2db/blob/release.3.0/Build/Azure/scripts/sybase.sh

This issue is quite persistent, e.g. latest run for linux here have it:
https://dev.azure.com/linq2db/linq2db/_build/results?buildId=1195
see "Tests: Lin / NETCOREAPP2.0 / Sybase" job, "Setup tests" stage

but after I added additional code to create database by custom scrip, it doesn't affect us

from docker-env.

tjlee avatar tjlee commented on May 30, 2024

but after I added additional code to create database by custom scrip, it doesn't affect us

What code did you add? I can try to fix the current one.

from docker-env.

tjlee avatar tjlee commented on May 30, 2024

You can build your own image based on either datagrip/sybase one or nguoianphu/docker-sybase

from docker-env.

tjlee avatar tjlee commented on May 30, 2024

@MaceWindu I faced the same issue. So I changed a bit Sybase server wait logic

from docker-env.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.