Re: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"))

212 views
Skip to first unread message

Daniel Jacques

unread,
Nov 17, 2016, 12:37:00 PM11/17/16
to K Bhasker, chromium-os-dev
Chrome infrastructure doesn't own the cbuildbot tool and can't really help with the sort of thing.

+chromium-os-dev, where this CrOS tool discussion should happen.

Drive-by debugging though, it looks like you're trying to run the tool in production mode. In this mode, it expects to be run in a production environment, and your local system is definitely not a production environment.

You didn't list your actual command-line, but if you look at _GetRunEnvironment, you'll see that you want to trigger _ENVIRONMENT_DEBUG or _ENVIRONMENT_STANDALONE. Either pass "--debug" or don't pass "--buildbot" when running the tool.

I'll let the CrOS team take it from here.

-Dan

On Thu, Nov 17, 2016 at 9:23 AM Nodir Turakulov <no...@chromium.org> wrote:
Dan, can you CC relevant cros folks here? I'm not sure they are subscribed to this ML

On Wed, Nov 16, 2016 at 10:53 PM K Bhasker <kbhask...@gmail.com> wrote:
Hello All,

Please find more inputs on this issue.

My local machine buildbot setup is similar to https://build.chromium.org/p/chromiumos/waterfall 

Builds are failing on my buildbot machine with below error.
22:53:49: INFO: Running cidb query on pid 22574, repr(query) starts with 'SHOW DATABASES'
22:53:49: INFO: None of error codes encountered set([2002]) are-retryable.
22:53:49: DEBUG: Encountered unexpected exception <class 'sqlalchemy.exc.OperationalError'>((_mysql_exceptions.OperationalError) (2002, "Can't connect to local MySQL server through socket'/var/run/mysqld/mysqld.sock' (2)")), not retrying.
cbuildbot: Unhandled exception:

16:17:02: INFO: Running cidb query on pid 8723, repr(query) starts with 'SHOW DATABASES'
16:17:02: INFO: Created cidb engine b...@173.194.81.53 for pid 8723
16:17:02: INFO: Running cidb query on pid 8723, repr(query) starts with 'SHOW TABLES'
16:17:03: INFO: Running cidb query on pid 8723, repr(query) starts with 'SELECT MAX(schemaVersion) from schemaVersionTable'
16:17:04: INFO: Created a SchemaVersionedMySQLConnection, sqlalchemy version 0.7.4

in failure case cidb engine is not created, could you please help me to understand the cidb database related issue is specific to my machine, which need to be configured locally ? if yes, can someone guide me with the instructions on setting up the required cidb database.

Please let me know if this is infrastructure related issue, need any additional steps to follow ? i have followed the instructions @ https://www.chromium.org/developers/testing/chromium-build-infrastructure 

Thank You.


On Monday, November 14, 2016 at 12:02:48 PM UTC+5:30, K Bhasker wrote:
Hi

I have configured Chromiumos buildbot on my Linux machine and using the same machine as master and slave .
Builds started are running into below issue (for ex: oak-full builder).
could you please check and let me know if i am missing any configuration?


22:53:45: DEBUG: Configured cache_dir to '/local/mnt/workspace/${USER}/buildbot/cbuild/external_master/.cache'
22:53:48: DEBUG: Cbuildbot tempdir is '/tmp/cbuildbot-tmpj1Qn56'.
22:53:49: INFO: Running cidb query on pid 22574, repr(query) starts with 'SHOW DATABASES'
22:53:49: INFO: None of error codes encountered set([2002]) are-retryable.
22:53:49: DEBUG: Encountered unexpected exception <class 'sqlalchemy.exc.OperationalError'>((_mysql_exceptions.OperationalError) (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")), not retrying.
cbuildbot: Unhandled exception:
Traceback (most recent call last):
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/bin/cbuildbot", line 168, in <module>
    DoMain()
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/bin/cbuildbot", line 164, in DoMain
    commandline.ScriptWrapperMain(FindTarget)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/commandline.py", line 834, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/scripts/cbuildbot.py", line 1310, in main
    logging.info('One stage exited early: %s', ex)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/scripts/cbuildbot.py", line 1272, in main
    stack.Add(_SetupConnections, options, build_config)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/cros_build_lib.py", line 1246, in Add
    obj = functor(*args, **kwargs)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/scripts/cbuildbot.py", line 1040, in _SetupConnections
    db = cidb.CIDBConnectionFactory.GetCIDBConnectionForBuilder()
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/cidb.py", line 1502, in GetCIDBConnectionForBuilder
    return self.GetInstance()
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/factory.py", line 103, in GetInstance
    return self._types[self.setup_type]()
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/factory.py", line 119, in wrapper
    cached_value.append(function())
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/cidb.py", line 1396, in <lambda>
    lambda: CIDBConnection(constants.CIDB_DEBUG_BOT_CREDS)),
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/cidb.py", line 616, in __init__
    db_credentials_dir, *args, **kwargs)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/cidb.py", line 244, in __init__
    temp_engine).fetchall()
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/cidb.py", line 545, in _ExecuteWithEngine
    return self._RunFunctorWithRetries(f)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/cidb.py", line 557, in _RunFunctorWithRetries
    functor=functor)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/retry_stats.py", line 180, in RetryWithStats
    *args, **kwargs)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/retry_util.py", line 115, in GenericRetry
    ret = functor(*args, **kwargs)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/retry_stats.py", line 167, in wrapper
    result = functor(*args, **kwargs)
  File "/local/mnt/workspace/${USER}/buildbot/build/slave/oak-full-master/build/chromite/lib/cidb.py", line 542, in <lambda>
    f = lambda: engine.execute(query, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2057, in execute
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2106, in contextual_connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2145, in _wrap_pool_connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1456, in _handle_dbapi_exception_noconnection
  File "build/bdist.linux-x86_64/egg/sqlalchemy/util/compat.py", line 202, in raise_from_cause
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2141, in _wrap_pool_connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 387, in connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 766, in _checkout
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 516, in checkout
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 1138, in _do_get
  File "build/bdist.linux-x86_64/egg/sqlalchemy/util/langhelpers.py", line 60, in __exit__
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 1135, in _do_get
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 333, in _create_connection
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 461, in __init__
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 651, in __connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/strategies.py", line 105, in connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 385, in connect
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
@@@STEP_CURSOR@cbuildbot [oak-full]@@@
step returned non-zero exit code: 1
@@@STEP_FAILURE@@@


Thanks,
Bhasker

--
You received this message because you are subscribed to the Google Groups "infra-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-dev+...@chromium.org.
To post to this group, send email to infr...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-dev/e8c49d5c-2d6d-4870-8135-1c123732b22a%40chromium.org.

--
You received this message because you are subscribed to the Google Groups "infra-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-dev+...@chromium.org.
To post to this group, send email to infr...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-dev/CAFckvjX6dD6ztwxt13%3DWHG78iHAk%2BWFT5gOHOBq4nn3AAAsGvQ%40mail.gmail.com.

K Bhasker

unread,
Nov 29, 2016, 12:04:41 PM11/29/16
to Chromium OS dev, kbhask...@gmail.com
Please find the command line as below for arm-generic-full build.

@@@STEP_CURSOR@cbuildbot [arm-generic-full]@@@
@@@STEP_STARTED@@@
/local/mnt/workspace/${USER}/buildbot/build/slave/arm-generic-full-master/build/chromite/bin/cbuildbot --buildroot /local/mnt/workspace/${USER}/buildbot/cbuild/external_master --buildbot --branch master --buildnumber 29 --debug --git-cache-dir /b/cros_git_cache arm-generic-full
in dir /local/mnt/workspace/${USER}/buildbot/build/slave/arm-generic-full-master/build:

Thanks,
Bhasker
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages